Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 05:47

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

Advertisement



If $variable < $variable2?

Discussion on If $variable < $variable2? within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2009
Posts: 191
Received Thanks: 19
If $variable < $variable2?

Hey Leute,

vielleicht verwirrt euch der Titel ein bisschen, aber ich hatte echt keine Ahnung wie ich das formulieren sollte.^^ Jedenfalls geht es um folgendes:

Ich habe ein Inputfeld, in welches der Spieler die HP Prozentzahl eingeben kann, bei der der Charakter einen Trank nehmen soll. Des weiteren hab ich eine Progressbar, in der die derzeitige Prozentzahl der HP des Charakters angegeben ist. Jetzt möchte ich es so machen, dass wenn der Benutzer des Programms z.B. 50% in das Inputfeld eingibt, der Charakter, wenn er unter 50% einen Trank nimmt. Das Programm erkennt es, indem es die Progressbar ausliest. Jetzt habe ich es bereits so versucht:

Code:
		if $Progress2 < $lol8 Then
	sleep(1000)
	send(guictrlread($Input30))
endif
In dem Fall steht $Progress2 für die Progressbar und $lol8 für das Inputfeld. Das ganze funktioniert allerdings nicht, denn das Programm drückt die ganze Zeit die Trank Taste.

Dann dachte ich, ich hätte das Zeichen falsch herum gesetzt und habe es so probiert:

Code:
		if $Progress2 > $lol8 Then
	sleep(1000)
	send(guictrlread($Input30))
endif
Habe damit jedoch keine andere Wirkung erzielt. Kann mir einer sagen, wie ich es noch anstellen kann?
Vielen Dank schonmal
Skatefreaky is offline  
Old 03/31/2012, 13:42   #2
 
elite*gold: 50
Join Date: Mar 2010
Posts: 1,373
Received Thanks: 521
Du Rückgabewerte von GUICtrlCreateXXX sind nicht die aktuellen Werte der Komponenten. Du musst auch hier mit GUICtrlRead arbeiten.
jacky919 is offline  
Thanks
1 User
Old 03/31/2012, 14:02   #3
 
elite*gold: 0
Join Date: May 2009
Posts: 191
Received Thanks: 19
Also:

Code:
if guictrlread($Progress2) < guictrlread($lol8) Then
	sleep(1000)
	send(guictrlread($Input30))
endif
?
Skatefreaky is offline  
Old 03/31/2012, 14:24   #4
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
ja, so
omer36 is offline  
Old 03/31/2012, 14:29   #5
 
elite*gold: 0
Join Date: May 2009
Posts: 191
Received Thanks: 19
Ok gut scheint zu klappen, danke
Skatefreaky is offline  
Reply


Similar Threads Similar Threads
Variable
06/10/2011 - General Coding - 5 Replies
Moin, Nur eine kleine frage uber ne c# variable also: Ich hab mehere form's in meine programm und will eine string deklarieren fuer das ganze programm. Ich hab es so gemacht : public string user = "Username"
Cost of accessing a casted variable vs. assigning the casted variable? (C#)
01/05/2011 - CO2 Programming - 5 Replies
I know that in unmanaged C++, casting is at compile-time, so it's better to avoid the assignment and simply access it for all instances. However, in C#, I have no idea since I'm pretty new to it.
Variable ?!
11/27/2010 - AutoIt - 14 Replies
Huhu E*PvP :) Ich habe mal wieder eine frage :D.. mir wurde ja schon öfters gesacht das ich meinen source "Besser gestalten soll". Also dachte ich mir mhm ok..! und ich wollte wissen wie ..am also ..og >_<
Überprüfen ob Variable Eine Variable ist
10/16/2010 - AutoIt - 26 Replies
Hey leute ich wollte fragen ob/wie man überprüfen kann ob eine Variable eine Variable ist z.b. so $k = 1 $i = $k if $i = VARIABLE Then msgbox(0,'$i ist eine variable!!','') endif PS:Wp releast man nochma TuT (z.b. für metin2??)
How do I add a variable
08/21/2009 - CO2 Private Server - 4 Replies
Couldn't find a guide when I searched. I want to make a variable so it will check how many times the player has already used unknown man. I know how to use the variable, but just don't know how to make it. Oh yea this is LOTF



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


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.