Jump to content

[Beginner] Can't get mouseclick function to work


 Share

Recommended Posts

I am a newbie to autoit and trying to get the mouseclick function to automatically press a button as part of an install process.  After trying and failing to use ControlClick and MouseClick with a co-ords specified.  I tried to simplify the code as far as possible however it is still not working.  What am I doing wrong here?

ShellExecute("npp.7.8.1.Installer.x64.exe")
WinWaitActive("Installer Language")
sleep(3000)
MouseClick("left")

Link to comment
Share on other sites

Notepad++ offers an installation using commandline parameters. Have a look at the help for Run or RunWait.

The command string reads : Run("npp.7.8.1.Installer.x64.exe /S", "", @SW_HIDE)

/S means silent. With /D= you can specify an alternative target directory (if desired).

You probably have to put #RequireAdmin at the beginning of the script.

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

look at controlclick. It will allow you to interact with a control even when the window does not have focus. 

As Misashi suggest - use command line. Look here for more information: http://www.get-itsolutions.com/notepad-silent-install-exe-msi-version/

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