Jump to content

Control another gui


kudrow
 Share

Recommended Posts

Hello,

I am trying to automate an installer by sending commands (enter, left arrow etc) and the simple send script does not work. I have tried setting a sleep for 5 seconds so that I could manually activate the window before the send command is processed and it still does not work. I have also tried WinActivate with no luck as well. Not sure what else to try.

 

Thanks for any help!

Edited by kudrow
Link to comment
Share on other sites

  • Moderators

@kudrow it is a little difficult to help with such a vague explanation. How about a screenshot of the installer window? Is it an InstallShield installation? You may not need to automate the GUI at all. What do you get when you over over the buttons/controls with the Autoit Window Info Tool (in the same directory where you installed AutoIt)? The answers to these questions will help us help you ;)

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

So have you tried ControlClick (check out the good example in the help file) on that button? I see you stated Send doesn't work, but the Control* commands are usually more reliable.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

@JLogan3o13, I am not sure I am doing it right.. This is what I have.

 

RunWait(@COMSPEC & " /c Start c:\climax\climaxsetup.exe")
Sleep(2000)
$win = WinActive("[Title:Welcome]")
ControlClick($win, "", "1017")

Also tried 

RunWait(@COMSPEC & " /c Start c:\climax\climaxsetup.exe")
Sleep(2000)
$win = WinActive("[Title:Welcome]")
ControlClick($win, "", "1017","",1)

I bet I am missing something.

It does not work with above example.

Thanks!

Link to comment
Share on other sites

  • Moderators

@kudrow are you able to share what the product is? Don't particularly want to Google "Climax" :)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Getting a little closer.

I can read text from these boxes with the below code but I cannot set the text with _GUICtrlEDit_SetText

$winname= "User Information"
$sControlIdentifier= 1039
$hControl = ControlGetHandle($winname,"",$sControlIdentifier)
$first=_GUICtrlEdit_GetText($hControl)

MsgBox("0","test",$first)

 

Edited by kudrow
Link to comment
Share on other sites

  • Moderators

Can you define "not working"? Does the mouse not move to where you expect, or is it not moving at all? It sounds as though you have a blocking function (WinWaitActive, perhaps) stepping on it.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

So my new plan to automate this installer was to control the on screen keyboard with mouse moves and clicks. I tested that it works when I manually move the mouse and click letters. Then when I try to use autoit to do it, it does absolutely nothing. I can test my autoit script on anything else and it works.  

climax3.jpg

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...