Re: Stateful variables
Re: Stateful variables
- Subject: Re: Stateful variables
- From: Takaaki Naganoya <email@hidden>
- Date: Tue, 15 Aug 2006 06:20:07 +0900
- Thread-topic: Stateful variables
On 06.8.14 10:00 PM, "Devraj Mukherjee" <email@hidden> wrote:
> Can values be used across scripts?
Yes. But how to imprement is depends on how you prepare these scripts.
If you use scripts within Objective-C program as static string, you'd better
to write the value to some file or .plist file.
If you use scripts in Script Editor and use pure AppleScript way, you can
load library script into variables and use the boolean variable (property)
among these scripts.
> Also can AppleScript have parameters passed to them?
Yes.
--
Takaaki Naganoya
Piyomaru Software
http://piyo.piyocast.com
> On 8/14/06, Takaaki Naganoya <email@hidden> wrote:
>> Do you mean the existence of a kind of flip-flop state variable?
>>
>> I 'll use boolean value in such a case.
>>
>> <script>
>> property aState: true
>>
>> On run
>> set aState to not aState
>> End run
>> </script>
>>
>> First execution result: --> false
>> Second execution result: --> true
>> Third execution result: --> false
>> --
>> Takaaki Naganoya
>> Piyomaru Software
>> http://piyo.piyocast.com
>>
>> On 06.8.13 5:51 PM, "Devraj Mukherjee" <email@hidden> wrote:
>>
>>> Hi everyone,
>>>
>>> I am new to AppleScript but have been programming with Objective-C.
>>>
>>> Part of my problem scripting issues require me to keep stateful
>>> information between the execution of two AppleScript executions, is
>>> this possible using AppleScript? Much like session variables in web
>>> based scripting languages
>>>
>>> For example, I want to pause the song playing on iTunes but next time
>>> around I only want to play the song if iTunes was infact started at
>>> the first place.
>>>
>>> Thank you for your input and time in answering my question.
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Applescript-users mailing list (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>>
>>
>>
>>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden