Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Vars/routines across different files



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/11/03, at 12:14 PM, Wim Melis said:

>Hi all,
>
>Can you use variables and routines across different Applescript files?


try something like this:

first file: main.applescript

script myScript

property x: 5

on clicked theObject
test()
end clicked
end script

second file: sub.applescript
to loadscript()
set scrpt to load script POSIX file
(path for main bundle script "main" extension "scpt")

return myScript of scrpt
end loadscript

on test()
set myScript to loadscript()
tell myScript to display dialog x
end


HTH,
_Ryan Wilcox

================================================================
Wilcox Development Solutions: http://www.wilcoxd.com
Toolsmiths for the Internet Age PGP: 0x2F4E9C31

-----BEGIN PGP SIGNATURE-----
Version: PGP SDK 3.0.3

iQA/AwUBP9iupG2DtKgvTpwxEQJ5awCfZjgVAzPUVXS0Tg3KSXswErjjStcAn1qz
te9aTS8gt+haxw78R88Q2Kmo
=CJ9L
-----END PGP SIGNATURE-----
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.

References: 
 >Vars/routines across different files (From: Wim Melis <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.