The Msg object represents a script dialog input event message. It’s returned by the Dialog.GetMsg method which you call when running the message loop for a detached dialog.
Property Name | Return Type | Description | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<default value> |
bool |
Returns True if the message is valid, or False if the dialog has been closed (which means you should exit your message loop). |
||||||||||||||||||||||||||||||||||||||||||
buttons |
string |
Returns a string indicating which mouse button was pressed when the message was generated. Possible values are left, right and middle. |
||||||||||||||||||||||||||||||||||||||||||
checked |
int |
If the event type is checked, this indicates the check state of the item. If checkboxes are used in automatic mode, this will be the new check state of the item. In manual mode, this will indicate the existing state and it's up to you to change the state if desired. Check states are:
|
||||||||||||||||||||||||||||||||||||||||||
control |
string |
Returns the name of the control involved in the event. You can get a Control object representing the control by passing this string to the Dialog.Control method.
|
||||||||||||||||||||||||||||||||||||||||||
cx |
int |
For resize events, this property returns the new width of the dialog. |
||||||||||||||||||||||||||||||||||||||||||
cy |
int |
For resize events, this property returns the new height of the dialog. |
||||||||||||||||||||||||||||||||||||||||||
data |
int or bool |
If the event type is focus, indicates the new focus state of the control - True if the control has gained the focus, or False if it's lost it. For a combo box or list box control: If the event type is selchange or dblclk, returns the data value associated with the selected item. For a two-state check box control or radio button: If the event type is click, returns a bool indicating the current check state. For a three-state check box: If the event type is click, returns an int representing the current state. For a date/time picker control, this value will be true if a valid date is selected, or false if the date is turned off (only applies if the "Show None" property is enabled). If the event type is timer, this value indicates the number of milliseconds that have elapsed since the last time this timer was triggered. If the event type is tab, and the value property is set to filechange, this indicates which file change events occurred in the monitored tab. 1 = add, 2 = delete, 4 = change. The values will be added together (so e.g. 6 indicates at least one item was changed and at least one was deleted). For a http event, this value contains the event status code. The value property provides the same information as a keyword. For a color event from a palette control, this will be 0 for an intermediate color change (e.g. the user has the palette open and is clicking around within it) and 1 for final changes (when the palette window closes). For a custom message sent from another script, this may be the optional numeric parameter that can be sent with the message. Scripts can also send a container object like a Map and this will be found in the object property instead. |
||||||||||||||||||||||||||||||||||||||||||
dialog |
string |
Returns the name of the parent dialog. |
||||||||||||||||||||||||||||||||||||||||||
event |
string |
Returns a string indicating the event that occurred. Currently defined events are:
|
||||||||||||||||||||||||||||||||||||||||||
focus |
bool |
Returns True if the control had focus when the message was generated. |
||||||||||||||||||||||||||||||||||||||||||
index |
int |
Returns the current selection index for a combo box, list box or tab control. |
||||||||||||||||||||||||||||||||||||||||||
mousex |
int |
Returns the horizontal position of the mouse cursor when the message was generated. |
||||||||||||||||||||||||||||||||||||||||||
mousey |
int |
Returns the vertical position of the mouse cursor when the message was generated. |
||||||||||||||||||||||||||||||||||||||||||
name |
string |
An alias for the control property. |
||||||||||||||||||||||||||||||||||||||||||
object |
variant |
For a drop event, this property returns a Vector of Item objects, representing the files that were dropped onto your dialog. For a custom message sent from another script, this may be the optional container object (e.g. a Map) that can be sent with the message. Scripts can also send a numeric parameter and this will be found in the data property instead. For a date/time picker control, this property returns a Date object when a new valid date is chosen. |
||||||||||||||||||||||||||||||||||||||||||
qualifiers |
string |
Returns a string indicating the qualifier keys (if any) that were held down when the message was generated. The string can contain any or all of the following: shift, ctrl, alt, lwin, rwin If no qualifiers were down, the string will be: none |
||||||||||||||||||||||||||||||||||||||||||
result |
bool |
Returns True if the message is valid, or False if the dialog has been closed. |
||||||||||||||||||||||||||||||||||||||||||
tab |
string |
For a dialog tab control, returns the name of the parent tab (if the control is on a dialog that's inside a tab control). If the event type is tab, this returns a Tab object representing the monitored tab that the event occurred in. Calling this repeatedly may be inefficient. |
||||||||||||||||||||||||||||||||||||||||||
value |
string |
For the dblclk, editchange and selchange events, returns the current contents of the edit field (or selected item label). For the tab event, indicates which event occurred in the monitored tab. Possible values are select, navigate, filechange, activate, srcdst, view, flat, and close (sent if the tab is closed while you are monitoring it). For the drag event, this indicates which button is being used to drag (left or right). For a click event from a markup text control, this indicates the ID of the clicked link. For a http event, this indicates the current http status code. For a color event from a palette control, this will be the selected color as either a hex or decimal string (depending on the control property). If the palette button's checkbox is disabled, this will be prefixed by a ! character. For a date/time picker control, this returns the textual value of the selected date or time. The object property returns a Date object, which may be more useful. |