event.commandLineArgs

Type Array
Event system
Revision Release 2024.3703
Keywords system, commandLineArgs
See also event.commandLineDir

Overview

An array of strings representing command line arguments that were given to subsequent launches of a single-instance-only Win32 desktop app that is already running. This property only exists when event.type is "applicationOpen".

If a Win32 desktop app is set up to be single-instance-only in its build.settings file (reference), subsequent launches of the app will bring the first instance's window to the front of the desktop instead. If any command line arguments were provided to the second instance, its arguments are delivered to the first instance via an "applicationOpen" typed system event via this property.

Note

This property is only supported by Win32 desktop apps. It will be an empty array on all other platforms when event.type is set to "applicationOpen".

Gotchas

An "applicationOpen" typed system event will not be dispatched: