Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem Determing which window has opened
#1
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

Code:
Copy      Help
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)
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

Code:
Copy      Help
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)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)