Where to put Applescripts
Jim Ault
JimAultWins at yahoo.com
Mon Feb 13 12:38:39 EST 2006
Hey, Thomas,
>> with tokens where the dynamic parts are; for example,
>> [datafilepath] can be a token for a filepath.
It is a fancier way to say
replace "[datafilename]" with tDatFile in applscrptVar
where tDatFile is the variable you created in Rev.
thus you can use placeholders or 'tokens'.
The catch to the "do as AppleScript" method is that the script has to be
literally the correct string.
I have another way to store and retrieve AppleScripts in a stack that I like
better than using custom properties since it makes it easier to manage and
edit the AppleScripts. I will post it later today with instructions. I
could also send an example stack to anyone who is interested in harnessing
the power of AppleScript.
But for the moment, I have a lengthy meeting to go into.
Later
Jim Ault
Las Vegas
On 2/13/06 9:27 AM, "Thomas McGrath III" <3mcgrath at adelphia.net> wrote:
> Robert,
>
> The idea of using tokens is new to me. The idea seems sound but I am
> confused about the syntax. Would you mind giving an example?
> My questions are how to extract the token and replace it? can I use
> replace, find, etc.
> I looked up the token command and this was not clear.
>
> Thanks,
>
> Tom
>
>
> On Feb 13, 2006, at 11:34 AM, Robert Brenstein wrote:
>
>>> Hello listeroos!
>>>
>>> I have another question: Where is the best place to 'put'
>>> Applescripts in Revolution?
>>> I test them by putting them in a field and 'do' that field as
>>> applescript.
>>>
>>> I was thinking of using custom properties but some scripts need to
>>> be built 'live' as in:
>>> put first part of script into variable
>>> then add Rev variable to that variable
>>> then put last part of script after that variable
>>> lastly, do variable as applescript
>>>
>>> Or would it be better to put the pieces in the stack as variables
>>> (then they could be reused often)
>>>
>>> Thanks
>>>
>>> Tom
>>
>> Your thinking is quite correct and there is no need to split them
>> into parts. Just put the whole applescript into a custom property
>> with tokens where the dynamic parts are; for example,
>> [datafilepath] can be a token for a filepath. At runtime, fetch
>> this property into a variable and replace the tokens with actual
>> values.
>>
>> By the way, have you tried talking directly to iTunes from Rev?
>> Look up send to program command. The commands are what you tell in
>> AppleScript to do.
>>
>> Robert
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
> Thomas J McGrath III
> 3mcgrath at adelphia.net
>
> Lazy River Software - http://www.lazyriversoftware.com
>
> Lazy River Metal Art - http://www.lazyriversoftware.com/metal.html
>
> Meeting Wear - http://www.cafepress.com/meetingwear
>
> Semantic Compaction Systems - http://www.minspeak.com
>
> SCIconics, LLC - http://www.sciconics.com/sciindex.html
>
>
>
>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list