swapping between standalones on windows

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
gmccarthy
Posts: 62
Joined: Sat Feb 17, 2007 4:56 am
Location: Australia

swapping between standalones on windows

Post by gmccarthy » Sun Apr 22, 2007 5:29 am

MAC OS X IS FINE
Standalone applications on the mac that are minimized are brought to the front out of the dock when a launch command referring to that standalone is sent by another standalone. This is good. The launch command can be used to move from one standalone to another that are minimized in the dock

WINDOWS PROBLEM
Standalone applications on windows that are minimized are not brought to the front maximized out of the task bar when a launch command referring to that standalone is sent by another standalone. Rather a second instance of the standalone is launched instead.

I haven't been able to swap between standalone applications on windows that have been minimized to the taskbar.

My programs can not use the pv.exe mentioned elsewhere in this forum, since it is not installed and will not be able to be installed on the computers that the standalones run on.

Does any one have a method I can use?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5147
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sun Apr 22, 2007 11:02 am

Dear gmccarthy,

Use the relaunch message. From the docs:

After having launched an application, upon launching a successive instance the Revolution engine will send a relaunch message to the first stack of the application.

Description:
The relaunch message implements support for "single instance applications" on Windows. This means that if you launch an instance of your application, a successive launch will send a message to the existing instance.

It can be used in the following three ways:
1. If the message is passed, then the new instance continues running.
2. If "background" is returned, then the new instance is terminated.
3. If nothing is returned but the message is not passed, then the new instance is terminated and the existing instance's "defaultStack" is made the foreground window.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

gmccarthy
Posts: 62
Joined: Sat Feb 17, 2007 4:56 am
Location: Australia

Use the relaunch message

Post by gmccarthy » Sun Apr 22, 2007 11:53 am

Thanks Mark

gmccarthy

Post Reply

Return to “Windows”