Skip to main content

Questions tagged [script]

A collection of commands that may be from a CLI Shell, or programming language such as AppleScript, which are executed in order with limited iteration, usually as a way of automating actions or events.

0 votes
1 answer
37 views

Using "screencapture" sometimes only takes screenshot of wallpaper

I have a working Python script that take screenshots of my single macOS display every minute using screencapture. The script essentially loops os.system(f'screencapture {output}.png'). Every once in a ...
antoine's user avatar
  • 103
1 vote
1 answer
25 views

Creating a Mac Distributable Printer Install script to all users that runs by double clicking only

I've been trying to find an novice-level answer to this for an embarrassing long time. New to Mac, so I'm trying to get my head around a process for these types of company wide, one and done, ...
Michael Mello's user avatar
1 vote
0 answers
20 views

How can I assign a keyboard shortcut to a process to open a Spotlight window and repopulate it specific filter(s) (eg. "Kind" == "Folder")

My current process to search for a specific directory listing uses Spotlight wth filters in a regular Finder window. I add file attribute filters to refine my search to folders only, and sometimes a ...
wide_eyed_pupil's user avatar
4 votes
3 answers
1k views

How can I have a non-elevated script execute another specific script as root without requiring a password from the user?

I have a script, let's call it on-event.sh, that's going to be run at specific times, such as when a particular application launches or quits. The script itself will run as the current user (not root) ...
Bri Bri's user avatar
  • 2,518
4 votes
0 answers
84 views

Shell script hangs when run with a shebang line

This didn't used to happen, but now when I try to execute a shell script in my path by name, it just hangs. The script: ~/bin/foo: #!/bin/sh echo this is foo My PATH: /usr/bin:/bin What happens ...
Edward Falk's user avatar
  • 1,033
0 votes
1 answer
27 views

Run Applescript by default in log mode

From AppleScript, I can run another AppleScript with set myScript to alias ((path to scripts folder as text) & "testScript.scpt") run script myScript I can also show the log window, to ...
emonigma's user avatar
  • 1,019
0 votes
1 answer
77 views

Why does my script to copy folders fail?

I need to make a local copy of everything within the iCloud Drive folder. Here is what I have so far: #!/bin/bash #make archive folder is desired location mkdir /Users/username/iCloud\ Drive\ Archive ...
jdbj's user avatar
  • 9
1 vote
0 answers
27 views

Is there an app or tool I can use to make it so that a script will run every time a certain application launches or terminates, without polling?

I want to run a simple shell script any time one of a few different applications terminate. I can identify the applications by their filename, bundle ID, or full path, so any method that can use those ...
Bri Bri's user avatar
  • 2,518
-1 votes
1 answer
47 views

Issue with running SH file [closed]

I am trying to run the file run.sh with the command sh run.sh However, I get the error of permission being denied whether I use sudo or not. shloakagrawal@shloaks-air EaglerGradle-1.0 % sudo sh run.sh ...
Buddy Agrawal's user avatar
0 votes
1 answer
51 views

How to make this script successfully trigger at a certain time?

I'm not an AppleScript coder or a technical person by any means but I have done some research and came across a solution for my problem statement. My problem statement How to make a mouse click ...
Anshu Chang's user avatar
0 votes
0 answers
16 views

Wrapper around ssh causes AppleEvent handler to fail

I have the script that I've pasted lower down in my path and named ssh. The idea is that it changes the colour of the terminal based on which host I'm ssh-ed into. This worked fine for a long time, ...
thornate's user avatar
  • 101
0 votes
1 answer
295 views

MacOS - Is there a way to automate a single mouse click at a scheduled time everyday?

I'm trying to find a way to emulate a single mouse-click and I want this action to be performed specifically at a certain time everyday (For example: 6am). It is a requirement related to my work as ...
Anshu Chang's user avatar
1 vote
0 answers
123 views

iOS feature, script or app to quickly determine who's calling based on AI search of the internet?

Most the time when I get a call from a random number, I ignore it, google it, and call them back if I recognise it’s from someone relevant. This process is annoyingly cumbersome for something I might ...
stevec's user avatar
  • 5,105
7 votes
2 answers
2k views

In Sonoma, how can I run applications in /System/Applications from the command line?

I have a shell script I sometimes use to trigger Mission Control, which is simply the following: #!/bin/sh /System/Applications/Mission\ Control.app/Contents/MacOS/Mission\ Control In macOS 13, this ...
Bri Bri's user avatar
  • 2,518
0 votes
0 answers
53 views

Creating an Apple Script to change "Show as Wallpaper" option in "Screen Saver" pane

I am working on a project, and it requires toggling the "Show as Wallpaper" option to True automatically. I've tried using my limited knowledge of Applescript and looking it up, but to no ...
HarlanCheese's user avatar

15 30 50 per page
1
2 3 4 5
52