realbasic-nug
[Top] [All Lists]

Re: Trouble with AppleScript and RB

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Trouble with AppleScript and RB
From: "Eric M.Williams" <eric at oxalyn dot com>
Date: Mon, 31 May 2004 09:13:32 -0700
Delivered-to: realbasic-nug at lists dot realsoftware dot com
List-help: <mailto:realbasic-nug-request@lists.realsoftware.com?subject=help>
List-id: REALbasic NUG <realbasic-nug.lists.realsoftware.com>
List-post: <mailto:realbasic-nug@lists.realsoftware.com>
References: <BAY16-F84cI5jabgAEf00055b3b at hotmail dot com>
Try this:

on run
        Tell Application "iTunes"
                set s to the player state
        end tell

        set s to s as string

        return s
end run

The new line coerces the constant test to a string that you can read.

Eric M. Williams
Oxalyn Software
http://software.oxalyn.com/AEMonitor/

On May 31, 2004, at 6:28 AM, Dave DeLong wrote:

Hi List,

I have this applescript:

On Run
 Tell Application "iTunes"
   Set s to the player state
 end tell
 return s
end run

When I import it into RB and call the script, i'm supposed to get "playing", "paused", "stopped", "fast forwarding", or "rewinding". But what I get instead is some gibberish about "<<Constant***...."

Any ideas? (And I don't think it's an encoding issue because I have other applescripts in the same program that all run correctly)

Thanks,

Dave

_________________________________________________________________
Express yourself with the new version of MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>