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@192.168.111.225 osascript -e tell application “System Events” to key code 123”

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

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"
	when
		Item abutton2 changed 
	then 
         result = executeCommandLine("ssh admin@192.168.111.225 osascript -e tell application "System Events" to key code 123", 5000);
	Thread::sleep(100);
	logInfo("result", result);