• 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
Re: save a file via applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: save a file via applescript


  • Subject: Re: save a file via applescript
  • From: Brent Baisley <email@hidden>
  • Date: Wed, 25 Feb 2004 10:28:43 -0500

I just tried this on my computer and the files are the same size whether I save it manually or through your script. Are you looking at the byte size of the file or how much disk space it takes up?
The finder will show how much disk space it takes up, which will be in increments of 4KB (the block size) if you use the default setting for the file system. You need to "Get Info" to see the byte size of the file.

On Feb 24, 2004, at 10:33 PM, Gert van Oss wrote:

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

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
_______________________________________________
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: Gert van Oss <email@hidden>
References: 
 >save a file via applescript (From: Gert van Oss <email@hidden>)

  • Prev by Date: How to make thumbnail
  • Next by Date: Do shell script
  • Previous by thread: Re: URL Access
  • Next by thread: Re: save a file via applescript
  • Index(es):
    • Date
    • Thread