Fachkundige und individuelle Beratung ist für uns selbstverständlich - rufen Sie uns an!
Sie erreichen unsere Hotline werktags von 10:00 bis 18:00 Uhr unter der 07171 8712 0 (Samstags: 10:00 bis 12:00 Uhr). Außerhalb Deutschlands wählen Sie +49 7171 87120. Im Dialog finden wir die optimale Klanglösung für Sie und klären etwaige Fragen oder Schwierigkeiten. Das nuForum ist seit dem 19. Juli 2023 im read-only-Modus: Das Ende einer Ära: Das nuForum schließt

Lautsprecher-Schnäppchen tagesaktuell?

Fragen und Antworten rund um Produkte und Dienstleistungen der Nubert Speaker Factory und Nubert electronic GmbH.
Benutzeravatar
mk_stgt
Veteran
Veteran
Beiträge: 45267
Registriert: Mi 21. Apr 2010, 19:01
Has thanked: 90 times
Been thanked: 376 times

Re: Lautsprecher-Schnäppchen tagesaktuell?

Beitrag von mk_stgt »

kann jeder sagen ....
alles Gute und bleibt gesund!
Benutzeravatar
mk_stgt
Veteran
Veteran
Beiträge: 45267
Registriert: Mi 21. Apr 2010, 19:01
Has thanked: 90 times
Been thanked: 376 times

Re: Lautsprecher-Schnäppchen tagesaktuell?

Beitrag von mk_stgt »

also : gestehe! :mrgreen:
alles Gute und bleibt gesund!
franzp
Semi
Semi
Beiträge: 104
Registriert: Do 8. Sep 2011, 12:20

Re: Lautsprecher-Schnäppchen tagesaktuell?

Beitrag von franzp »

nagut ich gebs zu.. :bow-yellow:

und hier ist der Quellcode, falls jemand auch die Schnäppchen Seite "Häcken" möchte :lol:

