Sign in to follow this  
Followers 0
kudrow

Control another gui

15 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted

@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 ;)

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

@JLogan3o13, sorry for being vague. It is not an installshield installation. Please let me know what else I can provide to help. Thank you for trying to help me.

info.jpg

climax.jpg

Edited by kudrow

Share this post


Link to post
Share on other sites

#4 ·  Posted

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.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#5 ·  Posted

@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!

Share this post


Link to post
Share on other sites

#6 ·  Posted

Try something like this:

ControlClick("Welcome", "", "Button1")

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#7 ·  Posted

@JLogan3o13

Still not getting anything. I will keep trying different things

 

Share this post


Link to post
Share on other sites

#8 ·  Posted

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


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#9 ·  Posted

@JLogan3o13 it is custom software for a client of mine. They use it for importing and exporting. The issue I am trying to resolve is that there are 3 exe files that need to be ran in order and I am just trying to automate it. Thanks again!

Share this post


Link to post
Share on other sites

#10 ·  Posted

@JLogan3o13 one thing I failed to mention is that there is a bigger window behind the smaller one. Not sure if that is useful information or not. See attached.

climax2.jpg

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#12 ·  Posted

@JLogan3o13 sorry to bug you, quick question. I can't even get a Mousemove command to work while this installer is active, any idea why?

 

Thanks!

Share this post


Link to post
Share on other sites

#13 ·  Posted

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.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#14 ·  Posted

It does not move at all while the installer is active. I can alt+tab out of it and the mouse will move as expected. Does that make sense?

 

Share this post


Link to post
Share on other sites

#15 ·  Posted

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

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