• 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: Stateful variables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stateful variables


  • Subject: Re: Stateful variables
  • From: Takaaki Naganoya <email@hidden>
  • Date: Mon, 14 Aug 2006 12:02:32 +0900
  • Thread-topic: Stateful variables

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

References: 
 >Stateful variables (From: "Devraj Mukherjee" <email@hidden>)

  • Prev by Date: Re: How can you change the main monitor
  • Next by Date: Script menu or double-click ?
  • Previous by thread: Re: Stateful variables
  • Next by thread: Re: Stateful variables
  • Index(es):
    • Date
    • Thread