Jump to content

Recommended Posts

Hello, I have two questions.
1. Is it possible to make variable get every second + 1 to it's value without pausing While... WEnd loop? in GUI? (It's needed for a game that i wanna make with AutoIt :D)
2. Is it possible to do something like: 

Local $rr = 3000
GUICtrlSetData($Score, GUICtrlRead($Score) + 1)
Until GUICtrlRead($Score) = $rr

without pausing While... WEnd loop in GUI?   (Used to make score not just jump from 0 to 3000 but do nice effect :D)

Entire code looks like that:  (this don't do too much, those are just first things)

#include <GUIConstantsEx.au3>

Global $Gra2 = 9999
Local $num = 0
Local $rr = 2000000
Local $Gra = GUICreate("", 300, 200)
Local $Z = GUICtrlCreateButton("Zaczynamy", 10, 140, 280, 50)
Local $Score = GUICtrlCreateLabel("0", 10, 10, 250, 20)
GUISetState(@SW_SHOW, $Gra)
While 1
   $aMsg = GUIGetMsg(1)
   Sleep (1000)
   $num += 1
   Switch $aMsg[1]
      Case $Gra
         Switch $aMsg[0]
         Case $GUI_EVENT_CLOSE
         Case $Z
      Case $Gra2
          Switch $aMsg[0]

Func Start()

I would appreciate any help :)

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...