Jump to content

Changing the values of an updown to strings


Recommended Posts

At the moment i'm making a game, like the DOS Theme Park but without Animations.

Therefore i'd like to use an updown, that shows different strings instead of numbers, when it is clicked, like on the screenshot. It should for example change from Nothing to a bit to Normal to much to loads.

Of course i'll post the game when it's done but it may take a lot more time.

Updown.rar

Edited by aquaandi
Link to comment
Share on other sites

At the moment i'm making a game, like the DOS Theme Park but without Animations.

Therefore i'd like to use an updown, that shows different strings instead of numbers, when it is clicked, like on the screenshot. It should for example change from Nothing to a bit to Normal to much to loads.

Of course i'll post the game when it's done but it may take a lot more time.

#include <GUIConstants.au3>
Dim $things[4] = ["ices","frogs","newts","bats"]
$Form1 = GUICreate("UPDOWN Text", 266, 138,10,10)
$Input1 = GUICtrlCreateInput("1", 130,10,20,20)
$updown = GUICtrlCreateUpdown($input1)
GUICtrlSetLimit($updown,4,1)
$Input2 = GUICtrlCreateInput("ices", 10, 10, 121, 20, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
GUICtrlSetState($input1,$gui_Hide)
GUISetState(@SW_SHOW)


While 1
    
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $updown
            $nt = GUICtrlRead($input1)
            ConsoleWrite("$nt = " & $nt & @CRLF)
            GUICtrlSetData($Input2,$things[$nt - 1])
            
    EndSelect
WEnd
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

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