Kirn
Kirn

Reputation: 524

Remote AppleScript Events

I'm trying to open a QuickTime video on a remote computer but running into some issue.

Can someone help?

This is the code I've got so far, it's able to open the video but don't know how to get it to play...

set TheView2 to "eppc://username:[email protected]"
set remoteFinder to application "Finder" of machine TheView2
using terms from application "Finder"
    tell remoteFinder
        open application file id "com.apple.QuickTimePlayer"
        try
            using terms from application "QuickTime Player"
                tell application "QuickTime Player" of machine TheView2
                    open "Macintosh HD:Users:mini:Desktop:cache.mov"
                end tell
            end using terms from
        on error errText number errNum
            display dialog "Some other error: " & errNum & return & errText
        end try
    end tell
end using terms from

Upvotes: 1

Views: 606

Answers (1)

regulus6633
regulus6633

Reputation: 19030

After you open the movie using the remote version of Quicktime just issue the "play" command in the same block of code. By the way, it is a bad idea to have nested tell blocks. Specifically in your case you have the Quicktime tell block inside the Finder tell block. Basically you're telling the Finder to tell Quicktime to do something. Why? The Finder doesn't need to issue any commands to Quicktime because applescript can do that itself. So separate the 2 tell blocks from each other. You'll have less conflicts that way.

Upvotes: 2

Related Questions