Hallo Comunity
Ich plane einen kleinen Web-Chat zwischen PHP und AutoIt.
Der erste Test läuft auch schon, allerdings benutze ich zum aktualisieren die Funktion _INetGetSource().
Allerdings flackert die Maus immer wenn die Funktion aufgerufen wird
Kann man das irgendwie umgehen?
Gibt es eine bessere Möglichkeit AutoIt und PHP zu verbinden?
Ist WinHTTP sinnvoll? (Wenn ja, wo kann ich es runterladen? [Die Downloadseite im englischen Forum funzt nicht])
Hier ist mal der Code:
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <Inet.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 458, 477, 192, 124)
GUISetOnEvent(-3, "_exit")
$Edit1 = GUICtrlCreateEdit("", 8, 8, 441, 369, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL))
$hinet = _IECreateEmbedded()
$obj = GUICtrlCreateObj($hinet, 50, 50, 1, 1)
$cInput = GUICtrlCreateEdit("", 8, 384, 361, 89, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_HSCROLL))
$Button1 = GUICtrlCreateButton("Senden", 376, 384, 75, 25, $WS_GROUP)
GUIctrlSetOnEvent(-1, "_do")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Global $oldSource = -1
$Username = InputBox("", "")
While 1
Sleep(1000)
$x = _INetGetSource("http://www.meineseite/verlauf.txt")
if $oldSource <> $x Then
;$x = FileRead(@desktopdir &"/verlauf.txt")
$a = StringSplit($x, "|")
GUICtrlSetData($Edit1, GUICtrlRead($Edit1) & $a[$a[0]-1] & @CRLF)
$oldSource = $x
endif
WEnd
Func _do()
_IENavigate($hinet, "http://www.meineseite.de/index.php?msg=" & StringReplace(GUICtrlRead($cInput),"|", "") & "|&snd=" & $Username)
EndFunc
Func _exit()
Exit
EndFunc
Danke jetzt schon für die Hilfe
Gruß Tim