Hi,
i wrote a script for the Script Editor, which tracks the first line of
my front document and converts (whitespaces includet) :
a) the first line in the title of front document and..
b) asks me where to save this document (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 document 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!
>> Stay informed about: Automatic title and saving of the same