Jump to content

ControlClick doesn't work


Trevons
 Share

Recommended Posts

What is the application ?  Show a runable script, so we can test it on our side.  Unless someone is a diviner, debugging a single line of code is kind of impossible.;)

Link to comment
Share on other sites

Now I have another problem.
I have three buttons and I have to press the one in the middle but it doesn't work

#RequireAdmin


ShellExecute("C:\Users\Mitarbeiter\Desktop\AutoIT\npp.7.8.9.Installer.x64.exe")
WinWait("Installer Language","Please select a language.")
WinActivate("Installer Language","Please select a language.")
ControlClick("[Class:#32770]", "", "[Class:Button;Instance:1]")
WinWait("Installation von Notepad++ v7.8.9","Willkommen beim ")
WinActivate("Installation von Notepad++ v7.8.9","Willkommen beim ")
ControlClick("Installation von Notepad++ v7.8.9","Willkommen beim ", "&Weiter >", "left")
WinWait("Installation von Notepad++ v7.8.9","Lizenzabkommen ")
WinActivate("Installation von Notepad++ v7.8.9","Lizenzabkommen ")
ControlClick("Installation von Notepad++ v7.8.9","Willkommen beim ", "&Annehmen", "middle")
WinWait("Installation von Notepad++ v7.8.9","Zielverzeichnis auswählen ")

 

Link to comment
Share on other sites

you have to wait for stuff to actually happen. you should wait to do the control click until the control is actually in memory and available

you should just do as advised and silent install it using a command line, super easy to implement and more reliable as well.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

3 hours ago, Nine said:

You can do a silent install of Notepad++ by using /S.  See other switches for a complete run command.

 

1 hour ago, Earthshine said:

you should just do as advised and silent install it using a command line, super easy to implement and more reliable as well.

I also advise to use the command line option, as already suggested by @Nine and @Earthshine .

/S for Silent Install

/D= for the desired installation directory

Example npp.7.8.9.Installer.x64.exe /S /D=%ProgramFiles%\Notepad++\

Unfortunately I could not find a switch for the language selection (if this switch exists at all). It seems that the local setting is used automatically.

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

if you MUST do it manually, I will have to look at the Notepad++ installer, which one you installing? I have a handy little udf for waiting dynamically for the control to be actually loaded and ready to respond. it's made for automating installers.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

lol, use the information tool

the control you want to manipulate is a COMBO BOX

[CLASS:ComboBox; INSTANCE:1]

 

not the way you are trying to use it, it's a combo box, not a button. unless you need to select a different language you would just press the OK button. the installer sets your language to your local anyway as mentioned above.

[Class:Button;Instance:1]

 

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

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