Launch Windows App From OSX Dock - Working!

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

  1. misterjangles


    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:

    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


    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


    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


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


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


    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



    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


    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


    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


    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...

  11. misterjangles


    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


    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