nitekram Posted October 24 Share Posted October 24 I wanted to create my own, that does not have the limitation of 254 characters... But I am unable to make it work, any help? It seems like once you hit enter, it stays for a bit, bypassing the second call - please let me know if I make no sense, it is early for me lol expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Misc.au3> For $x = 0 to 1 MsgBox('','',_new_inputbox('test', 'enter some text and then hit enter')) Next Func _NEW_InputBox($sTitle, $sPrompt, $iwidth = 244, $iheight = 156) ;GUISetState(@SW_HIDE, $hGUIMIM) ;GUICtrlSetState($hGUIMIM, $GUI_HIDE) ;MsgBox('','','called new input box') Local $sTitleLocal = $sTitle, $sPromptLocal = $sPrompt, $sReturnString Local $hGUI_InputBox = GUICreate($sTitleLocal, 244, 156, -1, -1, $WS_POPUPWINDOW, -1) Local $idLable = GUICtrlCreateLabel($sPrompt, 10, 12) ;, $iwidth - 20, 25, ) Local $idInput = GUICtrlCreateInput('', 10, 87, $iwidth - 20, 21) Local $idOK = GUICtrlCreateButton("OK", 27, $iheight - 32, 77, 23) Local $idCancel = GUICtrlCreateButton("Cancel", 137, $iheight - 32, 77, 23) Local $bCancelled = False ;Local $hDLL = DllOpen("user32.dll") ; Display the GUI. GUISetState(@SW_SHOW, $hGUI_InputBox) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idCancel $bCancelled = True ExitLoop Case $idOK $sReturnString = GUICtrlRead($idInput) ;MsgBox('','$sReturnString',$sReturnString) ExitLoop EndSwitch If _IsPressed('0D') Then $sReturnString = GUICtrlRead($idInput) ;MsgBox('','$sReturnString',$sReturnString) ExitLoop EndIf WEnd ; Delete the previous GUI and all controls. GUIDelete($hGUI_InputBox) If Not $bCancelled Then Return $sReturnString EndIf EndFunc ;==>_NEW_InputBox 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
Solution pixelsearch Posted October 24 Solution Share Posted October 24 It should work if you add these 3 lines at the beginning of the function : Func _NEW_InputBox($sTitle, $sPrompt, $iwidth = 244, $iheight = 156) While _IsPressed('0D') Sleep(10) WEnd Link to comment Share on other sites More sharing options...
nitekram Posted October 24 Author Share Posted October 24 24 minutes ago, pixelsearch said: It should work if you add these 3 lines at the beginning of the function : Func _NEW_InputBox($sTitle, $sPrompt, $iwidth = 244, $iheight = 156) While _IsPressed('0D') Sleep(10) WEnd Thanks so much, that worked like a charm!!! 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator 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