run applescript from remote Windows

Hi all,

Has anyone been successful in executing an applescript (running on a mac) from a remote windows machine and pass variables to the script?

I have managed to run a shell script on a remote machine (running centOS) and pass variables by creating a public key between the 2 machines and I wander if there’s anyway I can reverse engineer this so that a Windows machine could execute an applescript on a remote mac and pass variables to that script.

Thanks for looking,
Nik

Hi,

Thanks to all those the took the time to look at my post.

I thought I would post how I managed to get my scenario to work.

I created a script on the desktop of a mac:

on run arg
	set myvar to item 1 of arg
	say "Hello " & myvar
end run

and enabled Remote Login on the mac

I then installed PUTTY http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html on my windows based machine and created an ssh connection to the mac. Once this was established I was able to run the below command from PUTTY’s ssh window:

osascript ‘/Users/theUser/Desktop/test.scpt’ ‘Nik’

Hope this helps,
Nik