03-23-2009, 05:40 PM
I am trying to create a check to see which of several windows has opened. The second window check is returning strange results. Here is my code
If the window is the "Problem with Importing Files" option, the message that is returned is "0,1052278". The second number is not always the same but always large. If the window is the "Import Photos" option, the message returned is "0,0".
In both cases the buttons are not activated.
I also tried this code with the same results
int w4=win("Import Photos" "Afx:00400000:*" "" 0x800)
int w5=win("Problem with Importing Files" "Afx:00400000:*" "" 0x800)
if (w4=1)
Acc d=acc("Import" "PUSHBUTTON" win("Import Photos" "Afx:00400000:*" "" 0x800) "Button" "" 0x1)
d.DoDefaultAction
else if (w5=1)
Acc e=acc("OK" "PUSHBUTTON" win("Problem with Importing Files" "Afx:00400000:*" "" 0x800) "Button" "" 0x1001)
e.DoDefaultAction
mes("%i,%i" "" "" w4 w5)
In both cases the buttons are not activated.
I also tried this code with the same results
int w4=win("Import Photos" "Afx:00400000:*" "" 0x800)
if (w4=1)
Acc d=acc("Import" "PUSHBUTTON" win("Import Photos" "Afx:00400000:*" "" 0x800) "Button" "" 0x1)
d.DoDefaultAction
else
int w5=win("Problem with Importing Files" "Afx:00400000:*" "" 0x800)
if (w5=1)
Acc e=acc("OK" "PUSHBUTTON" win("Problem with Importing Files" "Afx:00400000:*" "" 0x800) "Button" "" 0x1001)
e.DoDefaultAction
mes("%i,%i" "" "" w4 w5)