Forums > MaxMSP

Help with getting shell to understand my applescript!

April 2, 2013 | 3:48 pm

Hi, I am making a small application that runs around youtube playing videos. I prototyped alot of my control in applescript before moving to max. I have managed to convert all my scripts into osacript so that they can be run through the shell object. But I am now stuck on this one

tell application "Google Chrome" to activate
tell application "System Events"
tell process "Google Chrome"
do shell script "/usr/local/bin/cliclick/ c:360,550"
end tell
end tell

which I convert to

osascript -e ‘tell application "Google Chrome" to activate’ -e ‘tell application "System Events" to tell process "Google Chrome" to do shell script "/usr/local/bin/cliclick c:360, 550"‘

cliclick is a shell app that can use the mouse. the c is the command identifier for cliclick to click the mouse

http://www.bluem.net/en/mac/cliclick/

I have been translating code for the last few days, and this one just never works! any help you can offer is appreciated


April 2, 2013 | 7:06 pm

I found that it is the space in "c:360, 550" that throws cliclick off. Max automaticaly puts a space after comma’s so changed the code to

osascript -e ‘tell application "Google Chrome" to activate’ -e ‘tell application "System Events" to tell process "Google Chrome" to do shell script "/usr/local/bin/cliclick c:360,550"‘


Viewing 2 posts - 1 through 2 (of 2 total)