Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 20:41

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Time-Counter

Discussion on Time-Counter within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
Patrick_SkiLL's Avatar
 
elite*gold: 260
Join Date: Oct 2012
Posts: 22
Received Thanks: 3
Time-Counter

Code:
; 1. Die Inputbox
; Wir nehmen hier eine einfache Inputbox und speicher den In halt in einer
; Variablen mit dem namen $zeit.

$zeit = InputBox("Time-Counter by Patrick_SkiLL", "Bitte gib die Zeit in Sekunkend ein:", _
		"10", '', -1, 140)

; 2. Prüfen ob es eine Zahl war, bzw. ob etwas eingetragen wurde
; Hier nehmen wir den Wert der in der Variablen $zahl steht und teilen
; diesen durch 1, kommt 0 raus, ist etwas Faul und wir machen nicht weiter.

If $zeit / 1 = 0 Then
	MsgBox(16, "Timer-Counter", "Es wurde kein Wert oder ein falscher Wert" & _
			" eingegeben. Das Programm wird beendet.")
	Exit
EndIf

; 3. Die GUI
; Hier habe ich nun mal einfach was mit Koda (ALT+M), nix besonderes, einfach mal mit
; spielen.
; Was ich hinzugefügt habe, ist beschrieben.

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Timer - Counter", 288, 63)
GUISetBkColor(0xA6CAF0)
$lblZeit = GUICtrlCreateLabel("00", 0, 0, 58, 60)
GUICtrlSetFont(-1, 30, 400, 0, "Arial Black")
GUICtrlSetColor(-1, 0x0000FF)
$lblBezeichnung = GUICtrlCreateLabel("Sekunden", 64, 0, 222, 60)
GUICtrlSetFont(-1, 30, 400, 0, "Arial Black")
GUISetState(@SW_SHOW)

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
	EndSwitch

	; Von unserer Zahl 1 abziehen und wenn wir bei kleiner 0 sind, das Skript beenden
	; bzw. eine Andere Aktion durchführen.
	$zeit = $zeit - 1
	If $zeit < 0 Then
		; Hier mache ich nun ein Exit, man könnte natürlich nun auch noch eine
		; andere Aktion durchführen.
		Exit
	EndIf

	; Unsere neue Zahl in das Label schreiben, was die verbleibenden Sekunden anzeigt.
	GUICtrlSetData($lblZeit, $zeit)

	; Pause einfügen, damit wir ungefähr eine Sekunde haben
	Sleep(1000)

WEnd
Waren 5 Minuten ^^

Hab dazu ne kleine Erklärung geschrieben
Patrick_SkiLL is offline  
Old 10/05/2012, 00:03   #2
 
Achat's Avatar
 
elite*gold: 528
Join Date: Jan 2012
Posts: 2,127
Received Thanks: 2,403
OMG ein Timer mit sleep -.-



MfG
Achat is offline  
Reply


Similar Threads Similar Threads
Verkaufe Counter Strike 1.6 Account ( Non Banned ), suche GameTime oder AIOBot Time !
06/08/2011 - World of Warcraft Trading - 2 Replies
Heyho, verkaufe gegen Gebot meinen Steamaccount für Counter Strike 1.6. Was soll das mindestgebot sein ? Gut wären 15 € Paypal, ich akzeptiere auch andere Sachen, aber bei Zahlungen leider nur PayPal. Cd Key's nehme ich auch.
Boss Time Spawn in Server Time
05/26/2011 - Eudemons Online - 3 Replies
Anyone her would like to share the boss time spawn? from Monday to Sunday what place and time. thanks
[QUESTION] skill time/regen time pointer
12/10/2008 - Ace Online / AirRivals - 0 Replies
hi question is: how to change all skill timer/regen timer at once and static addresses in ayoris trainer there are boxes for it but i am using the EU version and there they do not work i also wrote into the RA root address topic that i can't find it for EU (i know how to get pointers and how to single edit skills/weapons/radar/etc) i already found some static addresses but they do not work ^^



All times are GMT +1. The time now is 20:41.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.