• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
save a file via applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: save a file via applescript
      • From: Brent Baisley <email@hidden>
    • URL Access
      • From: Jerad Hoff <email@hidden>
  • Prev by Date: Re: New iTunes Track
  • Next by Date: URL Access
  • Previous by thread: RE: ripe it out
  • Next by thread: URL Access
  • Index(es):
    • Date
    • Thread