Register for your free account! | Forgot your password?

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

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

Advertisement



GuiCtrlSetData/Imge funktioniert nicht

Discussion on GuiCtrlSetData/Imge funktioniert nicht within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 175
The Black Market: 233/4/1
Join Date: Apr 2011
Posts: 4,923
Received Thanks: 401
GuiCtrlSetData/Imge funktioniert nicht

Guten Tag liebe Com,
ich versuche nach einer If Abfrage eine PictureBox zu aktualisieren,
ich habe es bereits mir GUICtrlSetData und Image versucht, aber aus
irgendeinem Grund will das ganze nicht klappen.
Code folgt:

PHP Code:
               If ProcessExists("AdBuck.exe") = 1 Then
                  GUICtrlSetData
($Pic1$gruenp1)
               ElseIf  
ProcessExists("AdBuck.exe") = 0 Then
                  GUICtrlSetData
($Pic1$rotp1)
                  EndIf 
$Pic1 ist die PictureBox Control von AutoIt und $gruenp1 sowie $rotp1sind die Pfade zu den JPEG Dateien. Habt ihr evtl. eine Idee, woran es liegen könnte?
Hydroxyandrost is offline  
Old 07/24/2013, 12:34   #2
 
SpieleHacksInfo's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 448
Received Thanks: 278
Code:
If ProcessExists("AdBuck.exe") Then
                  GUICtrlSetData($Pic1, $gruenp1)
               Else
                  GUICtrlSetData($Pic1, $rotp1)
                  EndIf
oder

Code:
$process = ProcessExists("AdBuck.exe")
If  $process = True Then
                  GUICtrlSetData($Pic1, $gruenp1)
               Else
                  GUICtrlSetData($Pic1, $rotp1)
                  EndIf
versuche es mal bitte so und mache just 4 fun einmal bitte #requireadmin rein
SpieleHacksInfo is offline  
Old 07/24/2013, 12:56   #3
 
elite*gold: 175
The Black Market: 233/4/1
Join Date: Apr 2011
Posts: 4,923
Received Thanks: 401
Quote:
Originally Posted by SpieleHacksInfo View Post
Code:
If ProcessExists("AdBuck.exe") Then
                  GUICtrlSetData($Pic1, $gruenp1)
               Else
                  GUICtrlSetData($Pic1, $rotp1)
                  EndIf
oder

Code:
$process = ProcessExists("AdBuck.exe")
If  $process = True Then
                  GUICtrlSetData($Pic1, $gruenp1)
               Else
                  GUICtrlSetData($Pic1, $rotp1)
                  EndIf
versuche es mal bitte so und mache just 4 fun einmal bitte #requireadmin rein
Ist ja eig. das gleiche. ^^
Klappt trz. nicht
habe die Bilder auch mal als .bmp gespeichert, funktioniert jedoch nicht...
Hydroxyandrost is offline  
Old 07/24/2013, 13:30   #4
 
SpieleHacksInfo's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 448
Received Thanks: 278
kannst du mir den kompletten sc schicken keine angst ich mache damit nichts böses ich will mir den nur komplett anschauen
SpieleHacksInfo is offline  
Old 07/24/2013, 13:47   #5
 
YatoDev's Avatar
 
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
Im autoit talk gabs letztens eine super lösung zum picture box aktualisieren und als ich deine frage bei google eingegeben habe kahm ich auf das offizielle deutsche autoit forum und dort war auch eine schöne lösung zum copy&pasten vielleicht versuchst du da mal dein glück
YatoDev is offline  
Old 07/24/2013, 14:23   #6
 
elite*gold: 175
The Black Market: 233/4/1
Join Date: Apr 2011
Posts: 4,923
Received Thanks: 401
Wenn ich es so mache:

