开发者

How to make the apple script file configurable ? can apple scipt file, shipped from window?

开发者 https://www.devze.com 2022-12-19 13:46 出处:网络
In Script editor i have written a command to 开发者_运维问答boot the JAR. do shell script \"cd /Desktop/RunJar/; java -jar RunMyJar.jar\"

In Script editor i have written a command to 开发者_运维问答boot the JAR.

do shell script "cd /Desktop/RunJar/; java -jar RunMyJar.jar"

and Saved as script file as a Application. When i click on script file jar get run.

As the apple script file has been saved as application we can not open the file on WINDOWS O.S.. so we are looking to configure the script file in such way that

EITHER

User only run that script file and script can automatically get the name of current directory and run the JAR instead of writing cd /Desktop/RunJar/;

OR

we can able to ship the script with the blank value of variable say current director and user can open and specif its working directory.

My Requirement is

Can apple script file automatic capture the absolute path of current directory (/Desktop/RunJar/) in which JAR is being executed.

OR Can we ship the apple script to MAC user from windows and ask user to open the script file and provide the absolute path of your current directory to some local variable say Current_directory in apple script.

Thanks-


Not sure if this is what you’re asking, but you can’t run AppleScripts on Windows. You’d be better off writing a batch file for Windows.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号