Jump to content

Win8 ControlClick sometimes not working


Tekkion
 Share

Recommended Posts

Hey there,

so I'm using Autoit mainly for automation of installations. Im using it on WinXP Win7 32/64bit and Win8 32bit. I wrote a script which should just do some clicks within a InstallShield Installation. I developed it on WinXP and it also worked without any problems on WinXP and Win7 but when I try it on Win8 it is stopping during Installation. I can see that the script is paused so I assume its the winwaitactive which paused it but it didnt executed the controllclick above. The whole installation is happening during our own installation program which fires some cmds. If I try to start the program without our own program it is working. Any suggestions where I can start to search for the error?

Run("setup.exe")
sleep(500)
if WinWaitActive("Lesehaus - InstallShield Wizard","InstallShield(r) Wizard installiert Lesehaus auf Ihrem") then
   ControlClick("Lesehaus - InstallShield Wizard","InstallShield(r) Wizard installiert Lesehaus auf Ihrem","[CLASS:Button; Instance:1]")
endif
local $whnd=WinWaitActive("Lesehaus - InstallShield Wizard","in den folgenden Ordner")
ControlClick($whnd,"","[CLASS:Button; Instance:1]")
local $whnd=WinWaitActive("Lesehaus - InstallShield Wizard","Sie den Setup-Typ aus, der Ihren Anforderungen")
ControlCommand($whnd,"","[CLASS:ListBox; INSTANCE:1]","SetCurrentSelection", 0)
sleep(100)
ControlClick($whnd,"","[CLASS:Button; Instance:4]")
local $hwnd=WinWaitActive("Lesehaus - InstallShield Wizard","Die Installation von Lesehaus")
ControlClick($hwnd,"","[CLASS:Button; Instance:4]")
Link to comment
Share on other sites

  • Moderators

Since it is an InstallShield install, why are you not just calling it with the silent switches and bypassing the GUI setup altogether?

Edit: Also, I would suggest you request a Mod to move this to general help and support, rather than the Developer forum. You will get better support (more eyes on the problem) there.

Edited by JLogan3o13

"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

My approach was to try to do the change I need to do during the installation by using Autoit cause I thought it would be solved faster, then using the silent switch and search for the approriate parameter. 

Next question would be how can I contact a mod?

Edited by Tekkion
Link to comment
Share on other sites

  • Moderators

I see that they have moved your thread to the appropriate forum. I would also surmise that one line of code (e.g. msiexec /i <path> /parameter list /qn) is much easier than trying to manipulate the GUI. It will also result in more consistent deployment.

"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

I understand what you are saying JLogan3o13, but the problem that the OP (Tekkion) is experiencing on Win8.x is still very significant. I have a similar problem attempting to use some of the core GUI-manipulation functionality of AutoIt on Win8 Tablets and it's not working (>ControlClick not clicking on button). In my case, I have not been able to find a way to make the non-MSI InstallShield uninstall routine completely silent (which is true of many non-MSI InstallShield uninstalls, based on my experience).

I cannot test my particular scenario on other OS's (the software comes pre-installed on our Win8 Tablets), but Tekkion has and he is stating that the basic GUI-manipulation functionality of AutoIt is working fine on WinXP & Win7 (as expected), but it is not working on Win8. I'm becoming more and more concerned about the ability to continue to use the core GUI-manipulation functionality of AutoIt in Win8 (and, potentially, future versions of Windows), as we are getting more Win8 devices in our environment. Whether it is a bug or just simply something different in Win8 that requires AutoIt to be slightly re-tooled in order to be compatible (with respect to GUI-manipulation) to Win8.

Please don't misunderstand me, I'm not trying to bash AutoIt and the incredible time and effort that its developers have put into developing it and the tools (and the support). I'm just concerned about this particular issue and my ability to provide solutions using AutoIt going forward with newer versions of Windows.

Edited by TXTechie
Link to comment
Share on other sites

  • Moderators

TXTechie, if you have issues with a function you should (if you have not already) post it in a thread. I will tell you that 90% of what I do is GUI based, and often involves installation of software, and I am using 8.1. I have not personally found any show stoppers that haven't been clearly identified in the release notes. If you are finding issues, you need to post something so the community can look at.

 

As for my suggestion to the OP, I understand the frustration of not being able to click on the GUI at the right time. However, it does boil down to using the correct tool for the job at hand. In the case of a scripted MSI setup, the correct tool is bypassing the GUI.

"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,

To be honest, I'm still not sure if it's just me doing something wrong or AutoIt not functioning properly (however, no one has yet suggested an alternative to what I'm using for what I'm trying to do). But, I have had a couple of GUI-related issues with Win8.x Tablets.

Can you tell me whether your work with Win8.1 has been with Tablets or Laptops (in all of their current forms) and/or Desktops that include a keyboard and mouse/trackpad?

Edited by TXTechie
Link to comment
Share on other sites

Run("setup.exe")
sleep(500)
if WinWaitActive("Lesehaus - InstallShield Wizard","InstallShield(r) Wizard installiert Lesehaus auf Ihrem") then
   ConsoleWrite(ControlClick("Lesehaus - InstallShield Wizard","InstallShield(r) Wizard installiert Lesehaus auf Ihrem","[CLASS:Button; Instance:1]") & @LF)
endif
local $whnd=WinWaitActive("Lesehaus - InstallShield Wizard","in den folgenden Ordner")
ConsoleWrite(ControlClick($whnd,"","[CLASS:Button; Instance:1]") & @LF)
local $whnd=WinWaitActive("Lesehaus - InstallShield Wizard","Sie den Setup-Typ aus, der Ihren Anforderungen")
ConsoleWrite(ControlCommand($whnd,"","[CLASS:ListBox; INSTANCE:1]","SetCurrentSelection", 0) & @LF)
sleep(100)
ConsoleWrite(ControlClick($whnd,"","[CLASS:Button; Instance:4]") & @LF)
local $hwnd=WinWaitActive("Lesehaus - InstallShield Wizard","Die Installation von Lesehaus")
ConsoleWrite(ControlClick($hwnd,"","[CLASS:Button; Instance:4]") & @LF)

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

My approach was to try to do the change I need to do during the installation by using Autoit cause I thought it would be solved faster, then using the silent switch and search for the approriate parameter. 

Next question would be how can I contact a mod?

 

Install shield lets your "record" your changes.

http://unattended.sourceforge.net/installers.php

Edited by DicatoroftheUSA
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...