Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] save as dialog is hard to automate
#8
Good news: I found a fix
Bad news: I still don't understand why the fixes were needed. I commented the code in case this helps in the future.

Macro save pages at domain info - works - finally2
Code:
Copy      Help
spe 200

int i
int w=win("" "Mozilla*WindowClass" "" 0x4)
act w


'Af             ;; Alt+F
'a              ;; "a"
1

int w1=win("Save As" "#32770")
act w1

spe 300

0.5
;pick filename area
Acc a.Find(w1 "TEXT" "File name:" "class=Edit[]state=0x100000 0x20000040" 0x1005 2)

0.5
;pick save button
Acc a1.Find(w1 "PUSHBUTTON" "Save" "class=Button[]id=1" 0x1005 2)


clo

for i 2 70
,act w

,0.5
,
,'Cl ;;go to address bar
,spe
,'F"http://domain.info/page/{i}.aspx"
,'Y ;;enter
,
,7
,
,'Af             ;; Alt+F
,'a              ;; "a"
,1
,
,;I made this work by doing w1=win WITHOUT the int.
,w1=win("Save As" "#32770")
,act w1
,
,;click file name area
,a.DoDefaultAction

,
,;append page number
,spe    
,'ELLLLV            ;; End Left Left Left Left Space
,'F"page {i}"
,'E
,0.5
,
,;I made this work by doing w1=win WITHOUT the int.
,w1=win("Save As" "#32770")
,act w1

,;Must find object again. Even odder, I didn't have to use this for the a.DoDefaultAction for clicking the filename area.
,a1.Find(w1 "PUSHBUTTON" "Save" "class=Button[]id=1" 0x1005 2)
,
,;click save    
,a1.Mouse(1)


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)