Jump to content
Sign in to follow this  


Recommended Posts

My scrippt is 5 tabs and nearly 600 lines and growing.

I've used GUICtrlCreateUpdown with 10 digits on every tab with success.

I'm trying for something different, GUICtrlCreateUpdown with 3 Predefined values,

None, Fast and Max.

I found this

 Modified to suit my needs

#include <GuiConstants.au3>

Opt("GUIOnEventMode", 1)

Global $main, $label, $input, $updown

$main = GuiCreate("UpDown Alphabet ;-)", 250, 40)
$label = GUICtrlCreateLabel("None", 11, 11, 35, 18, $SS_CENTER + $BS_CENTER)
GUICtrlSetBkColor(-1, 0xffffff)
$input = GUICtrlCreateInput("1", 10, 10, 50, 20, $ES_READONLY + $WS_CLIPSIBLINGS)
$updown = GUICtrlCreateUpdown($input)
GUICtrlSetOnEvent($updown, "UpDown")
GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate", $main)
GuiSetState(@SW_SHOW, $main)

While 1

Func UpDown()
    Dim $aSA = StringSplit("None|Fast|Max", "|")
    If StringLeft(GUICtrlRead($input), 1) = "-" Or GUICtrlRead($input) = 0 Then
        GuiCtrlSetData($input, "3")
    ElseIf GUICtrlRead($input) > $aSA[0] Then
        GuiCtrlSetData($input, "1")
    GuiCtrlSetData($label, $aSA[GUICtrlRead($input)])

Func Terminate()

Looked good untill I tried to adapt it to the rest of my script.

GUIOnEventMode is causing problems with the rest of my script.

I declared Opt("GUIOnEventMode", 1) at the beginning of my script and

Opt("GUIOnEventMode", 0) at the beginning of every other function but it didn't work.

I don't think anyone wants to check 600 lines of script for me.

Is there another way to accomplish this without using GUIOnEventMode.

Any help would be greatly appreciated


Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...