0

I would like to do this: When the application VLC is open and I press the space bar, it pauses the video and an itunes starts to play. Then spacebar again would resume the workout video and pause my song.

Is there a way to do this on mac? Maybe using an actionscript or else?

Ex:

IF (VLC open and spacebar pressed) { play this song on itunes} else { pause the song }

0

This is possible since you can use macruby's bridge support to control itunes and VLC's interfaces over TCP. You can find the required material from these links

http://merbist.com/2010/01/17/controlling-itunes-with-macruby/

https://github.com/arcresu/vlcrc

Don't expect the answer to be as short as you believed. You will have to do the coding yourself as I don't have time enough to make the code and to post it.

0

Here's a quick solution in Applescript that could be triggered by a simple shortcut:

tell application "iTunes"
    if player state is stopped then
        playpause
    else
        playpause
        tell application "VLC" to activate
        tell application "System Events" to keystroke space
    end if
end tell

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.