Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 11:04

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

Advertisement



Autoit Variable Button Addieren

Discussion on Autoit Variable Button Addieren within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
Lordsocke's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 147
Received Thanks: 13
Autoit Variable Button Addieren

Hi leute, ich habe ein eigentlich ziemlich lächerliches Problem. Ich habe mir bei Autoit meine Gui gebaut und möchte jetzt z.B. jedesmal wenn Button1 gedrückt wird die Variable $1 um einen erhöhen also quasi Druck1($1=1) Druck2 ($2=2) Druck3 ($3=3) usw. wie kann ich das anstellen? Im Internet finde ich das ganze immer nur mit For Schleife und dann hoch zählen aber ich will ja nur auf den Button druck zählen... vielen dank für die Antwort
Lordsocke is offline  
Old 11/16/2014, 23:24   #2
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Wow, lächerlich triffts überhaupt nicht.

Außerdem wäre das viel mehr ein Request und so etwas gehört in den Sticky.
Code:
Local $i
GUICreate("", 100, 100)
$l = GUICtrlCreateLabel("", 8, 8, 84, 12)
$h = GUICtrlCreateButton("", 8, 24, 84, 70)
GUISetState()

While Sleep(10)
	Switch GUIGetMsg()
		Case -3
			Exit

		Case $h
			$i += 1
			GUICtrlSetData($l, $i)
	EndSwitch
WEnd
alpines is offline  
Old 11/17/2014, 00:01   #3
 
Lordsocke's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 147
Received Thanks: 13
Sehr geil danke für die Antwort leider bin ich immer noch zu blöd dafür hab ich vielleicht was vergessen?
Lordsocke is offline  
Old 11/17/2014, 00:09   #4

 
Moneypulation's Avatar
 
elite*gold: 138
Join Date: Apr 2012
Posts: 3,494
Received Thanks: 1,769
$i += 2.8
statt
$i =+ 2.8
Moneypulation is offline  
Reply


Similar Threads Similar Threads
Variable von AutoIt zu C#/C++ übergeben?
07/18/2014 - AutoIt - 8 Replies
Hallo zusammen, ich wollte nachfragen, ob es möglich ist, variablen von AutoIt in irgendeiner Weise an ein anderes Programm zu übergeben? Bsp.: Ich mache ein AutoIt Programm, das mit ImageSearch herausfindet, ob ein gewisses Bild auf dem Bildschirm vorhanden ist oder nicht. Wenn das der fall ist dann ist die Variable $res1 = 1. Falls nicht ist sie = 0. Und jetzt würde ich gerne diese Information in einem C# Programm weiterverwenden.
[AutoIT] Variable Senden
12/10/2012 - AutoIt - 4 Replies
Hallo, ich möchte das mein Programm eine ini ausliest und in eine Variable setz und diese dan per Send sendet. $taste = IniRead("config.ini", "config", "taste","") Send($taste) In dem Fall F2, aber er ignoriert das F und sendet nur 2. Ich hoffe mir kann jemand helfen.
Autoit Spezielle Variable
02/07/2010 - AutoIt - 10 Replies
hihi :D ich habe eine frage: kann mir jmd sagen, wie ich in auto it eine variable erstelle, welche ein wort als inhalt zugewiesen bekommt, wobei da wort zufällig auf einer internetseite generiert wird ?? ich habe mir gedacht, dass ich das wort markieren und kopieren lasse und dann das "kopierte" der variable als wert zuweise .... wäre nett, wenn mit jmd helfen könnte :D
[AutoIT]Variable Conversion
10/30/2009 - AutoIt - 2 Replies
Is there any way to convert a variable into a certain other type? For example: Variable $A should be a float set to 5.01382 however when I bring it into AutoIT, it converts it to an Unsigned Long giving me a different value of something like 1099238427 So basically I just want to know if there is a command, or any way to code a function that can convert Variables set to Unsigned Long into Float/Double/Unsigned Short



All times are GMT +1. The time now is 11:05.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.