sbmpost / AutoRaise

AutoRaise (and focus) a window when hovering over it with the mouse
GNU General Public License v3.0
1.42k stars 60 forks source link

Can't enable/disable auto raise from Alfred Sonoma 14.4.1 #197

Closed JosefGvirt closed 5 months ago

JosefGvirt commented 5 months ago

Hey guys first of all an amazing app kudos! I am running mac os sonoma 14.4.1 (latest) and I tried to bind a apple script for a keyword trigger in alfred and pasted your script in readme page with .app extension at the end of path.

for some reason the script doesnt work after envoking the keyword.

here's the script:

on run {input, parameters} tell application "Finder" if exists of application process "AutoRaise" then quit application "/Applications/AutoRaise.app" display notification "AutoRaise Stopped" else launch application "/Applications/AutoRaise.app" display notification "AutoRaise Started" end if end tell return input end run

sbmpost commented 5 months ago

@JosefGvirt

Are you using the precompiled binary from AutoRaise.dmg or compiling AutoRaise.app yourself? The binary inside the dmg is the UI version which allows you to set a keyboard shortcut to enable/disable. The provided AppleScript should also be able to start/stop the UI version. But having the keyboard shortcut option available makes it a bit redundant. If you are compiling AutoRaise.app yourself, and use focusFirst = 1 (see your ~/.AutoRaise configuration file), then maybe you haven't provided the EXPERIMENTAL_FOCUS_FIRST flag during compilation. Another thing to check for is that sometimes on MacOS Accessibility rights seem to be enabled, whereas in reality this is not true. To be absolutely sure, in Accessibility settings, find the "AutoRaise" entry and click the minus to get rid of it. Then trigger the script and the entry should reappear. I attached a screenshot which shows you how I am testing this myself from within Automator, see below:

Screenshot 2024-04-02 at 10 07 57

sbmpost commented 5 months ago

@JosefGvirt

I am about to close this issue. I hope the above explanation helps.