osascript Questions

3

Solved

I've got a shell script that I call that uses osascript, and that osascript calls a shell script and passes in a variable that I've set in the original shell script. I don't know how to pass that v...
Nonmoral asked 21/6, 2013 at 19:19

7

Solved

Consider the following AppleScript: on is_running(appName) tell application "System Events" to (name of processes) contains appName end is_running set safRunning to is_running("Safari") if safRu...
Microphone asked 17/4, 2013 at 16:5

2

Does anyone know how to send a group message using applescript/osascript? I've tried a bunch of stuff but nothing seems to work.
Bunting asked 11/4, 2013 at 20:17

1

Unable to build my app suddenly. This is the error which I got after running the caused by: script error: osascript: no such component "JavaScript". Continuing in background. Error: Failed to d...
Dastard asked 11/3, 2020 at 6:34

3

Solved

I'm writing a bash script that takes care of setting the desktop background on my mac. I can set the desktop background with: $ osascript -e 'tell app "Finder" to set desktop picture to POSIX file...
Ecclesia asked 28/2, 2015 at 16:11

1

Solved

There is an AppleScript method: on displayError(theErrorMessage) display dialog theErrorMessage return "done" end displayError I wanna compile this script with passing parameter into (not run ...
Doglike asked 28/8, 2019 at 10:41

1

Solved

I've just done a clean install of macOS Mojave (albeit various bits and pieces reinstalled) and getting a strange error running a bash script which in turn runs AppleScript via osascript. Any comma...
Utu asked 3/12, 2018 at 23:0

1

Solved

I need AppleScript that, when lunched from command line, will return three things: current active application name; ex. "Google Chrome", "Safari", "Steam", "iTunes", "Atom" ect. current active ap...
Hackery asked 9/2, 2018 at 19:52

1

Solved

I have an AppleScript script that is calling a shell command that I want to convert to JavaScript (JXA) but I don't see the equivalent of do shell script. Here is the script using AppleScript: ...
Playsuit asked 11/1, 2018 at 6:41

3

Solved

I have some apple script code: tell application "System Events" key code 97 end tell How do i write the code as a osascript -e command in Terminal? Everytime I try using \n or the such, I get e...
Illegitimate asked 22/8, 2015 at 13:27

7

Solved

In AppleScript it’s possible to get the the POSIX path of the folder the current script is located in using this line: POSIX path of ((path to me as text) & "::") Example result: /Users/aaro...

6

Solved

The following works to open two tabs in iTerm 2. I can't seem to figure out how to get this to using split panes instead. I've tried applying what I see on several forums, but it never works. Cou...
Taster asked 11/3, 2014 at 23:59

2

Is there any way to do this without any programs or scripts? (Maybe through osascript?)
Steck asked 20/11, 2010 at 2:19

1

Solved

I'm in the final phase of designing a script to automate my Active Directory binding that will be used by multiple people. Because of this, I need to prompt for a user name and password. I've succe...
Newfashioned asked 29/8, 2014 at 20:20

2

Solved

I am using osascript in Bash to display a message in Notification Center (Mac OS X) via Apple Script. I am trying to pass a text variable from Bash to the script. For a variable without spaces, thi...
Kenway asked 28/5, 2014 at 22:39

1

Solved

I'm reading the scripts from here and trying to understand what's going on. This function performs changing the directory of a Finder window: function ee { osascript -e 'set cwd to do shell scri...
Berl asked 30/12, 2013 at 9:20

2

Solved

I'm trying to make this script work. It's a Bash script that is meant to take some variables, put them together and use the result to send an AppleScript command. Manually pasting the string echoed...
Wareing asked 6/6, 2013 at 15:27

2

I'm running into problems with a shell script that utilizes a small portion of Applescript. When I compile it with Applescript editor it works. It does not though within a shell script. 44:49: ...
Schistosome asked 6/8, 2011 at 3:2

4

Solved

I'm thinking about writing my own little language. I found a few options, but feel free to suggest more. JVM Parrot OSA A lot of languages are using the JVM, but unless you write a Java-ish la...
Gurnard asked 30/1, 2010 at 10:52

1

Solved

I want to list opened windows in the terminal to get x, y, width and height like xwininfo -root -tree for X11. I tried: osacript -e tell application "Microsoft Word" to get the bounds of the fron...
Nelidanelie asked 12/4, 2012 at 13:16
1

© 2022 - 2024 — McMap. All rights reserved.