Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 06:31

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

Advertisement



Warum funktioniert das nicht?

Discussion on Warum funktioniert das nicht? within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
V8II's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 475
Received Thanks: 130
Warum funktioniert das nicht?

Hi epvpers,
Ich bastle gerade an einem Script, aber mir ist absolut nicht klar, warum es nicht funktioniert:

PHP Code:
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <array.au3>
##Region ### START Koda GUI section ### Form=
$Form2 GUICreate("Form2"414299221187)
$Label1 GUICtrlCreateLabel("Label1"8820497)
$Label2 GUICtrlCreateLabel("Label2"216818889)
$Label3 GUICtrlCreateLabel("Label3"8112196105)
$Label4 GUICtrlCreateLabel("Label4"216104196121)
$Label5 GUICtrlCreateLabel("Label5"823220457)
$Label6 GUICtrlCreateLabel("Label6"21623219665)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
$stats
=Processgetstats("explorer.exe")
For 
$i=0 to UBound($statsstep 1
GuiCTrlSetData
($Label1,$stats[$i])
Next
Sleep
(1000)
WEnd 
Die Fehlermeldung:
Quote:
sdsad.au3 (21) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
GuiCTrlSetData($Label1,$stats[$i])
GuiCTrlSetData($Label1,^ ERROR
Thx an alle Helfer!
Lg V8II
V8II is offline  
Old 02/19/2011, 20:51   #2
 
BlackHybrid's Avatar
 
elite*gold: 52
The Black Market: 101/0/0
Join Date: Oct 2010
Posts: 1,998
Received Thanks: 389
Hinter UBound() muss ein -1 also UBound($stats) -1 aber warum weis ich grad nicht genau
BlackHybrid is offline  
Thanks
1 User
Old 02/19/2011, 21:15   #3
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,147
Weil ein Array bei 0 beginnt und UBound() bei 1. → 1 - 1 = 0
KDeluxe is offline  
Thanks
2 Users
Old 02/19/2011, 21:22   #4
 
BlackHybrid's Avatar
 
elite*gold: 52
The Black Market: 101/0/0
Join Date: Oct 2010
Posts: 1,998
Received Thanks: 389
Ah gut zu wissen gibt ein THX

V8II jetzt musst du nurnoch die Variablen der Labels zum Array machen und bei GuiCtrlSetData($Label[$i]... den Array hinzufügen
BlackHybrid is offline  
Thanks
1 User
Old 02/19/2011, 21:28   #5
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,147
Würde in etwa so aussehen:
PHP Code:
GUICreate("Form"414299221187)
Global 
$Label[6]
$Label[0] = GUICtrlCreateLabel(""8820497)
$Label[1] = GUICtrlCreateLabel(""216818889)
$Label[2] = GUICtrlCreateLabel(""8112196105)
$Label[3] = GUICtrlCreateLabel(""216104196121)
$Label[4] = GUICtrlCreateLabel(""823220457)
$Label[5] = GUICtrlCreateLabel(""21623219665)
GUISetState(@SW_SHOW)


Do
    
$Stats ProcessGetStats("explorer.exe"1)
    For 
$i 0 To 5
        
If GUICtrlRead($Label[$i]) <> $Stats[$iThen GUICtrlSetData($Label[$i], $Stats[$i])
    
Next

    Sleep
(10)
Until GUIGetMsg() == -
KDeluxe is offline  
Thanks
1 User
Old 02/20/2011, 21:42   #6
 
V8II's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 475
Received Thanks: 130
Eh ganz logisch
Danke Leute, ich war nur etwas verwirrt, weil ich mir gedacht habe das macht das automatisch ...
Thx an alle

Sorry für das hochpushen, ich wollte es nur nochmal sagen das ich euch wirklich ein thx gegeben habe (wie im Startpost gesagt) weil ich bisschen inaktiv war und es irgendwie so ausgesehen hatte wie "ok und bb"
V8II is offline  
Reply


Similar Threads Similar Threads
gordonsys hack funktioniert nicht mehr warum???
02/12/2011 - elite*gold Trading - 2 Replies
Bitte antwort brauche sie dringend
[Antwort] Warum der Public Vip bei mir nicht mehr funktioniert !!!
12/29/2010 - CrossFire - 15 Replies
Hallo Com, sicher haben viele den "neuen" public VIP Hack von Gameanarchy sofort ausprobiert als er hier veröffentlicht wurde. Alles klappte super doch seit gestern kommt dieser Fehler : http://img189.imageshack.us/img189/4886/problembk .jpg Fast alle haben sich nicht in dem Forum angemeldet, wo der Hack entstand.
Warum funktioniert dieser Quest nicht?
05/29/2010 - Metin2 Private Server - 23 Replies
Ich weiß nicht warum dieser Quest nicht funktioniert :( kann mir jemand helfen? MFG, TheEcoMaster
warum funktioniert der bot nicht !
01/13/2010 - AutoIt - 6 Replies
while 1 WinWaitActive ( "Counter-Strike Source" ) $Color1 = 0x4F583D $color2 = 0xDCD493 $color3 = 0x7B8371 $color4 = 0x7B8371 if $Color1 Then MouseClick ( "left" , $Color1) MouseClick ( "left" , $Color1) MouseClick ( "left" , $Color1)
[WICHTIG] Warum NewLongju2 nicht mehr Funktioniert = Hier die Antwort
08/25/2009 - Metin2 Private Server - 29 Replies
Olla zusammen Wie vermutlich das ganze EPvP Forum schon weiss kann man sich bei NewLongju2 Nicht mehr Anmelden Ihr fragt euch sicher nur warum ? Weil Alle ausländer gebannt wurden. Woher ich das weiss ?



All times are GMT +2. The time now is 06:31.


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