lyledg Posted October 24, 2007 Share Posted October 24, 2007 Please note, this is a question about the Inputbox function, NOT the Guictrlcreateinput Taken from the Help file InputBox -------------------------------------------------------------------------------- Displays an input box to ask the user to enter a string. InputBox ( "title", "Prompt" [, "Default" [, "password char" [, Width, Height [, Left, Top [, TimeOut]]]]] ) I know there is a way to limit the amount of characters using the settings above, but how do I limit that only numbers get entered into the Inputbox. I know GuictrlcreateInput has this functionality, but I want to refrain from using that as it means I have to create a child gui to achieve my goal. Possible? Link to comment Share on other sites More sharing options...
GEOSoft Posted October 24, 2007 Share Posted October 24, 2007 I don't think it can be done on a standard input box. However by creating a function with a new GUI you don't have to make it a child of the first. Just create it and use GUISwitch and GUIDelete when you are finished with it. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
MrCreatoR Posted October 24, 2007 Share Posted October 24, 2007 (edited) Hi,Check the Custom _InputBox() in my signature, it have the needed functionality Edited October 24, 2007 by MsCreatoR Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
lyledg Posted October 24, 2007 Author Share Posted October 24, 2007 (edited) Thanks Geosoft, that was this bit of uneccesary code I was trying to avoid. Thanks MsCreator...will have a look Edited October 24, 2007 by lyledg Link to comment Share on other sites More sharing options...
lyledg Posted October 24, 2007 Author Share Posted October 24, 2007 Fantastic job and thanks MS, but having a look at your Custom Input box, it is a Guictrlcreateinput in a child window I was just hoping that there was a way to specifiy a paramater to the already exiting Inputbox function that would only allow numbers.. Link to comment Share on other sites More sharing options...
MrCreatoR Posted October 24, 2007 Share Posted October 24, 2007 it is a Guictrlcreateinput in a child windowYes, and why this is a problem? you can use it as an include, just like wth built-in function, only you add _ before func name I was just hoping that there was a way to specifiy a paramater to the already exiting Inputbox function that would only allow numbers..No, if it isn't in the help file, then it not have the parameter... but you always can post an Feature Request (i believe someone posted already), but i doubt that this param will be added, because if it can be done with UDF, then there is no need to inlarge the AutoIt source. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
lyledg Posted October 24, 2007 Author Share Posted October 24, 2007 Thanks MSYes, and why this is a problem? you can use it as an include, just like wth built-in function, only you add _ before func nameYep, know all that, just saying that it seems strange that we have an almost perfectly working function, only thing missing is the inability to limit it to numbersYour UDF is great, but if you were able to use the Inputbox function with the number limiting usage, would you have needed to write your UDF in the first place, with all the child gui functionality and complexity?Don't get me wrong, your script rocks, it just is a mystery as to why we can have that functionality in Guictrlcreateinput and not Inputbox???I will put this in the Feature requests as you suggested and see what happens...Cheers Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 24, 2007 Moderators Share Posted October 24, 2007 Mines not as elaborate as MsCreator's ... but it works all the same:http://www.autoitscript.com/forum/index.ph...st&p=229361 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...
lyledg Posted October 24, 2007 Author Share Posted October 24, 2007 Hi Smoke Could you please repost the link, I doubt it's working as is? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 24, 2007 Moderators Share Posted October 24, 2007 (edited) Hi SmokeCould you please repost the link, I doubt it's working as is?I don't know if anything is wrong with the link... because I just clicked on it and it took me to where I had posted a custom _InputBox udf myself.I do know that AutoIt is at a crawl at the moment though.http://www.autoitscript.com/forum/index.ph...mp;#entry229361Here's another.http://www.autoitscript.com/forum/index.ph...mp;#entry310913 Edited October 24, 2007 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...
lyledg Posted October 24, 2007 Author Share Posted October 24, 2007 Thanks guys, both examples were a tremendous help..... 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