nenadc Posted June 26, 2007 Share Posted June 26, 2007 I'm new to AutoIt and I made this script... This is my first script and it isn't over yet. Any suggestions? Link to comment Share on other sites More sharing options...
smashly Posted June 26, 2007 Share Posted June 26, 2007 Hi, Nice first script For your combo boxes set the style to $CBS_DROPDOWNLIST. This way a user can only select an item from the dropdown and they can't type a value. This can save your script from errors due to user bad input. Say the user wants to select 47 from the drop down then they can just press 4 and the list will go to 40, if they keep their finger on 4 then it'll scroll through all entries in the list that start with 4. eg: 40, 41, 42, 43, 44, 45... etc Same goes for text in a combo box. For the GUICtrlSetData($minutes, '00|01|02|03|04... upto 59, '00') and GUICtrlSetData($hours, '00|01|02|03|04... upto 23, '04') You can instead of typing that big line from 00 to 59 and 00 to 23 ... A loop with stringformat can save you time when writing your code. example of the above mentioned things:$action = GUICtrlCreateCombo("", 75, 65, 100, 93, $CBS_DROPDOWNLIST) $hours = GUICtrlCreateCombo("", 75, 105, 37, 150, $CBS_DROPDOWNLIST + $WS_VSCROLL) $minutes = GUICtrlCreateCombo("", 200, 105, 37, 150, $CBS_DROPDOWNLIST + $WS_VSCROLL) For $i = 0 To 59 $sf = $sf & '|' & StringFormat("%02d", $i) GUICtrlSetData($minutes, $sf, "00") If $i < 24 Then GUICtrlSetData($hours, $sf, "04") Next Keep up the good work. Good luck and cheers Link to comment Share on other sites More sharing options...
nenadc Posted June 26, 2007 Author Share Posted June 26, 2007 Thanks! It was very helpful. I also don't know how to check for instances of this script without making a new script that will check it (with ProcessExist), because second instance may confuse first one. Another thing... I know that GUIConstants.au3 and other .au3 files takes too much space in compiled version, but i don't know which constants to declare. It seems that i always miss something . Another thing... Thanks . Link to comment Share on other sites More sharing options...
Paulie Posted June 26, 2007 Share Posted June 26, 2007 Thanks! It was very helpful. I also don't know how to check for instances of this script without making a new script that will check it (with ProcessExist), because second instance may confuse first one. Another thing... I know that GUIConstants.au3 and other .au3 files takes too much space in compiled version, but i don't know which constants to declare. It seems that i always miss something .Another thing... Thanks .I think solidsnake made a UDF at some pointthat defined only the constants you used in your script, i'm sure he has a link in his sig.Look him up. Link to comment Share on other sites More sharing options...
nenadc Posted June 26, 2007 Author Share Posted June 26, 2007 Thanks! I'll do that . Link to comment Share on other sites More sharing options...
smashly Posted June 26, 2007 Share Posted June 26, 2007 Your Welcome.I also don't know how to check for instances of this script without making a new script that will check it (with ProcessExist), because second instance may confuse first one.To make it so only one instance of your script can run at any time Support Forum FAQ atQ3. How can I prevent more than one copy of my script from running at once / detect another copy of my script running?Cheers Link to comment Share on other sites More sharing options...
nenadc Posted July 2, 2007 Author Share Posted July 2, 2007 Me again I made some modifications to script so feel free to test it and send your suggestions . Thanx SDT1.au3 Link to comment Share on other sites More sharing options...
AutoItKing Posted July 5, 2007 Share Posted July 5, 2007 Seems like a good script, I haven't gone through all the code yet, but it seems good. Keep it up! http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
nenadc Posted July 5, 2007 Author Share Posted July 5, 2007 thx 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