Hi guys, That is my code MariusN is quoting, so I hope you do not mind me butting in! You can find out about $GUI_RUNDEFMSG on the Help file page for GUIRegisterMsg. Basically it allows AutoIt to run it's internal handler for a message once you have finished with it. If you do not want the internal handler to run, just Return 0. The $fDblClk was an internal flag in the script, so you will find no reference in the Help file! I often use flags in the message handlers because of this warning (from the same page in the Help file: "Warning: blocking of running user functions which executes window messages [...] can lead to unexpected behavior, the return to the system should be as fast as possible !!!" So rather than run a long function in the message handler itself, I use it to set a flag to "True" and then run the function from my While...WEnd loop (I ususally use GetMessage mode so there is always one about somewhere!) using something like this: If $fFlag = True Then
$fFlag = False ; to prevent it running every time!
Function()
EndIfI hope that is clear. Please ask if you are still unsure about anything. M23