Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Applescript > Automatic title...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 1634 of 1674
Post > Topic >>

Automatic title and saving of the same

by Jo_y <jo_y@[EMAIL PROTECTED] > Jun 25, 2008 at 06:42 AM

Hi,
i wrote a script for the Script Editor, which tracks the first line of
my front do***ent and converts (whitespaces includet) :
a) the first line in the title of front do***ent and..
b) asks me where to save this do***ent (in front win of Finder -else
the Desktop-folder if  no win are open or in the path of window x of a
open Applescript-window)

now, i ask myself if there is a way to write a similary script where
works for every application ?
the main problem is to tell the script the right frontmost
application. Like the script below, but it doesn't run.


--Test1

tell application "Finder" to set v to desktop as text
tell application "System Events" to set h to name of front process
whose accepts high level events is true and visible is true and name
is not "Finder"
tell h
	try
		set w to window 1
	on error
		set w to do***ent 1
	end try
	set x to w
	set y to line 1 of w as text
	set ff to (v & y as text)
	save ff
end tell

Ciao!
 




 2 Posts in Topic:
Automatic title and saving of the same
Jo_y <jo_y@[EMAIL PROT  2008-06-25 06:42:48 
Re: Automatic title and saving of the same
Jo_y <jo_y@[EMAIL PROT  2008-06-26 03:13:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 9:49:12 CST 2008.