My code works fine with an msgbox, but not at all without it. Here is what I think is occuring. When you click on an altsubmit listview A_GuiControlEvent "I" occures before A_guiControlEvent "Normal", but my code does not work with "I" getting called first, because on "I" a very large number of variables get changed that are needed for the functions that get called on "normal". Therefore I need "normal" to occure before "I". By putting an msgbox, it makes the thread for "I" immediately interruptable, so that "normal" inturrupts "I" and is then able to run its course before "I" messes with it's variables. At least, this is my theory.
Code that doesn't work.
Code:
Gui, 13:Add, ListView, x26 y40 w430 h480 +altsubmit vABook gLVRules, Name|Address
LVRules:
if A_GuiControlEvent=I
{
RUNS A BUNCH OF FUNCTIONS....
}
if (A_GuiControlEvent="Normal" or A_GuiControlEvent="RightClick")
{
RUNS A BUNCH OF Other FUNCTIONS....
Code that works great every time, except that you see an msgbox flash on the screen.
Code:
Gui, 13:Add, ListView, x26 y40 w430 h480 +altsubmit vABook gLVRules, Name|Address
LVRules:
if A_GuiControlEvent=I
{
msgbox,,,problem fixer,0.001
RUNS A BUNCH OF FUNCTIONS....
}
if (A_GuiControlEvent="Normal" or A_GuiControlEvent="RightClick")
{
RUNS A BUNCH OF Other FUNCTIONS....