Hey all,
I'm using System Wake as a trigger to run a macro which need access to app-specific menus items.
The trigger works great, however it seems that my Pause Until (menu condition) rules aren't being obeyed.
When I wake my Mac (prior to inputting password) the macro runs but I would like to wait until I've submitted my password. Based on my testing, submitting password on wake is not equal to the At Login trigger(?).
I tried pause until menu item exists: "About This Mac" but KM doesn't seem to have access to the system toolbar menu? I've also tried pausing until the menu item I want to interact with exists, but that doesn't seem to find it if the macro begins running before I've typed my password.
As-is I'm using a Pause Until Found Image, then watching for the Mac toolbar Apple icon. That's contained inside an iterative loop to account for taking a long time in between wake and password submit. In essence, it starts running, checks for Apple icon then waits 2 seconds before checking agin for the icon, with a max of 30 seconds of total looping. Once it's found, it proceeds outside the loop.
This works but I'm hoping there's a more concrete way of checking that my Mac is awake AND new session logged-in. Can AppleScript detect this state perhaps?
Thanks in advance for your thoughts!