rrrm99 Posted June 23, 2007 Share Posted June 23, 2007 (edited) i need something that would run part of the script if Input1(in the GUI) is filled with atleast 1 character and run another part of the script if they put something in Input2(In GUI) and if they fill something in both Inputs it would show a msgbox if you need the GUI i am using i can post here... Edited June 23, 2007 by rrrm99 Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 23, 2007 Share Posted June 23, 2007 (edited) Hi,if you need the GUI i am using i can post here...It's the best way to get quick help But i have a litle time, here it is: Edited June 23, 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...
rrrm99 Posted June 23, 2007 Author Share Posted June 23, 2007 (edited) I need it only to the Funcs only if they pressed a buton EDIT:nvm i have found what i was looking for in autoit help file and previous scripts it involved HOURS of trial and error... here was the final code...if anybody can improve it then please do #NoTrayIcon #include <GUIConstants.au3> $Test = GUICreate("ÕÝ ][ÝËÌKLKLJBÕRPÝÜX]QÜÝ ][ÝÒ[]I][ÝË KL#sÂS¢b33c´çWCÒuT7G&Ä7&VFTçWBgV÷C²gV÷C²ÂRÂ3Â#SÂ#¤)U% Ñɱ ÉÑɽÕÀ ÅÕ½Ðí%¹ÁÕÐÈÅÕ½Ðì°Ô°ØÔ°ÈÜÔ°ÔÀ¤(ÀÌØí%¹ÁÕÐÈôU%trlCreateInput ( "", 15 , 85 , 250 , 20) $btn = GUICtrÜX]P]Û ][ÝÓÚÉ][ÝË KMKL ÌÍÐ×ÒPÓÓBT7G&Å6WDÖvRÓÂgV÷C·6VÆÃ3"æFÆÂgV÷C²ÃCBà ¤uT6WE7FFR ¢b33cµÍôÀ)]¡¥±ÀÌØíµÍ±ÐìÐìÀÌØíU%}Y9Q} 1=M(ÀÌØíµÍôIGetMsg() Select Case $msg = $btn IfÕRPÝXY ÌÍÒ[]JH ÉÝÈ ][ÝÉ][ÝÈ[ÕRPÝXY ÌÍÒ[]"fÇC²fwC²gV÷C²gV÷C²FVâ×6t&÷CÂgV÷C²gV÷C²ÂgV÷C²gV÷C²¢U%±Ñ ÀÌØíQÍФ(á¥Ñ±½½À( If GUICtrlRead($Input1) <> "" Then Input1() YÕRPÝXY ÌÍÒ[]JH ÉÝÈ ][ÝÉ][ÝÈ[[] BWFÆö÷¢VæE6VÆV7@¥tVæ@¤gVæ2çWC¢¶6öFR½Ì¡É)¹Õ¹()Õ¹%¹ÁÕÐÈ ¤(í½½Ì¡É)¹Õ¹ Edited June 23, 2007 by rrrm99 Link to comment Share on other sites More sharing options...
martin Posted June 23, 2007 Share Posted June 23, 2007 here was the final code...if anybody can improve it then please doThe way you have written your code you will never get to execute iput1() or input2(). Maybe this is what you meant-;============not using Autoit tags because problem with reading afterwards until forum problem fixed#NoTrayIcon#include <GUIConstants.au3>$Test = GUICreate("Test", 280, 325, -1, -1)GUICtrlCreateGroup("Input1", 5, 10, 270, 50)$Input1 = GUICtrlCreateInput ( "", 15, 30, 250, 20)GUICtrlCreateGroup("Input2", 5, 65, 275, 50)$Input2 = GUICtrlCreateInput ( "", 15 , 85 , 250 , 20)$btn = GUICtrlCreateButton ("Ok", 5, 295, 120, 22,$BS_ICON) GUICtrlSetImage (-1, "shell32.dll" ,144,0)GUISetState ()$msg = 0While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn If GUICtrlRead($Input1) <> "" And GUICtrlRead($Input2) <> "" Then MsgBox(48, "", "") GUIDelete($Test);not needed if exiting Exitloop;this will exit script elseIf GUICtrlRead($Input1) <> "" Then Input1() else Input2() EndIf exitloop; this will close the script EndSelectWEndFunc Input1() ;code goes hereEndFuncFunc Input2() ;code goes hereEndFunc Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
rrrm99 Posted June 24, 2007 Author Share Posted June 24, 2007 i noticed that just after i tested the script...i was too lazy to edit post 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