GetButtonPressed

From the Fallout3 GECK Wiki
Revision as of 14:44, 26 November 2008 by imported>Kkuhlmann
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description

GetButtonPressed is used to determine which button has been selected after a message box has been displayed using ShowMessage.

Syntax:

GetButtonPressed 

Example:

set buttonVar to GetButtonPressed 

The first time this is called after a ShowMessage button has been pressed, it returns the button number (0 indicates the first button, 1 the second, etc.). At all other times it returns -1.


Notes

  • This will only react to a ShowMessage call from within the same script.
  • The button indices are based on the total number of buttons on the Message, even if some of the buttons on the message are not being displayed (because buttons can be conditionalized). So if a Message has 3 buttons, GetButtonPressed will return 2 when the last one is pressed even if that is the only button actually being displayed.

See Also

ShowMessage