Apple script problems
Thomas J McGrath III
3mcgrath at adelphia.net
Mon Dec 15 09:17:49 EST 2003
Jim,
Hi, I don't know where the curly brackets come from but it looks like
record 1 and record 2 = {} and item one record one = ,
You could write a script to take record one using curly brackets as
delimiter and put it into a variable 1 then change delimiter to comma
and deal with all items in variable 1 to put into fields on a card 1
and remove quotes then repeat for each curly bracket as a new card.
This actually seems like it could be useful for building a card
database in REV.
Tom
On Dec 15, 2003, at 5:57 AM, Jim Hurley wrote:
>>
>>
>> ------------------------------
>>
>> Message: 6
>> Date: Mon, 15 Dec 2003 10:56:31 +1000
>> From: Sarah Reichelt <sarahr at genesearch.com.au>
>> Subject: Re: Apple script problems
>> To: How to use Revolution <use-revolution at lists.runrev.com>
>> Message-ID: <85674066-2E99-11D8-8E65-0003937A97B8 at genesearch.com.au>
>> Content-Type: text/plain; charset=US-ASCII; format=flowed
>>
>> Hi Jim,
>>
>> HyperCard is totally AppleScriptable. If you open the Apple Script
>> Editor and then Open dictionary... you can see the list of commands
>> that HyperCard responds to. Revolution has no such dictionary and does
>> not respond directly to AppleScripts. You can probably do it yourself
>> by writing an AppleEvent handler that responds to a dosc event (do
>> script).
>>
>> However in the current case, you don't need to use AppleScript.
>> Shorten your AppleScript to this:
>>
>> tell application "filemaker Pro5"
>> get every record
>> set theResult to result
>> return theResult
>> end tell
>>
>> In your Rev button, have this script:
>> On mouseUP
>> do field "theScript" as applescript
>> put the result into field "data"
>> end mouseUp
>>
>> Cheers,
>> Sarah
>> sarahr at genesearch.com.au
>> http://www.troz.net/Rev/
>
>
> Hi Sarah,
>
> Thank you for your response. It was very helpful. But the result of
>
> tell application "filemaker Pro5"
> get evrey record
> end tell
>
> On mouseUp
> do field "theScript" as applescript
> put the result into field "data"
> end mouseUp
>
> results in the following in field "data"
>
> {{"4535", "Gossett", "Joshua", "Boreham", "12975", "", "", ""},
> {"109769", "Hochwald ", "Joshua ", "American Hill ", "15822",
> "sAddress sLast", "", "Voter"}}
>
> (These are just two records in this voter database.)
>
> Now I can get rid of the quotes and the curly brackets (by putting the
> results into a variable and using the "replace" command), but I don't
> understand their origin. They are not present in the original; the
> fields are all just simple text. The quotes are not so surprising as
> the curly brackets.
>
> Puzzled,
>
> Jim
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
Macintosh PowerBook G-4 OSX 10.3.1, OS 9.2.2, 1.25 GHz, 512MB RAM, Rev
2.1.2
Advanced Media Group
Thomas J McGrath III • 2003 • 3mcgrath at adelphia.net
220 Drake Road, Bethel Park, PA 15102
More information about the use-livecode
mailing list