Jump to content

help with windows pop up (save as)


Recommended Posts

#include <IE.au3>

Opt("WinTitleMatchMode", 2)

Opt("MouseClickDelay", 10)

Opt("WinDetectHiddenText", 1)

$oIE = _IECreate ("10.100.47.11")

Sleep(1000)

_IELinkClickByText($oIE, "snapshot")

Sleep(1000)

WinWait("Save As","Save as &type:")

If Not WinActive("Save As","Save as &type:") Then WinActivate("Save As","Save as &type:")

Sleep(1000)

WinWaitActive("Save As","Save as &type:")

Sleep(1000)

ControlClick("Save As","Save as &type:", "[Class:Button; Text:&Save; Instance:2]")

Sleep(1000)

WinWait("Save As","C:\tools\iqeye.avi a")

If Not WinActive("Save As","C:\tools\iqeye.avi a") Then WinActivate("Save As","C:\tools\iq.avi a")

Sleep(1000)

WinWaitActive("Save As","C:\tools\iqeye.avi a")

Sleep(1000)

ControlClick("Save As","Save as &type:", "[Class:Button; Text:&Yes; Instance:1]")

the window pops up but the mouse doesn't initiate the click on save or yes to overwrite

Funny thing is if I use the recorder tool for mouse action, it works as in the scenario below...

_IELinkClickByText($oIE, "settings")

WinWait("Connect to "& $ip,"")

If Not WinActive("Connect to "& $ip,"") Then WinActivate("Connect to "& $ip,"")

WinWaitActive("Connect to "& $ip,"")

MouseMove(809,733)

MouseDown("left")

MouseUp("left")

Sleep(1000)

WinWait("Save As","Save as &type:")

If Not WinActive("Save As","Save as &type:") Then WinActivate("Save As","Save as &type:")

Sleep(1000)

WinWaitActive("Save As","Save as &type:")

Sleep(1000)

MouseMove(256,489)

MouseDown("left")

MouseUp("left")

Sleep(1000)

WinWait("Save As","C:\tools\image.jpg a")

Sleep(1000)

If Not WinActive("Save As","C:\tools\image.jpg a") Then WinActivate("Save As","C:\tools\image.jpg a")

WinWaitActive("Save As","C:\tools\image.jpg a")

Sleep(1000)

MouseMove(267,465)

MouseDown("left")

MouseUp("left")

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...