Re: global variables
Re: global variables
- Subject: Re: global variables
- From: Isaac Ordonez <email@hidden>
- Date: Wed, 26 May 2004 18:08:18 -0700
BINGO! I got it now. Since i'm doing an on clicked handler everything
else in the script isn't called unless told to. I moved the
set importpass to my keychainpass("password") as string
inside the on clicked handler and kept the on keychainpass outside and
it worked fine. Thanks a ton.
Isaac Ordonez
Technology Support Specialist II
San Rafael City Schools
415.302.8114
On May 26, 2004, at 2:46 PM, Helmut Fuchs wrote:
Depending on how you use the script, the line that's setting the
importpass variable is never run.
You could put this line in a run handler (if that is called):
on run
set importpass to my keychainpass("password") as string
end run
Or you could just check, if the value is defined, before using it and
initialize it, if necessary:
try
importpass
on error
set importpass to my keychainpass("password") as string
end try
This way importpass gets set only once.
HTH,
Helmut
_______________________________________________
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.
_______________________________________________
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.