
computerguy4513
Members-
Posts
17 -
Joined
-
Last visited
Everything posted by computerguy4513
-
#RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_Run_Au3Stripper=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Run('C:\login.exe') Do Local $hWnd = WinGetHandle('Information') If IsHWnd($hWnd) = 1 Then If WinActive($hWnd) = 0 Then WinActivate($hWnd) ControlClick($hWnd, '', '[CLASS:WindowsForms10.Window.b.app.0.ad1; INSTANCE:1]') EndIf Sleep(10000) Until WinExists('Logon.exe - User Logon (v4.09') = 1 ;Logon.exe Software Update WinWait('Logon.exe - User Logon (v4.09')', "Change") WinActivate('Logon.exe - User Logon (v4.09')') ;Click into User ID ControlClick('Logon.exe - User Logon (v4.09')','','[CLASS:WindowsForms10.EDIT.app.0.ad1;INSTANCE:2]') ;Enter User ID Send("login") Sleep(1500) ControlClick('Logon.exe - User Logon (v4.09')','','[CLASS:WindowsForms10.EDIT.app.0.ad1;INSTANCE:1]') ;Enter Password Send("Password") Sleep(1500) ;Click Logon ControlClick('Logon.exe - User Logon (v4.09')','','[CLASS:WindowsForms10.Window.b.app.0.ad1;INSTANCE:1]') Sleep(1500) ;Click Continue ControlClick('Logon.exe - User Logon (v4.09')','','[CLASS:WindowsForms10.Window.b.app.0.ad1;INSTANCE:2]') Sleep(1500) ;Close Logon.exe Send ("!{F4}") Here is my current code. When the "Information" box doesn't show up, the code does not continue to login portion. Script is still active in the system tray, but it doesn't activate the logo.exe user logon dialog and enter the user/pass. What am I missing? Thanks again, I really appreciate you taking time to help me out.
-
Sorry for the poorly worded title, wasn't sure how to concisely word this issue. I have an application that I've scripted an update to. Update runs fine, after running it though, I have to launch the application, login and then close the app. When launching the application a pop up states that the system is still updating, click ok. I've gone through the process of just setting a long delay before launching the app but it seems completely random, and is a ham fisted solution that I feel could be more elegant. I'm no programmer, just thrust into this position due to employment constriction. What I want the script to do is launch the app, if the box pops up, click ok then wait 10 secs and loop this behavior until the box doesn't box up, and the login box comes up instead. I've previously dabbled in If NOT winwaits, then exit statements which worked really well. However I'm not sure how to continue the script, instead of simply exiting.
-
For anyone looking to resolve, here is the code I used: ;Sleep(5000) ;Windows Security Alert If Not WinWait('Windows Security Alert', "", 30) then Exit WinActivate('Windows Security Alert') WinWaitActive('Windows Security Alert') ControlClick('Windows Security Alert','','[CLASS:Button;INSTANCE:6]') Sleep(10000) If Not WinWait('Windows Security Alert', "", 30) Then Exit WinActivate('Windows Security Alert') WinWaitActive('Windows Security Alert') ControlClick('Windows Security Alert','','[CLASS:Button;INSTANCE:6]') Sleep(2000) If WinWait('Windows Security Alert', "", 10) = 0 then exit Exit
-
That worked for the first dialog, clicked ok, then the script closed. BUT! That's a step in the right direction! Thank you very much! I'm learning a lot. I tried putting a "then" statement in the middle, to chain it together...but that didn't work. Maybe a loop of some kind? Which I have no idea how to do. LOL
-
;Sleep(5000) ;Windows Security Alert If WinWait('Windows Security Alert', "", 30) = 1 then WinActivate('Windows Security Alert') WinWaitActive('Windows Security Alert') ControlClick('Windows Security Alert','','[CLASS:Button;INSTANCE:6]') Else If WinWait('Windows Security Alert', "", 30) = 1 then WinActivate('Windows Security Alert') WinWaitActive('Windows Security Alert') ControlClick('Windows Security Alert','','[CLASS:Button;INSTANCE:6]') Else If WinWait('Windows Security Alert', "", 30) = 0 then exit EndIf EndIf So I REALLY thought this was going to work. However when I ran the install, the script runs, sits in the system tray, and when the Firewall Security box pops up, the script ends, and disappears from the task tray. I want this script to wait for 30 secs, does the firewall dialog open? -No? Exit. -Yes? Click Allow, and wait for another 30 secs to see if the second Firewall dialog opens. Second dialog opens? - No? Exit. -Yes? Click Allow, then exit script. Like I said, I'm absolutely NOT a programmer by any means, but giving it my best. I feel like the above code SHOULD do that? What am I missing?
-
If WinWait('Windows Security Alert', "", 30) = 0 then exit WinActivate('Windows Security Alert') WinWaitActive('Windows Security Alert') ControlClick('Windows Security Alert','','[CLASS:Button;INSTANCE:6]') If WinWait('Windows Security Alert', "", 30) = 0 then exit WinActivate('Windows Security Alert') WinWaitActive('Windows Security Alert') ControlClick('Windows Security Alert','','[CLASS:Button;INSTANCE:6]') So it looks like when I run this, the script ends after 30 secs, or if the windows firewall box pops up, and clicks ok. Instead of the "then exit" in the first winwait, is there a bit of code that will tell it to go on if there WAS a popup box within 30 secs which was answered, so it will check for a second before ending? I'm REAL close, and appreciative of those helping out.
-
Just so I understand: ;Windows Security Alert WinWait('Windows Security Alert') WinWaitActive('Windows Security Alert') WinActivate('Windows Security Alert') ;Allow Access(Default) ControlClick('Windows Security Alert','','[CLASS:Button;INSTANCE:6]') ;Sleep(5000) ;Windows Security Alert WinWait('Windows Security Alert') WinWaitActive('Windows Security Alert') WinActivate('Windows Security Alert') ;Allow Access(Default) ControlClick('Windows Security Alert','','[CLASS:Button;INSTANCE:6]') In this case, I want the = 0 then exit on the second one to end the script, correct? Or is the exit portion just for that one line, and I'd want to put that on the end of each?
-
Basically have an application automation install script for unattended deployment, and sometimes a windows firewall exception dialog pops up, and sometimes it doesn't. The script currently is set to wait for the two times it pops up, and click ok. Trouble is, when the boxes never pop up, or only one pops up, the script just sits there forever waiting for the popup, and causes havoc to my process. I need the script to essentially check for the pop up box for...30 secs? And if it doesn't pop up, end the script. Is this possible? Thanks guys!
-
Trying to make an unattended install of an application exe. All is fine until I get to the attached. Normally, I can navigate through this using keyboard shortcuts, but nothing I've tried will activate this tree, or allow me to expand, select, or make any other changes needed for a proper application installation. It seems to me, that as the window the tree is in, is its own window with it's own set of coordinates, I want to target that window, and click on a specific set of coordinates. Is that right, and if so, how do I go about doing this? I'm admittedly not an AutoIt guru like most here, and have gotten by using simple controlclick and send scripts thus far. Here is the code I have as it stands where I'm trying to target the specific window, CLASS:TkChild; INSTANCE:136, and the specific coordinates within that window of 90, 50. This code is getting me nowhere, and I'm not sure where else to go with it. Thanks to all for any help you could send my way. #RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_Run_Au3Stripper=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** AutoItSetOption('MouseCoordMode', 0) Sleep(5000) WinWait('Setup') WinActivate('Setup') ControlClick("Setup", "", "[CLASS:TkChild; INSTANCE:136]","left" , 1 , 90 , 50 )