Register for your free account! | Forgot your password?

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

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

Advertisement



Wie zählt man 2 labels zoder variablen zusammen?

Discussion on Wie zählt man 2 labels zoder variablen zusammen? within the AutoIt forum part of the Coders Den category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2010
Posts: 71
Received Thanks: 5
Post Wie zählt man 2 labels zoder variablen zusammen?

Hallo,

Ich bräuchte etwas Hilfe wie man 2 variablen, bzw. 2 Labels zusammenzählt.
Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("Mathetrainer by Timm v1.0.0", 280, 144, 192, 124)
$Label2 = GUICtrlCreateLabel("", 16, 40, 4, 4)
$Label3 = GUICtrlCreateLabel("zahl", 16, 48, 55, 17)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Label4 = GUICtrlCreateLabel("+", 72, 48, 10, 17)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Label5 = GUICtrlCreateLabel("zahl", 96, 48, 47, 17)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Label6 = GUICtrlCreateLabel("=", 160, 48, 26, 17)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Neue zahl", 16, 72, 113, 17)
$Label1 = GUICtrlCreateLabel("Mathetrainer", 8, 8, 120, 28)
GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")
$Input1 = GUICtrlCreateInput("", 192, 48, 81, 21)
$Button2 = GUICtrlCreateButton("Fertig", 192, 72, 81, 17)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###



While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			$randomzahl1 = randomzahl1()
			GUICtrlSetData($Label3, $randomzahl1)
			$randomzahl2 = randomzahl2()
			GUICtrlSetData($Label5, $randomzahl2)

		
	EndSwitch
WEnd


Func randomzahl1()
	Return Random(1, 100, 1)
EndFunc   ;==>randomzahl1

Func randomzahl2()
	Return Random(1, 100, 1)
EndFunc   ;==>randomzahl1
ich möchte $randomzahl1 und $randomzahl2 zusammenzählen, und ein ergebnis draus machen.
oder $label3 und $label5 zusammenzählen?
wisst ihr wie das geht?
von sowas habe ich leider kene ahnung, und im Internet habe ich danach auch schon gesucht aber nichts gefunden.

lg lufl
Lufl is offline  
Old 06/22/2012, 16:26   #2
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
Quote:
Originally Posted by Lufl View Post
von sowas habe ich leider kene ahnung, und im Internet habe ich danach auch schon gesucht aber nichts gefunden.

lg lufl
lügner.

GUICtrlRead() ist was du brauchst.


PHP Code:
While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Button1
            GUICtrlSetData
($Label3randomzahl1())
            
GUICtrlSetData($Label5randomzahl1())
        Case 
$Button2
            GUICtrlSetData
($Input1GUICtrlRead($Label3)+GUICtrlRead($Label5))
    EndSwitch
WEnd


Func randomzahl1
()
    Return 
Random(11001)
EndFunc   ;==>randomzahl1 
omer36 is offline  
Old 06/22/2012, 16:33   #3
 
elite*gold: 0
Join Date: Nov 2010
Posts: 71
Received Thanks: 5
Quote:
lügner.
nein kein Lügner, ich habe nach variablen zusammenzählen gesucht, aber nichts richtiges gefunden, nur 2 zahlen zusammenzählen, und texte zusammenfügen.
sonnst würde ich hier ja auch wohl keine frage stellen ;-)

aber danke das du mir geholfen hast, ein Thanks hast du mehr!
Lufl is offline  
Old 06/23/2012, 15:55   #4


 
Lawliet's Avatar
 
elite*gold: 2
Join Date: Jul 2009
Posts: 14,456
Received Thanks: 4,685
Ein Thread reicht wirklich
Und den Tratsch Thread haben wir auchnoch.
#closed
Lawliet is offline  
Closed Thread


Similar Threads Similar Threads
Rappelz - Using Shell with labels/listview items.
04/11/2012 - .NET Languages - 2 Replies
This is my code : Shell(Label4.Text & "\" & "SFrame.exe /auth_ip:" & ListView1.SelectedItems(0).SubItems(1).Text & " /locale:ASCII /country:US /cash /commercial_shop") When I execute that command, I get an error from SFrame : http://i44.tinypic.com/mhdp5g.jpg What am I doing wrong? What's the correct way?
Variablen..
10/30/2010 - AutoIt - 2 Replies
Habe zwei fast identische codes aber der 2 te ist immer falsch :( Der geht HotKeySet("s", "start") HotKeySet("e", "ende") $Variable = 10 Func start () while 1 if $Variable > 1 then
[PHP] Die Variablen
08/22/2010 - Coding Tutorials - 3 Replies
Hallo ELitepvpers Heute erkläre ich euch etwas über Variablen, wie sie aufgebaut sind und noch ein paar kleine Beispiele, damit das heut gelernte richtig sitzt ;) Vielleicht kennst du Variablen aus dem Mathe unterricht. Das sind diese komischen Buchstaben, die keinen Sinn zu ergeben scheinen, aber doch so wichtig sind. In PHP werden Variablen verwendet, um Inhalte (z.B. Text oder Zahlen) darin zu speichern. Das besondere ist an einer Variable ist, das du es zwar beliebig nennen darfst,...
HELP! SCHWEBENDE LABELS?!?
06/05/2010 - AutoIt - 10 Replies
hi leute! ich hab ne gui gemacht... und kann mir einer sagen wie ich schwebende labels machen kann?? danke im voraus...
Request: Metallurgy Labels in Nekojima
04/04/2010 - Mabinogi - 4 Replies
If anyone can provide a tutorial on how to make this edit, it would be greatly appreciated. The spot do get kind of annoying to see when it's daylight.



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


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.