Launching in OS X Problems
Ken Ray
kray at sonsothunder.com
Sat Feb 14 21:40:00 EST 2004
Peter,
Use the shell command "open" that you can run through Terminal. The
basic syntax at the command line is:
open <pathToApp> <pathToDoc>
So here's the code I used (watch wrapping):
on mouseUp
put "open" && quote & "/Applications/Windows Media Player/Windows
Media Player.app" & \
quote && "/Applications/Windows Media Player/sample.asf" & quote
into tCmd
get shell(tCmd)
end mouseUp
Works like a charm...
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of
> Peter Reid
> Sent: Saturday, February 14, 2004 6:46 PM
> To: Runtime Revolution Use Mailing List
> Subject: Launching in OS X Problems
>
>
> Hi
>
> Did anyone get a solution to launching programs under OS X? I'm
> using Rev 2.1.2 with OS X 10.3.2 and trying to "launch" the three
> media players: Flash, RealOne and Windows Media Player with relevant
> media files. Only the Flash one works!
>
> I've tried using:
>
> launch mediafile with mediaPlayer
>
> (where mediaPlayer is the full path to the Windows Media Player, say)
>
> If I try this in the Message box, I get the error "no such program".
> But if I omit the mediafile from the launch command:
>
> launch mediaPlayer
>
> then it works fine, i.e. it opens the player (but doesn't play
> anything of course!). This is true for both Windows Media Player and
> RealOne Player, both of which are carbonised by the look of it (they
> are .app bundles, with embedded Contents/MacOS etc.) unlike the Flash
> Player which seems to be a native app.
>
> I even tried to use AppleScript instead:
>
> put "tell application " & quote & "Windows Media Player" & quote
> & return &\
> " open " & quote & mediafile & quote & return &\
> "end tell" & return into theScript
> do theScript as AppleScript
>
> but this just opens the Windows Media Player without playing
> the media file.
>
> I want to be be able to make my Rev app like a video jukebox that
> handles the three formats by opening the relevant player in its own
> window.
>
> Any ideas please??
>
> Peter
> --
> Peter Reid
> Reid-IT Limited, Loughborough, Leics., UK
> Tel: +44 (0)1509 268843 Fax: +44 (0)8700 527576
> E-mail: preid at reidit.co.uk
> preid at reidit.demon.co.uk
> peter.reidit at ntlworld.com
> Web: http://www.reidit.co.uk
> http://www.reidit.demon.co.uk
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-> revolution
>
More information about the use-livecode
mailing list