relaunch | |||||||
Type | message | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Associations | stack | ||||||
Summary | After having launched an application, upon launching a successive instance the LiveCode engine will send a relaunch message to the first stack of the application. | ||||||
Introduced | 2.7.3 | ||||||
OS | windows | ||||||
Platforms | desktop, server | ||||||
Parameters |
| ||||||
Example |
| ||||||
Related | Keyword: $ Message: startup | ||||||
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:
If there are no existing instances, the new instance will run. The relaunch message is passed a variable number of arguments depending on the command-line the new instance is started up with. The processing is the same that is performed for the $n global variables before application startup. i.e. the command-line string is split into words, each word has any leading and trailing quotes stripped and '\' is replaced by '/'. A basic example stack demonstrating the relaunch command can be found in the Resources/Examples folder within this LiveCode distribution folder.
|