Wie wärs mit einer While Schleife?
Mit dem Befehl ExitLoop kann man jederzeit aus der Schleife ausbrechen falls von Nöten
Mit dem Befehl ExitLoop kann man jederzeit aus der Schleife ausbrechen falls von Nöten
ProgressOn("Progress Bar", "Sample progress bar", "Working...")
For $i = 0 To 100
ProgressSet($i)
Sleep(5)
Next
ProgressSet(100, "Done!")
Sleep(750)
ProgressOff()
Die For Schleife fühlt die Progressbar jede 5 millisekunden (Sleep(5)) um 1 (For Step 1) aufQuote:
hallo. ich habe eine frage: wie benutzt man die progress bar?
ich habe auf [Only registered and activated users can see links. Click Here To Register...] gesucht und das gefunden:
aber ich kann nicht finden wie die zeit wirkt. irgend eine hilfe...endweder wie man diese zeiten handeln muss oder eine andere art progressbar zu erstellenCode:ProgressOn("Progress Bar", "Sample progress bar", "Working...") For $i = 0 To 100 ProgressSet($i) Sleep(5) Next ProgressSet(100, "Done!") Sleep(750) ProgressOff()
$read1 = IniRead("config.ini", "Proxy-Liste", "Proxy 1",1)
Func _Laden ()
$read1 = IniRead("config.ini", "Proxy-Liste", "Proxy 1",1)
$read2 = IniRead("config.ini", "Proxy-Liste", "Proxy 2",1)
$read3 = IniRead("config.ini", "ID-Liste", "ID 1",1)
$read4 = IniRead("config.ini", "ID-Liste", "ID 2",1)
$read5 = IniRead("config.ini", "Passwort-Liste", "Passwort 1",1)
$read6 = IniRead("config.ini", "Passwort-Liste", "Passwort 2",1)
MsgBox(0,"Laden", GUICtrlRead($Input1))
MsgBox(0,"Laden", GUICtrlRead($read1)) ; hier bekomme ich den Wert 0
$Input1 = GUICtrlSetData($Input5,$read1)
$Input2 = GUICtrlSetData($Input6,$read2)
$Input3 = GUICtrlSetData($Input5,$read3)
$Input4 = GUICtrlSetData($Input6,$read4)
$Input5 = GUICtrlSetData($Input5,$read5)
$Input6 = GUICtrlSetData($Input6,$read6)
MsgBox(0,"Laden", "Erfolgreich geladen!")
MsgBox(0,"Laden", GUICtrlRead($Input1)) ;hier bekomme ich den Wert 0
MsgBox(0,"Laden", GUICtrlRead($read1)) ;hier bekomme ich den Wert 0
#include <IE.au3>
$URL = "http://www.google.de"
$IE = _IECreate($URL)
$HTML = _IEDocReadHTML($IE)
FileWrite("Test.txt",$HTML)
Die .ini sollte ein paar kb (kilobyte) Größe nicht überschreiten. Ansonsten steigen die Zugriffszeiten ins Unermessliche.Quote:
PHP Code:Func _Laden ()
$read1 = IniRead("config.ini", "Proxy-Liste", "Proxy 1",1)
$read2 = IniRead("config.ini", "Proxy-Liste", "Proxy 2",1)
$read3 = IniRead("config.ini", "ID-Liste", "ID 1",1)
$read4 = IniRead("config.ini", "ID-Liste", "ID 2",1)
$read5 = IniRead("config.ini", "Passwort-Liste", "Passwort 1",1)
$read6 = IniRead("config.ini", "Passwort-Liste", "Passwort 2",1)
MsgBox(0,"Laden", GUICtrlRead($Input1))
MsgBox(0,"Laden", GUICtrlRead($read1)) ; hier bekomme ich den Wert 0
$Input1 = GUICtrlSetData($Input5,$read1)
$Input2 = GUICtrlSetData($Input6,$read2)
$Input3 = GUICtrlSetData($Input5,$read3)
$Input4 = GUICtrlSetData($Input6,$read4)
$Input5 = GUICtrlSetData($Input5,$read5)
$Input6 = GUICtrlSetData($Input6,$read6)
MsgBox(0,"Laden", "Erfolgreich geladen!")
MsgBox(0,"Laden", GUICtrlRead($Input1)) ;hier bekomme ich den Wert 0
MsgBox(0,"Laden", GUICtrlRead($read1)) ;hier bekomme ich den Wert 0
FileOpen FileRead FileWrite FileClose StringRegExp
Nochmal meinen alten beitrag gepusht ^^ :)Quote:
Ich kann dir nur beim 2. Helfen.Quote:
Nochmal meinen alten beitrag gepusht ^^ :)
Und noch ne frage :
Kann ich während mein script ausgeführt wird bei einer progress bar das maximum von 100 verändern ?
GuiCtrlSetLimit() funktioniert bei mr nicht :Quote:
Ich kann dir nur beim 2. Helfen.
Es gibt 2 möglichkeiten :
Du benutzt guictrlsetlimit oder passt dein Ergebniss auf die 100% an
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("Progress", 337, 54, 192, 124)
$Button1 = GUICtrlCreateButton("Go !", 248, 0, 83, 49)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Progress1 = GUICtrlCreateProgress(0, 0, 246, 41)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Go()
EndSwitch
WEnd
Func _Go()
$nummer = 0
$sleep = 2000
GUICtrlSetLimit($Progress1,$sleep,0)
$i = 0
$Timer = TimerInit()
Do
sleep(10)
$nummer = $nummer + 10
GUICtrlSetData($Progress1,$nummer)
$diff = TimerDiff($Timer)
Until $diff > $sleep
EndFunc
Kommt da ein Error ? oder verändert er da nichts ?(bin gerade am Handy , kanns also nicht Testen).Quote:
GuiCtrlSetLimit() funktioniert bei mr nicht :
Code:#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1_1 = GUICreate("Progress", 337, 54, 192, 124) $Button1 = GUICtrlCreateButton("Go !", 248, 0, 83, 49) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Progress1 = GUICtrlCreateProgress(0, 0, 246, 41) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _Go() EndSwitch WEnd Func _Go() $nummer = 0 $sleep = 2000 GUICtrlSetLimit($Progress1,$sleep,0) $i = 0 $Timer = TimerInit() Do sleep(10) $nummer = $nummer + 10 GUICtrlSetData($Progress1,$nummer) $diff = TimerDiff($Timer) Until $diff > $sleep EndFunc
ich weis (dreisatz : p*w/100 oder sowas)Quote:
Kommt da ein Error ? oder verändert er da nichts ?(bin gerade am Handy , kanns also nicht Testen).
Ansonnsten würde ich ich das Ergebnis auf die Progressbar anpassen (dividieren oder Multiplizieren).
Quote:
Zitat von Evoh12
und schon wieder habe ich ein Problem....
ich habe mir jetzt einmal ein Laden-Script erstellt, nur wenn ich es lade erhalte ich falsche Werte (hier 0).
Also habe ich mir mal MsgBoxen dazwischen gebaut um den Fehler zufinden. Nur leider weiß ich nicht, was dort falsch ist, denn der Fehler müsste in dieser Zeile liegen.
PHP-Code:
$read1 = IniRead("config.ini", "Proxy-Liste", "Proxy 1",1)
Ich denke die 0 ist eine ID oder ähnliches...
PHP-Code:
Func _Laden ()
$read1 = IniRead("config.ini", "Proxy-Liste", "Proxy 1",1)
$read2 = IniRead("config.ini", "Proxy-Liste", "Proxy 2",1)
$read3 = IniRead("config.ini", "ID-Liste", "ID 1",1)
$read4 = IniRead("config.ini", "ID-Liste", "ID 2",1)
$read5 = IniRead("config.ini", "Passwort-Liste", "Passwort 1",1)
$read6 = IniRead("config.ini", "Passwort-Liste", "Passwort 2",1)
MsgBox(0,"Laden", GUICtrlRead($Input1))
MsgBox(0,"Laden", GUICtrlRead($read1)) ; hier bekomme ich den Wert 0
$Input1 = GUICtrlSetData($Input5,$read1)
$Input2 = GUICtrlSetData($Input6,$read2)
$Input3 = GUICtrlSetData($Input5,$read3)
$Input4 = GUICtrlSetData($Input6,$read4)
$Input5 = GUICtrlSetData($Input5,$read5)
$Input6 = GUICtrlSetData($Input6,$read6)
MsgBox(0,"Laden", "Erfolgreich geladen!")
MsgBox(0,"Laden", GUICtrlRead($Input1)) ;hier bekomme ich den Wert 0
MsgBox(0,"Laden", GUICtrlRead($read1)) ;hier bekomme ich den Wert 0
und ein weiters:
Ich möchte gerne den Seitenquelltext von einer Seite speichern, in einer .txt Datei.
PHP-Code:
#include <IE.au3>
$URL = "http://www.google.de"
$IE = _IECreate($URL)
$HTML = _IEDocReadHTML($IE)
FileWrite("Test.txt",$HTML)
Ich würde gerne den Quelltext nach dem Login auslesen, jedoch egal welche URL ich nehme, auch wenn ich mich eingeloggt habe, bekomme ich nicht den Quelltext nach dem Login.
Danke und Gruß
Evoh
Ja, die ist jetzt 146kb groß, aber bei meinem Problem spielt die Zugriffdauer doch noch gar keine Rolle oder?Quote:
Zitat von Achat
Die .ini sollte ein paar kb (kilobyte) Größe nicht überschreiten. Ansonsten steigen die Zugriffszeiten ins Unermessliche.
Wenn du große Datenmengen speichern und lesen möchtest, benutzte einfach diese Funktionen:
Code:
FileOpen
FileRead
FileWrite
FileClose
StringRegExp
Eine Erklärung dieser Funktionen findest du in der AutoIt Hilfe, u.a. hier
MfG
MfG