vanclute Posted April 2, 2016 Share Posted April 2, 2016 Not sure what's going on here but it's driving me nuts. Recently one of my workflows has stopped working. It's a shortcut that launches an AppleScript that pops a dialog asking if I'm sure I want to launch whatever application I'm launching, to make me think before I reflexively launch certain apps throughout the day. I use this same script with only a change to the name of the app, for about 20 apps and it works perfectly on all of them, except Skype (and only recently stopped working). Now if I hit my shortcut (and I can change the shortcut, it doesn't make a difference), the current window loses focus, but Skype does not launch. However if I launch Skype manually, then the shortcut does work and shows/hides Skype as expected. I don't think it matters but here's the AS code: on alfred_script(q) set appName to "Skype" set appID to id of application appName if application id appID is not running then if button returned of (display dialog "Are you sure you want to launch " & appName & "?") is "OK" then tell application id appID to activate tell application id appID to activate else tell application "System Events" set frontid to bundle identifier of the first process whose frontmost is true end tell if frontid is appID then tell application "System Events" set visible of first process whose bundle identifier is appID to false end tell else tell application id appID to activate end if end if end alfred_script It works for all my other apps, and worked with Skype too until last week some time. Any ideas anyone? Link to comment
vanclute Posted April 5, 2016 Author Share Posted April 5, 2016 No ideas from anyone? Still happening, but only Skype... so weird. Link to comment
Vero Posted April 6, 2016 Share Posted April 6, 2016 No ideas from anyone? Still happening, but only Skype... so weird. Have you taken a look at the metadata for Skype to see whether it's changed name in a recent update? Here's how you can do an mdls on a file: https://www.alfredapp.com/help/troubleshooting/indexing/mdls/ Unfortunately, I can't help you with the AppleScript, but I'm guessing that if it's working fine for all other apps, it's likely to be the Skype app name or something along those lines. Let us know how you get on Cheers, Vero Link to comment
vanclute Posted April 6, 2016 Author Share Posted April 6, 2016 Great tip Vero, thanks! Will check into it now. I had a similar thought. Link to comment
vanclute Posted April 6, 2016 Author Share Posted April 6, 2016 Well that was a bust. kMDItemDisplayName = "Skype" Nothing fancy. Plus, the shortcut DOES work as long as Skype has already been launched, so I suppose this was never likely to be the problem anyway. It's only an issue with launching. For now I have to always launch Skype manually, but from there I can use my shortcut to show/hide it. Very strange. Any other thoughts from anyone? Link to comment
vanclute Posted May 8, 2016 Author Share Posted May 8, 2016 Totally inexplicable, but all of a sudden today the shortcut is launching Skype. No idea why... I did just reboot, but I've done that many times since starting this thread. Go figure! Link to comment
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