PHP Code:
If ProcessExists("AdBuck.exe"Then
                  GUICtrlSetData
($Pic1$gruenp1)
               Else
                  
GUICtrlSetData($Pic1$rotp1)
                  EndIf 
Öffnet er die rot.bmp
Das Problem liegt nicht an GUICtrlSetData sondern daran, dass er den Prozess anscheinend nicht richtig erkennt? Jedoch funktioniert ProcessExists bei einer anderen Funktion bspw hier:

PHP Code:
                     If ProcessExists("AdBuck.exe") = 0 then 
                     GUICtrlSetData
($Edit1,"[" _NowTime() & "] ""AdBuck wird neugestartet" & @CRLF1)
                     
Run($programmp1)
                     
Sleep($startz1)
                     
$connect=_ImageSearch($connectp1,1,$x2,$y2,0)
                     
MouseClick("LEFT",$x2,$y2)
                     
Sleep($loginz1)
                     
$big=_ImageSearch($groessep1,1,$x3,$y3,0)
                     
MouseClick("LEFT",$x3,$y3)
                     
Sleep(2000)
                     
$restarts=$restarts+1
                     GUICtrlSetData
($Label5,$restarts)
                     
GUICtrlSetData($Edit1,"[" _NowTime() & "] ""Neustart erfolgreich" & @CRLF1
Hier klappt alles. Das ist mein erstes kleines Programmierprojekt. ^^
Werde dir gleich eine PN schreiben
Hydroxyandrost is offline  
Old 07/24/2013, 14:42   #7
 
SpieleHacksInfo's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 448
Received Thanks: 278
So das Problem ist definitiv folgendes:

Code:
If ProcessExists("explorer.exe") [COLOR="Red"]= 1[/COLOR] Then
das ist falsch!

jedenfalls funktioniert das bei mir nicht, aber das:

Code:
If ProcessExists("explorer.exe") Then
Kompletter Code:
Code:
#RequireAdmin

If ProcessExists("explorer.exe") Then
	MsgBox(0,"" ,"jo")
Else
	MsgBox(0,"","no")
	EndIf
Wieso das so ist liegt daran: ProcessExist soll ja schon den wert 1 zurückgeben.

Du kannst es auch so machen:
Code:
 If ProcessExists("AdBuck.exe") Then
                  GUICtrlSetData($Pic1, $gruenp1)
               ElseIf  Not ProcessExists("AdBuck.exe") Then
                  GUICtrlSetData($Pic1, $rotp1)
                  EndIf
SpieleHacksInfo is offline  
Thanks
1 User
Old 07/24/2013, 14:45   #8
 
elite*gold: 175
The Black Market: 233/4/1
Join Date: Apr 2011
Posts: 4,923
Received Thanks: 401
Danke dir, funktioniert.
Hydroxyandrost is offline  
Reply


Similar Threads Similar Threads
Lord Wahl funktioniert nicht mehr / Behemoth Dungeon Eingang funktioniert nicht mehr
07/11/2012 - Flyff Private Server - 3 Replies
Wie es im Titel steht haben wir momentan 2 Probleme. Aus ungeklärten Ursachen geht mit Mal die Lord Wahl nicht mehr. Vor 2 Wochen funktionierte die Lord Wahl noch ohne Probleme, dieses Wochenende konnte man sich normal aufstellen, die Aufstellung wurde aber nicht geschlossen. Man konnte sich auch Samstag und Sonntag noch aufstellen. Außerdem wurde das Voting nicht gestartet, es wurde nicht möglich, jemanden der aufgestellten zu wählen. Wie gesagt, vor 2 Wochen und auch vor 4 Wochen...
guictrlsetdata mit random beim label geht nicht!
06/23/2012 - AutoIt - 5 Replies
Hallo community, ich habe hier ein problem: ich möchte einen mathe trainer erstellen, und will das label wo die zahl drinne steht, mit guictrlsetdata ein random per variable einbauen, dies klappt aber nicht. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3>
GUiCtrlSetData
09/18/2011 - AutoIt - 5 Replies
Hey Com, nochmal ne frage, versuche einen Text aus Ini auszulesen: Versionsinfos="Data1|Data2|Data3" und diesen dann mit Leerzeichen zwischen den einzelnen gesplitteten Daten in das Label eintrage soll, allerdings funktioniert es nicht, aber es kommt auch kein Fehler...
guictrlsetdata()
05/24/2011 - AutoIt - 1 Replies
HI, wie kann ich was in einem Tabsheet/Tab item schreiben lassen?? Guictrlsetdata($tab1, ""&" .Login Game") Wird nicht angezeigt. Nur wenn ich mit dem AutoIT window info tool rübergehe zeigt es mir an dass da doch was steht ich kanns aber nicht sehen...
Bei mir funktioniert das Löschcode nicht. Er hat mal funktioniert
01/07/2010 - Metin2 Private Server - 0 Replies
Hi. Also auf mienem PServer geht das mit dem Löschcode nicht. Kann mir jemand sagen warum? Ich weiß noch das es mal ging. Aber den Spieler in der Datenbank löschen geht nicht weil da diser lvl 0 charackter bleibt und ich nciht weiß wie man den weg kriegt Bitte kan mir jemand helfen.



All times are GMT +1. The time now is 06:40.


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.