Jump to content

Any suggestions


Recommended Posts

Hi,

Nice first script :rolleyes:

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

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 :rambo:.

Another thing... Thanks :rolleyes: .

Link to comment
Share on other sites

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 :rambo:.

Another thing... Thanks :rolleyes: .

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

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 at

Q3. 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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...