save a file via applescript
save a file via applescript
- Subject: save a file via applescript
- From: Gert van Oss <email@hidden>
- Date: Wed, 25 Feb 2004 04:33:22 +0100
The script I wrote should generate a default filename to save the
current active window from BBEdit. Somehow I get the idea I'm doing
something wrong as the file I save via my script are always double as
big in size then the files I save via the BBEdit app.
try
tell application "BBEdit"
activate
set this_file to window 1
set the target_path to (choose file name default name "DefaultName")
as string
save this_file to file target_path
close this_file
end tell
on error error_message
display dialog error_message
end try
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.