Re: A script to create another script
Re: A script to create another script
- Subject: Re: A script to create another script
- From: Joseph Weaks <email@hidden>
- Date: Tue, 17 Jun 2003 17:12:14 -0500
On Tuesday, June 17, 2003, at 02:20 PM, John Delacour wrote:
You son't need to deal with strings at all, just with a script object:
Using a script object is what I was looking for. This script works great
now, except that when I later go and open the script that was saved onto
the hard drive, the two initial properties are still valued at {}, ie.
empty.
-- The script creates a script that opens a list of documents in TextEdit
and then fixes their window bounds.
-- Omitted is the portion of the script that figures out these 3 variables.
I've just defined them here for testing purposes.
property allWindowBounds : {{93, 70, 568, 542}, {104, 140, 579, 612}}
property allDocumentAliases : {alias "X Man:Users:his:Desktop:Word Merge
Sequence.rtf", alias "X Man:Installer Log File"}
set scriptPath to "X Man:Users:his:Desktop:testscript1"
script customScript
property theWindows : {}
property theDocuments : {}
repeat with x from (count of theDocuments) to 1 by -1
set DocToOpen to item x of theDocuments
tell application "TextEdit" to open DocToOpen
set windowBounds to (item x of theWindows)
tell application "TextEdit" to set bounds of front window to
windowBounds
end repeat
end script
tell customScript
set its theWindows to allWindowBounds
set its theDocuments to allDocumentAliases
end tell
store script customScript in file scriptPath with replacing
As I said, when I then go and open up "X Man:Users:his:Desktop:testscript1"
, the first two lines are
property theWindows : {}
property theDocuments : {}
Thanks for any help,
Joe Weaks
_______________________________________________
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.