Long shot: Script to change desktop when application is launched

Discussion in 'Mac Apps and Mac App Store' started by Ben Kei, Mar 26, 2009.

  1. Ben Kei macrumors regular

    Joined:
    Oct 30, 2002
    Location:
    London UK
    #1
    I know this is a long shot but does anyone know of a script (or fancy trying to write one!) that will change a desktop pattern when you launch a particular app.

    Basically I'd like to have a couple of desktop patterns with all the shortcut keys for particular apps but don't want them up all the time, only when I'm using that app.
    Ideally, quitting the app would return to the normal desktop pattern.

    I'm no good with scripting or I'd give it a shot myself.

    Thanks,
    Ben
     
  2. ergdegdeg Moderator emeritus

    ergdegdeg

    Joined:
    Oct 13, 2007
  3. Ben Kei thread starter macrumors regular

    Joined:
    Oct 30, 2002
    Location:
    London UK
    #3
    Thanks! I'll take a look now.
     
  4. Ben Kei thread starter macrumors regular

    Joined:
    Oct 30, 2002
    Location:
    London UK
    #4
    Just had a look at Marco Polo and it says it can change desktop patterns but the actual help files are really sparse on any useful information.

    Think I'll give that a miss, I can see myself ploughing loads of time into it and not necessarily getting what I want from it.

    Cheers anyway
     
  5. ergdegdeg Moderator emeritus

    ergdegdeg

    Joined:
    Oct 13, 2007
    #5
    Once you understand the concept it's really easy to use.

    Basically, you create a context for each desktop pattern/application you want to use. Then you select "RunningApplication" under "Evidence sources" so MarcoPolo knows what to look for.
    Then go to "Rules". Now create a rule for every desktop pattern like this:
    Click the plus, "Add RunningApplication Rule", select the desired app from the list (it has to be running at the moment, though), then select the matching context and set the confidence to 100%.
    Under actions, click the plus, "Add DesktopBackground Action" and then choose the machting desktop pattern. Choose the matching context and "on arrival". This should be enough. You can also define a desktop pattern for when you quit an app.
     
  6. aidricksdad macrumors regular

    aidricksdad

    Joined:
    Dec 29, 2008
    Location:
    Round Rock
    #6
    download spacesuite http://www.macupdate.com/info.php/id/29876/spacesuit

    you can set different wallpapers to different spaces
    then go to system perfs. / spaces and tell whatever app you want to start on that space

    i have handbrake/transmision/isquit and that kinda junk on one space so my wife cant go mukking it all up
     
  7. Ben Kei thread starter macrumors regular

    Joined:
    Oct 30, 2002
    Location:
    London UK
    #7
    Thanks so much for talking me through it.
    I'll give it a step by step try in a minute.

    Much appreciated.

    @ aidrickdad - I'm on 10.4 otherwise I'd go with a spaces option.
    Thanks anyway.

    Ben
     
  8. yippy macrumors 68020

    yippy

    Joined:
    Mar 14, 2004
    Location:
    Chicago, IL
    #8
    This sounds like something you may be able to do with automator. You could make a script that changes the desktop pattern and then launches the app. As long as you double click the script to launch the app this should work. The only thing is I don't know how well it will change it back when you are done.
     
  9. Ben Kei thread starter macrumors regular

    Joined:
    Oct 30, 2002
    Location:
    London UK
    #9
    I've just gone through this and have it set like this:

    Context: Logic
    Evidence Sources: RunningApplication (nothing else selected)
    Rules: Logic Pro - confidence 100%
    Actions: parameter = the desktop I want when Logic is running, description = empty, context = Logic (on arrival) delay = none enabled is ticked.
    Actions: parameter = the desktop I want when logic isn't running, descrition = empty, context = Logic (on departure) delay = none, enables is ticked.
    Advanced: I understand is ticked

    But it's not doing anything.
    I have the Logic context chosen in the 'Force context' menu, is there anything else I need to do?

    Cheers for the help!
     
  10. ergdegdeg Moderator emeritus

    ergdegdeg

    Joined:
    Oct 13, 2007
    #10
    Try relaunching Logic Pro. It should work automatically without manually selecting a context.
     
  11. Ben Kei thread starter macrumors regular

    Joined:
    Oct 30, 2002
    Location:
    London UK
    #11
    I've got the background changing if I force the context to change.

    What I can't figure out is how to change the context automatically when Logic is launched.

    As it is now it stays on the Automatic context even after Logic is launched.

    I'm going back to scan the help files again...

    your help is really appreciated! I'm half way there.
     
  12. Ben Kei thread starter macrumors regular

    Joined:
    Oct 30, 2002
    Location:
    London UK
    #12
    Right!

    Well I've got it switching my background (and the context to my Logic context)
    But it's not switching back to my Automatic context when I quit logic.

    I'll keep poking about but any help is greatly appreciated.

    And massive thanks for the heads up on Marco Polo! Looks like it could be really helpful.
     
  13. Ben Kei thread starter macrumors regular

    Joined:
    Oct 30, 2002
    Location:
    London UK
    #13
    Sorted!

    Just needed to set the Automatic profile as a default and it switches back when it's done.

    Thanks ergdegdeg!
     
  14. ergdegdeg Moderator emeritus

    ergdegdeg

    Joined:
    Oct 13, 2007
    #14
    Good that you sorted it out on your own :) I love MarcoPolo myself. Sorry I didn't reply but I was in bed (European time zone ;) ).
     
  15. Ben Kei thread starter macrumors regular

    Joined:
    Oct 30, 2002
    Location:
    London UK
    #15
    No problem at all, your help was invaluable!

    Thanks again,
    Ben
     

Share This Page