Tag Info

Hot answers tagged


I can see a couple of things wrong there. Firstly you have opened a workflow and not an Application. You should choose Application when you make your selection for the type of Automator file. And the code you have will not work as you expect, since you have not changed directory. (cd). In the code as you have it, all it is doing is getting the path as ...


Can you change run.sh to run.command and get the user to double click it?


Path to Script In your AppleScript, you need to change the current working directory (cwd) before issuing the java command. Do this with an AppleScript line like: do shell script "cd " & quoted form of (POSIX path of file_path) & " && java -jar app.jar" The && is important. If the cd succeeds, the java command will be launched ...


AppleScript to Expand Text The following AppleScript snippet adds a space between each character of a string. Copy and paste this code in Applications > Utilities > Script Editor to try it out: set myText to "hello world" set myResult to "" repeat with c in every character in myText set myResult to myResult & " " & c end repeat display dialog ...


To have the selected text converted to upper case, along with having a space added between each character, add the following line to the script posted by Graham Miln. set myResult to do shell script "echo " & quoted form of (myResult) & " | tr [:lower:] [:upper:]" So in Automator it would be: on run {input, parameters} set myText to input as ...


Well you can ask Finder for its windows. The order returned is topmost to bottommost. If you have a specific window you want, and know its name then just ask it to activate... tell application "Finder" set w to (name of every window) set i to (id of every window) tell window named "Desktop" to activate get front window end tell And the ...


Rename your .sh file to .command and you can cd to the directory that the .command file is located in with the following at the beginning of the file: cd "$(dirname $BASH_SOURCE)"

Only top voted, non community-wiki answers of a minimum length are eligible