03-23-2009, 09:31 PM
Here is my final code in case it helps anyone
Macro
I realized that the two different buttons I was needing to press in the different cases were in the same location in the window so i used the function not based on name of the accessible object but based on location.
Macro
int w4=win("Import Photos" "Afx:00400000:*" "" 0x800)
if (w4)
,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)
,,Acc e=acc("" "PUSHBUTTON" win("Problem with Importing Files" "Afx:00400000:*" "" 0x800) "Button" "" 0x1100 550 293)
,,e.DoDefaultAction
,,1
,,err-
,,Acc f=acc("Import" "PUSHBUTTON" win("Import Photos" "Afx:00400000:*" "" 0x800) "Button" "" 0x1001)
,,f.DoDefaultAction
,,err+
I realized that the two different buttons I was needing to press in the different cases were in the same location in the window so i used the function not based on name of the accessible object but based on location.