Hyflex Posted March 27, 2012 Share Posted March 27, 2012 I've been playing around with autoit for a few hours this afternoon trying to get a script working but everything I try doesn't work. Password GUI Box: $Verification = GUICreate("R Verification", 250, 100, -1, -1) $VPassword = GUICtrlCreateInput("", 8, 30, 235, 25, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD)) $OkLaunch = GUICtrlCreateButton("&OK", 86, 64, 75, 25, $BS_NOTIFY) $Cancel = GUICtrlCreateButton("&Cancel", 167, 64, 75, 25, $BS_NOTIFY) $RTRPasswordLabel = GUICtrlCreateLabel("Please enter the password.", 8, 10, 200, 15, 0) GUISetState(@SW_SHOW) I've tried things like: If GUICtrlRead($VPassword) = "password" Then GUIDelete($Verification) RunFiller() Else MsgBox("1", "Password incorrect", "Password incorrect") EndIf It works but I can't run functions with the new GUI The New GUI Consists of 22 Username buttons and 23 (yes 23) password buttons. They all do the same thing, I just change "$VarInput" to whatever the username or password is. WinSetState($NewGUI, "", @SW_MINIMIZE) $VarInput = "" While WinGetState($NewGUI) = 8 Sleep(100) WEnd Sleep(500) ClipPut($VarInput) $ReadVar = ClipGet() Send("^v") ClipPut("") $ReadVar = ClipGet() How do I get it to launch the new GUI correctly and give it some functionality. Link to comment Share on other sites More sharing options...
digiworks Posted March 27, 2012 Share Posted March 27, 2012 Maybe this is what you're looking for?? $bLoop = 1 While $bLoop = 1 $text = InputBox("Input Password", "Please enter the password and click OK", "", "*") If @error = 1 Then MsgBox(4096, "Error", "Incorrect Password") Else If $text <> "password" Then MsgBox(4096, "Error", "Incorrect Password") Else $bLoop = 0 EndIf EndIf WEnd script here.. Link to comment Share on other sites More sharing options...
Hyflex Posted March 27, 2012 Author Share Posted March 27, 2012 (edited) Thank you very much, I made a few changes: ; Set Loop to Active $VerificationLoop = 1 ; Verification Loop While $VerificationLoop = 1 $VerificationInput = InputBox("Please enter the password and click OK", "", "*") If @error = 1 Then Exit Else If $VerificationInput = "password" Then $VerificationLoop = 0 Else If $VerificationInput = "" Then MsgBox(4096, "Error", "You must insert a password") Else MsgBox(4096, "Error", "Incorrect Password") EndIf EndIf EndIf WEnd Thanks once again Edited March 27, 2012 by XxXGoD Link to comment Share on other sites More sharing options...
spudw2k Posted March 28, 2012 Share Posted March 28, 2012 Don't embed clear-text passwords in a script. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF 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