jellis Posted May 18, 2016 Share Posted May 18, 2016 If I use Alfred to search for and invoke an AppleScript file in v3, the script runs twice. For example, I have a script that opens a new Safari window. With Alfred v2, the script produced one browser window. Running the same script using Apple's Script Editor produces only one window. With Alfred v3, however I get two windows. I see this issue with my other AppleScripts as well. Here's the "New Safari Window" script (saved as a .scpt file): tell application "Safari" make new document activate end tell Alfred version: 3.0 [645] OS X 10.11.5 (15F34) Thanks for the great product! Very happy with v3 so far! Link to comment Share on other sites More sharing options...
hansino Posted May 22, 2016 Share Posted May 22, 2016 I seem to have approximately the same problem with a similar AppleScript. But this is related to an Alfred Workflow. (Hotkey + Launch File Action.) The entire AppleScript contents are added below. When I run the script from the Script Editor, it opens two Finder windows and set the proper bounds and positions. As expected. With Alfred 3, however, it runs the script twice. It didn't occur with Alfred 2. Running: Alfred version: 3.0 [645] OS X 10.11.5 (15F34) Otherwise, I agree: Alfred 3 is an utterly great product! Best regards, Hans Trygve Jensen ======= The Script: ====== tell application "Finder" activate -- Uppermost window make new Finder window select Finder window 1 set current view of window 1 to column view set toolbar visible of window 1 to true set sidebar width of the front Finder window to 172 set target of front Finder window to home set position of Finder window 1 to {1, 44} select Finder window 1 set bounds of Finder window 1 to {1, 22, 1100, 440} --Bottommost window make new Finder window select Finder window 1 set current view of window 1 to column view set toolbar visible of window 1 to true set sidebar width of the front Finder window to 172 set target of front Finder window to startup disk set position of Finder window 1 to {1, 464} select Finder window 1 set bounds of Finder window 1 to {1, 442, 1100, 860} end tell Link to comment Share on other sites More sharing options...
Andrew Posted May 24, 2016 Share Posted May 24, 2016 If I use Alfred to search for and invoke an AppleScript file in v3, the script runs twice. For example, I have a script that opens a new Safari window. With Alfred v2, the script produced one browser window. Running the same script using Apple's Script Editor produces only one window. With Alfred v3, however I get two windows. I see this issue with my other AppleScripts as well. Thanks for spotting this! I'll definitely get this one fixed for the next release! Cheers, Andrew Link to comment Share on other sites More sharing options...
Haprog Posted May 30, 2016 Share Posted May 30, 2016 I just made my first hotkey in an Alfred Workflow to execute an AppleScript that toggles one setting on/off ("Use all F1, F2, etc. keys as standard function keys") and for a while I was wondering why it doesn't seem to work, until I found this. So basically now every time I hit the hotkey, nothing changes, since the setting is immediately toggled back because the script is run twice. Hopefully the bugfix release for this is coming soon. Link to comment Share on other sites More sharing options...
Vero Posted May 30, 2016 Share Posted May 30, 2016 I just made my first hotkey in an Alfred Workflow to execute an AppleScript that toggles one setting on/off ("Use all F1, F2, etc. keys as standard function keys") and for a while I was wondering why it doesn't seem to work, until I found this. So basically now every time I hit the hotkey, nothing changes, since the setting is immediately toggled back because the script is run twice. Hopefully the bugfix release for this is coming soon. As per the update topic title, it was updated in build 655 - If you'd like to update to that build and help us test the pre-release, go to the Update tab in Alfred, and choose "pre-releases" from the dropdown menu. You'll then be able to update to the latest build (currently 670) which includes this fix. If you're not keen on the more regular updates, you can revert to "updates" instead of "pre-releases" in the dropdown to return to just the general releases. Cheers, Vero Link to comment Share on other sites More sharing options...
mikedvzo Posted May 30, 2016 Share Posted May 30, 2016 I ran into a similar issue when I called an Applescript that invokes Cisco Anyconnect with automation with Launch Program. I have been using this workflow for years. However now when I run the script Alfred 3 stays in focus the entire time now and last time I ran it the VPN was connected and Alfred 3 hung and would not come back. I eventually was forced to reboot as I could not kill Alfred 3 as a non admin user in Activity Monitor. I did not attempt to kill the Alfred process as an Admin user but if it happens next time I will. Usually if I launch the workflow again the script checks to see if there is a current session and asks you to disconnect or continue. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now