Till per week in the past, my easy Applescript that had you merely click on on a selected coordinate on the display screen merely stopped working.
Right here is the Applescript:
inform software "System Occasions"
click on at {693, 619}
finish inform
And I automate its activation at a selected time of day with the assistance of osascript (beneficial for Applescripts) utilizing the next plist file.
Label
com.mouseclick.plist
ProgramArguments
/usr/bin/osascript
/Customers/mugenvoid/Downloads/mouseclick.scpt
StartCalendarInterval
Hour
6
Minute
10
I added this plist file to the LaunchDaemons folder of my major Library folder. It will make sure that it’s a world daemon, so it ought to have the best likelihood of all the time activating appropriately. Past that, I granted all related entry and permissions (accessibility, automation, disk entry, and so forth.) for this setup to work appropriately.
To make sure that the job masses appropriately and works, I exploit an app referred to as Launchcontrol 2. There, it all the time masses appropriately and the standing exhibits as OK.
Regardless of all these checks and balances, the script merely not clicks on the particular coordinate. It all the time labored completely advantageous till per week in the past and I have not made any modifications to this whole setup.
The Launchcontrol 2 software has some launchd(8) logs of the job triggering occasion on the designated time that I want to share. Possibly it should assist with debugging. Right here it’s:
2024-10-22 06:10:03.808584 inner occasion: WILL_SPAWN, code = 0
2024-10-22 06:10:03.808688 service state: spawn scheduled
2024-10-22 06:10:03.808692 service state: spawning
2024-10-22 06:10:03.808727 launching: xpc occasion
2024-10-22 06:10:03.810543 xpcproxy spawned with pid 28683
2024-10-22 06:10:03.810593 inner occasion: SPAWNED, code = 0
2024-10-22 06:10:03.810599 service state: xpcproxy
2024-10-22 06:10:03.810718 inner occasion: SOURCE_ATTACH, code = 0
2024-10-22 06:10:03.827675 service state: operating
2024-10-22 06:10:03.827703 inner occasion: INIT, code = 0
2024-10-22 06:10:03.827709 job state = operating
2024-10-22 06:10:03.827726 Efficiently spawned osascript(28683) as a result of xpc occasion
2024-10-22 06:10:10.104597 exited on account of exit(0), ran for 6293ms
2024-10-22 06:10:10.104617 service state: exited
2024-10-22 06:10:10.104630 inner occasion: EXITED, code = 0
2024-10-22 06:10:10.104633 job state = exited
2024-10-22 06:10:10.104665 service inactive: com.mouseclick.plist
2024-10-22 06:10:10.104681 service state: not operating
So far as I do know, I’ve checked all the things potential on my finish and I’m nonetheless dealing with this impediment. I’d actually recognize your help right here!
Condensed view of what I’ve tried thus far:
- Within the Privateness and Safety settings part, I enabled Accessibility for osascript, launchcontrol, and the script editors I used for Applescript and the plist file. See the picture connected under. Accessibility Settings
- Within the Privateness and safety settings part, beneath Automation, the mandatory entry has been granted to Osascript and the related functions. See the picture connected under. Automation settings
- I made certain the job loaded appropriately with out errors and that it was loaded as a worldwide daemon (by including the plist file to the LaunchDaemons folder in my major Library folder). See the picture connected under. Launchcontrol 2 working view
- Checked the script file and the plist file and located no syntax errors (the code used for each was shared above).
- Ran the script file from the Script Editor to verify if it really works advantageous and bought the next outcomes. See the picture connected under.
Script execution outcomes