Shaitan Posted January 19, 2015 Share Posted January 19, 2015 hey there. I'm running Windows 10 x64 and try to make a few software installation scripts but Im facing a few weird problem (at least to me). For instance, when I try to run the following script absolutely nothing happens. I can only start the Notepad++ installer with a batch script and even after it starts, AutoIt runs the script and active the correct window. Nothing after that, the script simply quits like if there was nothing after that. What am I doing wrong? I already tried to use CLASS, ControlClick, ControlSend and even MouseClick but nothing changes. Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) Run('Notepad\Notepad.cmd') WinWait("[CLASS:#32770]","") If Not WinActive("[CLASS:#32770]","") Then WinActivate("[CLASS:#32770]","") WinWaitActive("[CLASS:#32770]","") ControlSend("[CLASS:#32770]","", 1,"{ENTER}") Link to comment Share on other sites More sharing options...
JohnOne Posted January 19, 2015 Share Posted January 19, 2015 Never heard of Notepad.cmd, what is it? 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 More sharing options...
Shaitan Posted January 20, 2015 Author Share Posted January 20, 2015 its a Windows batch file I wrote to launch the Notepad++ installer start /wait C:\Users\Raphael\Desktop\Appz\Notepad\npp.6.7.4.Installer exit Link to comment Share on other sites More sharing options...
Shaitan Posted January 20, 2015 Author Share Posted January 20, 2015 I just noticed this problem is somehow related with Class #32770 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 20, 2015 Moderators Share Posted January 20, 2015 (edited) Don't worry about the controls and use the silent install option: Global $gsDir = "C:\Users\Raphael\Desktop\Appz\Notepad" Global $gsExe = "npp.6.7.4.Installer.exe" RunWait('"' & $gsDir & "\" & $gsExe & '" \S', $gsDir) Edited January 20, 2015 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Shaitan Posted January 20, 2015 Author Share Posted January 20, 2015 Link to comment Share on other sites More sharing options...
Shaitan Posted January 20, 2015 Author Share Posted January 20, 2015 Don't worry about the controls and use the silent install option: Global $gsDir = "C:\Users\Raphael\Desktop\Appz\Notepad" Global $gsExe = "npp.6.7.4.Installer.exe" RunWait('"' & $gsDir & "\" & $gsExe & '" \S', $gsDir) I would love to but I'm building a complete unattended Windows setup and there's some softwares without a silent switch Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 20, 2015 Moderators Share Posted January 20, 2015 Well, you're having a specific problem with this application... So, the silent switch works. I would use the silent switches for all programs that had them (keep your coding errors to a minimum). Other than that... if this doesn't work, you'll have to look for a different solution: Global $ghWnd = WinWait("[CLASS:#32770;TITLE:Installer Language]") ControlFocus($ghWnd, "", "[CLASS:Button; INSTANCE:1]") ControlClick($ghWnd, "", "[CLASS:Button; INSTANCE:1]") Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Shaitan Posted January 21, 2015 Author Share Posted January 21, 2015 This solution didnt work either... Nevermind, I'll use the silent switch wherever I can Thanks! Link to comment Share on other sites More sharing options...
jack71 Posted January 21, 2015 Share Posted January 21, 2015 (edited) Shaitan, I replied to your last thread which you had a similar question...regarding windows with class:#32770. Try what I said here: Note, you'll need to change the "visible text" portion, the width and height to match the window, and you'll need the mouse click coords under the "Mouse" section if all fails. Edited January 21, 2015 by jack71 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now