Comments on: AppleScript: Workspace-based App Launcher http://apple.blogoverflow.com/2011/10/applescript-workspace-based-app-launcher/ Ask Different - answers for your Apple questions Tue, 01 Mar 2016 11:50:43 +0000 hourly 1 https://wordpress.org/?v=4.5.6 By: Friso http://apple.blogoverflow.com/2011/10/applescript-workspace-based-app-launcher/#comment-180909 Fri, 17 Jan 2014 20:21:30 +0000 http://apple.blogoverflow.com/?p=437#comment-180909 After all these years: still a great introduction to Applescript. I learned: – the power of telling applications simple things – usefull scripting techniques (generating and interacting with lists) – how I can automate the boring task of setting up my workspaces on every clean restart Thanx!

]]> By: Conrad Goodwin http://apple.blogoverflow.com/2011/10/applescript-workspace-based-app-launcher/#comment-8320 Mon, 06 Aug 2012 18:58:45 +0000 http://apple.blogoverflow.com/?p=437#comment-8320 So it didn’t retain for formatting, lovely. I’m not sure how to post it properly, is [code][/code] enabled?

]]> By: Conrad Goodwin http://apple.blogoverflow.com/2011/10/applescript-workspace-based-app-launcher/#comment-8319 Mon, 06 Aug 2012 18:57:23 +0000 http://apple.blogoverflow.com/?p=437#comment-8319 Hii, I’m completely new to Mac and have been looking at making my own app in XCode that could launch shell scripts for terminal commands I couldn’t be bothered to look up every time (such as show/hide dashboard). Anyway turns out it’s MUCH harder than I thought, and now I’ve stumbled upon your script here I’ve tried it out and it does everything that I wanted (more or less) however I get an error “Connection Invalid” when it runs, even though it works fine.

Here’s a paste of the code:

— Set Up Workspaces set workspaces to {} set workspaces to workspaces & {{name:”Show Dashboard”, apps:{“Show Dashboard”}}} set workspaces to workspaces & {{name:”Show Desktop Items”, apps:{“Show Desktop Items”}}} set workspaces to workspaces & {{name:”Show Full Path”, apps:{“Show Full Path”}}} set workspaces to workspaces & {{name:”Show Hidden Files”, apps:{“Show Hidden Files”}}} set workspaces to workspaces & {{name:”Hide Hidden Files”, apps:{“Hide Hidden Files”}}} set workspaces to workspaces & {{name:”Hide Dashboard”, apps:{“Hide Dashboard”}}} set workspaces to workspaces & {{name:”Hide Desktop Items”, apps:{“Hide Desktop Items”}}} set workspaces to workspaces & {{name:”Hide Full Path”, apps:{“Hide Full Path”}}}

— Generate List of Workspace Names set spaceNames to {} repeat with aSpace in workspaces set spaceNames to spaceNames & name of aSpace end repeat

— Ask Which Workspace set whichSpace to choose from list spaceNames with prompt “Which script do you need?”

— Load That Workspace repeat with aSpace in workspaces if name of aSpace = (whichSpace as text) then repeat with anApp in apps of aSpace tell application anApp to activate end repeat end if end repeat

The apps are in the same directory. Thanks if you can provide any help.

]]>
By: Nathan Greenstein http://apple.blogoverflow.com/2011/10/applescript-workspace-based-app-launcher/#comment-61 Fri, 21 Oct 2011 17:32:46 +0000 http://apple.blogoverflow.com/?p=437#comment-61 Unfortunately, that’s the nature of tell application ... to activate.

I’ve looked for a way to launch apps without waiting for completion, but haven’t seen a pure AppleScript way yet.

If you’ve seen one, I’d love to hear about it 🙂

]]>
By: daviesgeek http://apple.blogoverflow.com/2011/10/applescript-workspace-based-app-launcher/#comment-60 Fri, 21 Oct 2011 16:48:41 +0000 http://apple.blogoverflow.com/?p=437#comment-60 That’s pretty cool! I have one question, though. Why does it wait until the first application is completely loaded to open the second application?

]]>