Using the "do" command

Dan Friedman dan at clearvisiontech.com
Wed Dec 12 11:19:16 EST 2007


Greetings!

My goal is to get information/data from iTunes.  (i.e. the current song, the
next song, current song's album artwork, etc.)  On the Mac, this is a snap
with the "do tScript as appleScript" command.  However, on Windows (Rev
version 2.9) I am having trouble....

The VB Script I am using is this:

    set iTunes = createObject("iTunes.Application")
    set currSong = iTunes.currentTrack
    Wscript.Echo currSong.Name

If I save this script to a file named "getSongName.vbs" then double-click
the file, it works.  If I put the script in a field and do this:

    do field 1 as VBScript;put the result &cr& it

All I get is "execution error".  My guess is the problem is the
"Wscript.Echo" command.  But, how do you get a variable/parameter to return
using VBScript?


Thank you in advance!

-Dan





More information about the use-livecode mailing list