EXEC item syntaxe with Osascript

Hi ! I’m trying to make this item work but I don’t now where to put my Quotation mark…

Switch left “abutton2” { exec=“ON: ssh admin@ osascript -e tell application “System Events” to key code 123”

tell application “System Events” of machine "eppc://login:password@machine.local"

end tell

Thank !
But this is not what I need…

I’m on linux and I want to control a Mac… so I need to put an apple script into a ssh into a exec item …

Try a rule attached to the item :

rule "exec command"
		Item abutton2 changed 
         result = executeCommandLine("ssh admin@ osascript -e tell application "System Events" to key code 123", 5000);
	logInfo("result", result);