-- FNMERGE <Path> <Filename> [<Extension>]
.....Merges a path, base filename and extension into a single, complete file path
-- IQGetMsgID [<ID>]
.....Pops an Input Message from the queue and loads the variable with the Msg ID
-- IQPeekMsgID
.....Peeks (doesn't remove it from the queue) at an Input Message from the queue and loads the variable with the Msg ID
-- IQPeekStrength
.....Peeks (doesn't remove it from the queue) at an Input Message from the queue and loads the variable with the Msg Strength
-- IQPeekShiftStrength
.....Peeks (doesn't remove it from the queue) at an Input Message from the queue and loads the variable with the Msg Shift Strength
-- IQPeekCtrlStrength
.....Peeks (doesn't remove it from the queue) at an Input Message from the queue and loads the variable with the Msg Ctrl Strength
-- IQPeekAltStrength
.....Peeks (doesn't remove it from the queue) at an Input Message from the queue and loads the variable with the Msg Alt Strength
-- IQGetMsgCount
.....Loads the variable with the number of input messages waiting on the Input Queue
-- UIGetEvtCount
.....Loads the variable with the number of UI Event messages waiting on the Input Queue
IQClear
....Clear the Input Queue of messages
IQTable <name>
....Sets the translation table to the named translation table (as defined in the internal.xml or MXM.xml files)
IQPushMsg <ID> <Str> <ShftStr> <CtrlStr> <AltStr>
....Allows you to push a message onto the Input Queue
IQWaitMsg [<MsgID> [...<MsgID>]]
....Waits for a message matching one or more Msg IDs
ReconfigUIObject <Handle>
....Forces the dialog with the given handle to refresh it's configuration (mostly not needed)
Why is it not needed? Because if you use the dialog handle to set XML values in the dialog config, it will force the dialog to refresh anyway.UIQClear
....Clears the UI Event Message Queue
UIQGetEvent
....Pops a UI Event Message from the UI Event Message queue
UIQPeekEvent
....Peeks (does not remove the message form the queue) at a UI Event Message on the UI Event Message queue
Thanks alot.
When is the UI event queue needed? AFAIK, each event is triggered instantaneously.
For modeless dialogs

You might want to monitor the queue if you were displaying a progress dialog, for example.
as far as $ScriptPath$ goes, if you are just wanting the path to the currently running script, try this...