Skip to main content
BEGINNER_X
Legend
October 7, 2020
Answered

Is it possible to trigger MAC AppleScript via PC?

  • October 7, 2020
  • 1 reply
  • 549 views

HI All,

 

Good Day!

 

Due to work from home, few PC users want to access workplace MAC OS AppleScript.

 

1. Users feed the few basic information in PC using Javascript UI (i.e., InDesign JavaScript)

2. using doScript, the Javscript will call the AppleScript located in server

3. Now the AppleScript would work and give output. (zip file placed in destination, extract zip etc...)

4. BUT my challenge is, How the server AppleScript tool will find out the correct system.

 

Any ideas, logic or help is much appreciated!

 

Thanks

SS

This topic has been closed for replies.
Correct answer Dirk Becker

In System Preferences >> Sharing, activate Remote Login (also known as ssh).

Your PC would need a ssh client, don't know whether Windows nowadays has one.

With some extra configuration effort, you can use public/private keys to avoid the password exchange.

Within that ssh session (as with a terminal session), you can execute shell scripts.

The shell script command to invoke AppleScript is "osascript", documented via "man osascript".

There is no need for AppleScript to perform "zip" operations, that's also available from shell.

1 reply

Dirk BeckerCorrect answer
Legend
October 7, 2020

In System Preferences >> Sharing, activate Remote Login (also known as ssh).

Your PC would need a ssh client, don't know whether Windows nowadays has one.

With some extra configuration effort, you can use public/private keys to avoid the password exchange.

Within that ssh session (as with a terminal session), you can execute shell scripts.

The shell script command to invoke AppleScript is "osascript", documented via "man osascript".

There is no need for AppleScript to perform "zip" operations, that's also available from shell.

Legend
October 7, 2020

Someone disabled the edit button.

don't know whether Windows nowadays has [a built-in ssh client]

 

You would talk to that ssh client from the Windows command line, reached from Indesign via doScript, VBScript, then search for keywords CreateObject and WScript.Shell …

BEGINNER_X
Legend
October 8, 2020

HI Dirk,

 

Thank you for your support... will look into this and get back.

 

Thanks

SS