• 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
A script to create another script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A script to create another script


  • Subject: A script to create another script
  • From: Joseph Weaks <email@hidden>
  • Date: Tue, 17 Jun 2003 11:50:01 -0500

I'm working on a script that will save (compile) a custom script onto the hard drive. I'm trying to do it with do script osacompile. The parent script creates two variables, Var1 is a list of lists. More specifically it is a list of window bounds parameters: {{100,200,200,300},{200,250,300,
350},...}. The second variable, Var2 is a list of file aliases.
Now, the text of the script that is being created in my thinking needs to begin with:
Property thisVariable: [the list of lists mentioned above]
Property thatVariable: [the list of aliases]

Of course, if I try:

set scriptText to "Property thisVariable: " & Var1 & "
Property thatVariable: " & Var2 & "...

the lists get coerced into strings, that don't include the brackets and commas. (This is another example of a less than obvious place to set delims if you don't adopt the practice of always restoring old values.) My question is, what is a good way of going about this? Is there another option other than osacompile I should be trying?

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.

  • Follow-Ups:
    • Re: A script to create another script
      • From: John Delacour <email@hidden>
References: 
 >Re: Why save text item delimiters? Philosophical question.... (From: John Delacour <email@hidden>)

  • Prev by Date: Any Utilities to Decomplie a Script :-(
  • Next by Date: Re: AppleScript Timed Events
  • Previous by thread: Re: Why save text item delimiters? Philosophical question....
  • Next by thread: Re: A script to create another script
  • Index(es):
    • Date
    • Thread