Jackized Posted November 9, 2018 Posted November 9, 2018 (edited) Is there a way to loop back to the beginning and keep the already entered data in the GUI Input boxes? I can GUIDelete and start a new GUI but all the typed data has to be redone. Here is a sample. expandcollapse popup#Include <GuiConstants.au3> Dim $msg,$okbutton,$cancelbutton,$objOU,$intAccValue,$strGroup1,$strGroup2 Dim $strFirstName,$strLastName,$strUserName,$strUserName2,$strPassword,$strDescription,$strContainer Dim $Combo,$Duration Do $Form1 = GuiCreate("", 300, 300) GUISetBkColor(0xA6CAF0) GuiCtrlCreateLabel("First Name:", 50, 10) $strFirstName = GuiCtrlCreateInput("", 50, 25, 200, 20) GUICtrlSetState ( $okbutton, $GUI_FOCUS ) GuiSetState() $okbutton = GUICtrlCreateButton ("OK",75,240,50,20) $cancelbutton = GUICtrlCreateButton ("Cancel",175,240,50,20) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbutton Exit Case $msg = $okbutton $strFirstName = GUICtrlRead($strFirstName) ExitLoop EndSelect Wend $len = StringLen($strFirstName) If $len > "20" then MsgBox(0, "ERROR Name to long", $strFirstName & " can't be over 20 characters." & @CRLF & "Total: " & $len) ;Exit GUIDelete($Form1) EndIf Until $len < "20" MsgBox(0, "Done", "") Edited November 9, 2018 by Jos added codebox
careca Posted November 9, 2018 Posted November 9, 2018 REad the input to a variable.. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
Nine Posted November 9, 2018 Posted November 9, 2018 expandcollapse popup#Include <GuiConstants.au3> Dim $msg,$okbutton,$cancelbutton,$objOU,$intAccValue,$strGroup1,$strGroup2 Dim $strFirstName,$strLastName,$strUserName,$strUserName2,$strPassword,$strDescription,$strContainer Dim $Combo,$Duration $Form1 = GuiCreate("", 300, 300) GUISetBkColor(0xA6CAF0) GuiCtrlCreateLabel("First Name:", 50, 10) $strFirstName = GuiCtrlCreateInput("", 50, 25, 200, 20) $okbutton = GUICtrlCreateButton ("OK",75,240,50,20) $cancelbutton = GUICtrlCreateButton ("Cancel",175,240,50,20) GUICtrlSetState ( $okbutton, $GUI_FOCUS ) GuiSetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbutton Exit Case $msg = $okbutton $strFirstName = GUICtrlRead($strFirstName) $len = StringLen($strFirstName) If $len < "20" then ExitLoop MsgBox(0, "ERROR Name to long", $strFirstName & " can't be over 20 characters." & @CRLF & "Total: " & $len) EndSelect Wend MsgBox(0, "Done", "") “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
careca Posted November 9, 2018 Posted November 9, 2018 There, the OP doesn't even have to try. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
Nine Posted November 10, 2018 Posted November 10, 2018 (edited) 4 hours ago, careca said: There, the OP doesn't even have to try. ya and ty "REad the input to a variable.." was sooo helpful ! Edited November 10, 2018 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Moderators JLogan3o13 Posted November 10, 2018 Moderators Posted November 10, 2018 12 hours ago, Nine said: ya and ty "REad the input to a variable.." was sooo helpful ! Since this forum operates on the "Teach a Man to Fish" motto rather than simply barfing up code without any explanation for a new coder, neither was terribly helpful. Rather than responding to every last jibe, how about focusing on helping people improve their coding abilities rather than spoon-feeding them, as I assume that is why you're here. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
careca Posted November 10, 2018 Posted November 10, 2018 You're correct, sadly i had my child on my lap, she was messing with the keyboard and that was the only thing i could write at the moment. I wanted to add more to my answer, but when i came back to edit there was no longer need for it. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
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