Sign in to follow this  
Followers 0
TMTYL

MOUSECLICK & SEND Command

5 posts in this topic

Hi,

When I try to use MOUSECLICK ("Left") or SEND ("&E{RETURN}"), the command seems not working. I want to double click the button to execute type pical application setup. The setup program has many button, each button is an option to install typical application.

Enclosed is my portion of the script that I want to run. Please help.

=======================================

Opt("WinWaitDelay",100)

Opt("WinTitleMatchMode",4)

Opt("WinDetectHiddenText",1)

Opt("MouseCoordMode",2)

DriveMapAdd( "X:", "\\vhawlamul13\xfiles\dental\voice_6_5_0_18\", 9, "domain\username", "password")

Run ("X:\CDSetup.exe" )

WinWait("Dictaphone Enterprise Voice Build 6.5.0.18","&Explorer")

If Not WinActive("Dictaphone Enterprise Voice Build 6.5.0.18","&Explorer") Then WinActivate("Dictaphone Enterprise Voice Build 6.5.0.18","&Explorer")

;WinWaitActive("Dictaphone Enterprise Voice Build 6.5.0.18","&Explorer")

;WinMenuSelectItem("Dictaphone Enterprise Voice Build 6.5.0.18", "", "&Explorer" )

Send ("{TAB}") ; try to get focus to this button

MouseClick ("left") ; try double click to

MouseClick ("left")

MouseDown("left")

MouseUp("left")

Sleep(1000)

;Send ("&E{RETURN}") I try this command too, but nothing happend

WinWait("Enterprise Express Voice Explorer - InstallShield Wizard","The InstallShield® W")

If Not WinActive("Enterprise Express Voice Explorer - InstallShield Wizard","The InstallShield® W") Then WinActivate("Enterprise Express Voice Explorer - InstallShield Wizard","The InstallShield® W")

WinWaitActive("Enterprise Express Voice Explorer - InstallShield Wizard","The InstallShield® W")

Send ("&N") ; send Next

WinWait("Enterprise Express Voice Explorer - InstallShield Wizard","Please enter your na")

If Not WinActive("Enterprise Express Voice Explorer - InstallShield Wizard","Please enter your na") Then WinActivate("Enterprise Express Voice Explorer - InstallShield Wizard","Please enter your na")

WinWaitActive("Enterprise Express Voice Explorer - InstallShield Wizard","Please enter your na")

=========================================================

Is that WinWaitActive command is waiting for command to send or just set focus to the windows and do nothing?

Thanks in advanace

TomP

Share this post


Link to post
Share on other sites



Use [code/autoit] tags to post codes please

Anyway, I think one problem is you are using advanced ('Wintitlematchmode', 4) but basic window names, try either excluding that option, or making it ('wintitlematchmode', 2)

Also, i'm not sure, but i think you're using the send function kinda wrong :D

Send("n"); send N
Send("{Enter}"); Sends enter

To click a button, look into controlclick, not mouseclick to get control ID's use autoit window info

to doubleclick look at mouseclick in the helpfile, it has a parameter called "clicks" which is the number of times to click

Share this post


Link to post
Share on other sites

Thanks Paulie,

I have tested many command including:

ControlFocus ("Dictaphone Enterprise Voice Build 6.5.0.18", "&Explorer", 1001) ; Set focus to the button

ControlClick ("Dictaphone Enterprise Voice Build 6.5.0.18", "&Explorer", 1001, "left", 2) ; Execute the double click to the button.

but all seem not working. I must doing something wrong. I found out that during execute the setup, the focus point to the right button, but it won't response to any manually click or return from the keyboard. Only the Exit button is works. I do not know the command WINWAITACTIVE will hold the active windows until you exit or do I have to set the focus to the current windows handle? Please advice.

Thanks,

TomP

Share this post


Link to post
Share on other sites

... I do not know the command WINWAITACTIVE will hold the active windows until you exit or do I have to set the focus to the current windows handle? Please advice.

Thanks,

TomP

The WinwaitActive does just that, waits until focus is given to the specified window before continuing,

If you want to keep a window open with focus and pause the script until that goes away, do this

While 1
     If WinExists(*Window Name*) then
          Winactivate(*Window Name*)
     Else
          ExitLoop
     Endif
Wend

Share this post


Link to post
Share on other sites

The WinwaitActive does just that, waits until focus is given to the specified window before continuing,

If you want to keep a window open with focus and pause the script until that goes away, do this

While 1
     If WinExists(*Window Name*) then
          Winactivate(*Window Name*)
     Else
          ExitLoop
     Endif
Wend

Hi Paulie,

After all attemp, I found out the problem not the SEND nor WINCONTROLCLICK .. My problem is the environment. After I map the "X:" drive to the folder where it contains all the execution files, I need to use FILECHANGEDIR command to change to that directory, and everything working. Since I am totally new to this awsome application, I am sure facing many problem. But that is what we all are learning. Thanks for the help.

Regards,

TomP

Share this post


Link to post
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
Sign in to follow this  
Followers 0