Launch Windows App From OSX Dock - Working!

Discussion in 'Parallels Desktop for Mac' started by misterjangles, Dec 3, 2006.

  1. misterjangles

    misterjangles Member

    Messages:
    97
    I was playing around with coherence mode and thought it might be pretty interesting to totally hide the windows taskbar and launch windows apps from the OSX dock.

    I created a simple proof of concept system that actually works. You can download it to try it out yourself here: http://www.verysimple.com/blog/?p=67

    This is by no means pretty, but it does work. I can see that Parallels might be headed in this direction of making Windows transparent. For now though, this is an interesting way to control Windows through OSX.

    I don't know how much more time I can put into this , but if anyone is interested, I'm open to ideas and suggestions. I included all the source code as well in case anyone is motivated to take this a step further.
     
    Last edited: Dec 3, 2006
  2. misterjangles

    misterjangles Member

    Messages:
    97
    Does anybody know is there an equivilant for OSX to the way .vbs files work in windows - that is just a simple text script that you can edit with textedit and then double-click to run?

    I would have thought that's what applescript would do, but it seems when you click on them the default is that they open in the script editor. If you want to run them you have to compile it.
     
  3. ehurtley

    ehurtley Member

    Messages:
    47
    Well, you can use UNIX shell scripting, but that's not very pretty.

    If you want to easily execute AppleScripts, turn on the AppleScript menu (it's in the AppleScript Editor preferences,) then it will show your ~/Library/Scripts folder contents in a little menu up in the notification area. It even separates scripts by application, and only shows scripts appropriate to the app you're currently in.

    However, if you want specifically double-clickable scripts, you must compile them.
     
  4. chucker

    chucker Junior Member

    Messages:
    19
    You could wrap AppleScript inside a shellscript using osascript ;) That would avoid the need to have it precompiled.
     
  5. Delphyne

    Delphyne Member

    Messages:
    51
    Or, you could just compile the script and edit it using the script editor.
     
  6. mgorbach

    mgorbach Member

    Messages:
    22
    coool!
    Parallels, with the access to the parallels tools and API, can do this even more elegantly.
    They can have parallels tools and a context menu item that shows up for start menu shortcuts called "add to dock" which will copy the icon and add it. Wouldn't be very hard. They can even have parallels tools suspend/resume the machine when that individual app is closed if they wanted to.
     
  7. misterjangles

    misterjangles Member

    Messages:
    97
    Thanks!

    I figured out that you can do it with shell scripts by just renaming them with a .command extention. But it leaves the terminal window open after it runs. The .term files let you run a terminal script on startup and then exit, which works a little better.

    So it seems like AppleScript might be the best way to go for a totally slick looking icon that runs a command.
     
  8. misterjangles

    misterjangles Member

    Messages:
    97
    hey mgorbach - i'm with you. Obviously the parallels tools already have this communication between the two operating systems.

    I was thinking it would be cool when an app is launched to monitor the process id or something and on the OSX side it can know that the app is open - or even have access to that app through the process ID. As an example, the Apple doc icon could indicate visually that the app is running just like it would with a regular OSX app. And if you click it again, it could bring the window to focus.
     
  9. Dezro

    Dezro Bit poster

    Messages:
    7
    Parallels could make it so that dragging Windows shortcuts out turns them into magical inter-OS shortcuts. Or dragging items that are not shortcuts while holding a key combination. And if it's really cool, it can retain whatever icon it had in Windows. And you can have the protocol work in Linux and FreeDOS and OS/2 and whatever, too!

    Okay, now I'm dreaming.
     
  10. bamsaleg

    bamsaleg Member

    Messages:
    27
    I agree, this is something for Parallels team to look for.

    Actually, VPC add a start menu in the Dock, and when a PC app was laounch, it's icon was also bouncing in the doc.

    You could ALT Tab between a Mac app and a PC App this way with Coherence mode...

    Whaoo..
     
  11. misterjangles

    misterjangles Member

    Messages:
    97
    Dragging a shortcut from Windows to OSX and having it work as an app launcher - that would be a really awesome idea!

    If Parallels provided a hook into their API with events like OnDragComplete or something, that would let us start writing plugins to do crazy stuff!
     
  12. chrisp

    chrisp Member

    Messages:
    29
    You can launch an Applescript with Automator. Just open Automator and in the library click the Applications/Automator item. There is an Action to launch an Applescript. When you save make sure you select the Application type. Then when you double click the Automator file it will run your script and exit.
     

Share This Page