• 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: Calling a variable from multiple scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling a variable from multiple scripts


  • Subject: Re: Calling a variable from multiple scripts
  • From: Philip Aker <email@hidden>
  • Date: Tue, 19 Feb 2008 06:04:53 -0800

On 2008-02-19, at 05:10:50, Nishanth wrote:

Consider I have 2 applescripts - script A and  script B.

Script A will contain applescript line -

set btnSave to a reference to button "Save" of window "myapp" -- Just referring a 'Save' button to click it later

Script B will refer this btnSave of Script A like this (I will call the script A at the start of script B)-

click btnSave -- Click on 'Save' button

Problem : On running the Script, it says variable 'btnSave' not declared.

Can anyone let me know how to call a variable from another script, without declaring the variable in the present script ?

I guess you're working with AppleScript Studio. There are several well known solutions.


Use 'user-defaults", "load script", or the 'call methods' available in BSCache <http://vcn.bc.ca/~philip/#BSCache.framework>.

Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Calling a variable from multiple scripts
      • From: Nishanth <email@hidden>
References: 
 >Calling a variable from multiple scripts (From: Nishanth <email@hidden>)

  • Prev by Date: Calling a variable from multiple scripts
  • Next by Date: Re: Applescript crash
  • Previous by thread: Calling a variable from multiple scripts
  • Next by thread: Re: Calling a variable from multiple scripts
  • Index(es):
    • Date
    • Thread