hi ich habe angefangen ein tool für ein handels forum (diablo2) zu schreiben
(so ne art tracker)
hat für mich eigentlich keinen wirklichen nutzen (spiele kein diablo )
sondern eher um was zu haben was ich schreiben kann
bin auf ein kleines problem gestoßen...
nämlich herauszufinden bei welcher toppic nummer das forum grade ist
(mit jedem beitrag steigt diese um +1)
habe mir daher folgendes ausgedacht
kann mir evtl. jemand noch tipps geben wie man das noch lösen könnte
oder was für fehler ich gemacht habe?
thx windforce
Spoiler anzeigen
#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]$Form1 = GUICreate("Überwachung", 241, 105, 225, 168)
$Label2 = GUICtrlCreateLabel("Kallibrierung", 8, 8, 61, 17)
$Button1 = GUICtrlCreateButton("Start", 80, 8, 75, 25, 0)
$Button2 = GUICtrlCreateButton("Stop", 160, 8, 75, 25, 0)
$Label1 = GUICtrlCreateLabel("", 8, 40, 228, 20)
$Label3 = GUICtrlCreateLabel("Überwachung", 8, 72, 71, 17)
$Button3 = GUICtrlCreateButton("Start", 80, 72, 75, 25, 0)
$Button4 = GUICtrlCreateButton("Stop", 160, 72, 75, 25, 0)
GUISetState(@SW_SHOW)
$suche = "test"
$abbruch = 0
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Do
$inizahl = IniRead( "zahl.ini", "section", "zahl", 0 )
$zahlneu = $inizahl + 10000
InetGet ( "http://forums.d2jsp.org/index.php?showtopic="&$zahlneu&"&f=54", "page.html" , 1 )
$file = FileOpen("page.html", 0)
$line = FileReadLine($file , 41)
$suche = StringInStr( $line, "Sorry")
GUICtrlSetData($Label1, $zahlneu)
IniWrite ( "zahl.ini", "section", "zahl", $zahlneu )
Until $suche = 20
Do
$inizahl = IniRead( "zahl.ini", "section", "zahl", 0 )
$zahlneu = $inizahl - 1000
InetGet ( "http://forums.d2jsp.org/index.php?showtopic="&$zahlneu&"&f=54", "page.html" , 1 )
$file = FileOpen("page.html", 0)
$line = FileReadLine($file , 41)
$suche = StringInStr( $line, "Sorry")
GUICtrlSetData($Label1, $zahlneu)
IniWrite ( "zahl.ini", "section", "zahl", $zahlneu )
Until $suche = 0
Do
$inizahl = IniRead( "zahl.ini", "section", "zahl", 0 )
$zahlneu = $inizahl + 100
InetGet ( "http://forums.d2jsp.org/index.php?showtopic="&$zahlneu&"&f=54", "page.html" , 1 )
$file = FileOpen("page.html", 0)
$line = FileReadLine($file , 41)
$suche = StringInStr( $line, "Sorry")
GUICtrlSetData($Label1, $zahlneu)
IniWrite ( "zahl.ini", "section", "zahl", $zahlneu )
Until $suche = 20
Do
$inizahl = IniRead( "zahl.ini", "section", "zahl", 0 )
$zahlneu = $inizahl - 10
InetGet ( "http://forums.d2jsp.org/index.php?showtopic="&$zahlneu&"&f=54", "page.html" , 1 )
$file = FileOpen("page.html", 0)
$line = FileReadLine($file , 41)
$suche = StringInStr( $line, "Sorry")
GUICtrlSetData($Label1, $zahlneu)
IniWrite ( "zahl.ini", "section", "zahl", $zahlneu )
Until $suche = 0
Do
$inizahl = IniRead( "zahl.ini", "section", "zahl", 0 )
$zahlneu = $inizahl + 1
InetGet ( "http://forums.d2jsp.org/index.php?showtopic="&$zahlneu&"&f=54", "page.html" , 1 )
$file = FileOpen("page.html", 0)
$line = FileReadLine($file , 41)
$suche = StringInStr( $line, "Sorry")
GUICtrlSetData($Label1, $zahlneu)
IniWrite ( "zahl.ini", "section", "zahl", $zahlneu )
Until $suche = 20
GUICtrlSetData($Label1, "Fertig")
Case $Button2
$abbruch = 1
Case $Button3
$Form2 = GUICreate("Form2", 633, 447, 193, 125)
$Label4 = GUICtrlCreateLabel("Überwachung", 8, 8, 71, 17)
$List1 = GUICtrlCreateList("", 8, 40, 617, 396)
$Button5 = GUICtrlCreateButton("Auswahl aufrufen", 512, 8, 107, 25, 0)
$Button6 = GUICtrlCreateButton("Start", 96, 8, 75, 25, 0)
$Button7 = GUICtrlCreateButton("Stop", 184, 8, 75, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button7
GUIDelete()
Case $Button6
Do
;$nMsg = GUIGetMsg()
$inizahl = IniRead( "zahl.ini", "section", "zahl", 0 )
InetGet ( "http://forums.d2jsp.org/index.php?showtopic="&$inizahl&"&f=54", "page.html" , 1 )
$file = FileOpen("page.html", 0)
$line = FileReadLine($file , 1)
$lineleft = StringTrimLeft ( $line, 35 )
$lineright = StringTrimRight ( $lineleft, 94 )
Sleep(1000)
If $lineright = "Board Message" Then ContinueLoop
GUICtrlSetData ( $List1, $lineright )
$zahlneu = $inizahl + 1
IniWrite ( "zahl.ini", "section", "zahl", $zahlneu )
Until $nMsg = $Button7
Case $Button7
ExitLoop
EndSwitch
WEnd
EndSwitch
WEnd