Code: Alles auswählen

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=Actions-speaker.ico
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <Array.au3>
#include <GuiStatusBar.au3>
#include <Inet.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#Region ### START Koda GUI section ###
$Form2 = GUICreate("Nubert Schnäppchen Watcher", 488, 157, 225, 169)
$inp_url1 = GUICtrlCreateInput("http://www.nubert.de/index.php?id=34", 15, 38, 247, 21)
$inp_url2 = GUICtrlCreateInput("http://www.nubert.de/index.php?id=35", 15, 69, 249, 21)
$Label1 = GUICtrlCreateLabel("URL´s zum prüfen ohne Session ID !", 16, 14, 176, 17)
$inp_min = GUICtrlCreateInput("60", 392, 38, 40, 21)
$Label2 = GUICtrlCreateLabel("Intervall in Minuten", 384, 18, 93, 17)
$btn_start = GUICtrlCreateButton("start", 15, 98, 75, 25, $WS_GROUP)
$StatusBar1 = _GUICtrlStatusBar_Create($Form2)
$btn_stop = GUICtrlCreateButton("stop", 97, 98, 75, 25, $WS_GROUP)
$inp_com1 = GUICtrlCreateInput("Nubox Seite", 270, 38, 102, 21)
$Label3 = GUICtrlCreateLabel("Kommentar", 271, 18, 57, 17)
$inp_com2 = GUICtrlCreateInput("Nuline Seite", 270, 69, 102, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Global $nexttime

GUICtrlSetState($btn_stop, $GUI_DISABLE)

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit

		Case $btn_start
			GUICtrlSetState($btn_stop, $GUI_ENABLE)
			GUICtrlSetState($btn_start, $GUI_DISABLE)
			GUICtrlSetState($inp_url1, $GUI_DISABLE)
			GUICtrlSetState($inp_url2, $GUI_DISABLE)
			GUICtrlSetState($inp_min, $GUI_DISABLE)
			if GUICtrlRead($inp_min) < 10 Then
				MsgBox(16, "Achtung", "Achtung eine Prüfung unter 10 Minuten ist nicht erlaubt!")
				ControlClick("","", $btn_stop)
			Else
				_GUICtrlStatusBar_SetText($StatusBar1, "lade URL´s......")
				_getsource(GUICtrlRead($inp_url1), GUICtrlRead($inp_url2))
				_startwatch()
			EndIf


		Case $btn_stop
			GUICtrlSetState($btn_start, $GUI_ENABLE)
			GUICtrlSetState($btn_stop, $GUI_DISABLE)
			GUICtrlSetState($inp_url1, $GUI_ENABLE)
			GUICtrlSetState($inp_url2, $GUI_ENABLE)
			GUICtrlSetState($inp_min, $GUI_ENABLE)
			_stopwatch()

	EndSwitch
WEnd

func _startwatch()
	_GUICtrlStatusBar_SetText($StatusBar1, "Überprüfung alle : " & GUICtrlRead($inp_min) & " Minuten")
	$ms = GUICtrlRead($inp_min) * 60 * 1000
	_compare()
	AdlibRegister("_compare", $ms)
	AdlibRegister("_showtime", 1000)
EndFunc

func _stopwatch()
	AdlibUnRegister("_compare")
	AdlibUnRegister("_showtime")
EndFunc

func _showtime()
	_GUICtrlStatusBar_SetText($StatusBar1, "Uhrzeit: " & _NowTime() & " ->  nächste Prüfung um : " & $nexttime)
EndFunc


func _compare()
	;setze nächste Prüfung
	$nexttime = _Dateadd('n', guictrlread($inp_min), _NowCalc())
	ConsoleWrite($nexttime & @crlf)

	; lade temps und speichern als html
	$temp1 = FileOpen("temp1.html", 2)
	FileWrite($temp1, _INetGetSource (GUICtrlRead($inp_url1)))
	FileClose($temp1)
	$temp2 = FileOpen("temp2.html", 2)
	FileWrite($temp2, _INetGetSource (GUICtrlRead($inp_url2)))
	FileClose($temp2)


	$source1 = FileOpen("url1.html")
	$so_html1 = FileRead($source1)
	$sessionid1 = _StringBetween($so_html1, 'PHPSESSID=', '">')
	if IsArray($sessionid1) then $so_html1 = StringReplace($so_html1, $sessionid1[0], "")
	$so_html1 = StringReplace($so_html1, @CRLF, "")
	$so_html1 = StringReplace($so_html1, @LF, "")
	$so_html1 = StringReplace($so_html1, "&PHPSESSID=", "")
	$source_array1 = StringRegExp($so_html1, 'class="products-info-list">(.*?)<script type="text/javascript">', 3)

	$source2 = FileOpen("url2.html")
	$so_html2 = FileRead($source2)
	$sessionid2 = _StringBetween($so_html2, 'PHPSESSID=', '">')
	if IsArray($sessionid2) Then $so_html2 = StringReplace($so_html2, $sessionid2[0], "")
	$so_html2 = StringReplace($so_html2, @CRLF, "")
	$so_html2 = StringReplace($so_html2, @LF, "")
	$so_html2 = StringReplace($so_html2, "&PHPSESSID=", "")
	$source_array2 = StringRegExp($so_html2, 'class="products-info-list">(.*?)<script type="text/javascript">', 3)

	$test1 = FileOpen("temp1.html")
	$test_html1 = FileRead($test1)
	$test_sessionid1 = _StringBetween($test_html1, 'PHPSESSID=', '">')
	if IsArray($test_sessionid1) then $test_html1 = StringReplace($test_html1, $test_sessionid1[0], "")
	$test_html1 = StringReplace($test_html1, @CRLF, "")
	$test_html1 = StringReplace($test_html1, @LF, "")
	$test_html1 = StringReplace($test_html1, "&PHPSESSID=", "")
	$test_array1 = StringRegExp($test_html1, 'class="products-info-list">(.*?)<script type="text/javascript">', 3)

	$test2 = FileOpen("temp2.html")
	$test_html2 = FileRead($test2)
	$test_sessionid2 = _StringBetween($test_html2, 'PHPSESSID=', '">')
	if IsArray($test_sessionid2) then $test_html2 = StringReplace($test_html2, $test_sessionid2[0], "")
	$test_html2 = StringReplace($test_html2, @CRLF, "")
	$test_html2 = StringReplace($test_html2, @LF, "")
	$test_html2 = StringReplace($test_html2, "&PHPSESSID=", "")
	$test_array2 = StringRegExp($test_html2, 'class="products-info-list">(.*?)<script type="text/javascript">', 3)

	ConsoleWrite($source_array1[0] & @CRLF)
	ConsoleWrite($test_array1[0] & @CRLF)

	if $source_array1[0] <> $test_array1[0] Then
		MsgBox(0, "UPDATE", "Es gibt ein Update auf der Schnäppchen-Seite : " & GUICtrlRead($inp_url1) & " / " & GUICtrlRead($inp_com1))
	EndIf

	if $source_array2[0] <> $test_array2[0] Then
		MsgBox(0, "UPDATE", "Es gibt ein Update auf der Schnäppchen-Seite : " & GUICtrlRead($inp_url2) & " / " & GUICtrlRead($inp_com2))
	EndIf
EndFunc

Func _getsource($url1, $url2)
	$file1 = FileOpen("url1.html", 2)
	FileWrite($file1, _INetGetSource ($url1))
	FileClose($file1)
	$file2 = FileOpen("url2.html", 2)
	FileWrite($file2, _INetGetSource ($url2))
	FileClose($file2)
EndFunc
statt der Msgbox kann hier einfach eine E-mail angestoßen werden...
2x Nuline 82 + atm, ws-12, KRF-X9060D, Sony 52"
Antworten