si j'ouvre ce post c'est bien qu'il n'y à eu aucune réponse à celui-ci et étant donner que je m'était un peu incruster je préfère le recommencer ...
Donc voilà, pouvez vous me dire si chez vous le script fonctionne et sinon m'aider à en trouver la cause. Chez moi il fonctionne très bien, mais pas chez ma mamie !
Code : Tout sélectionner
#include <IE.au3>
#include <String.au3>
Sleep(3000)
; On fait en sorte que le prog démarre au démarrage
$control = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName)
If $control = "" Then
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName, "REG_SZ", @ScriptFullPath)
$control = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName)
If $control = "" Then MsgBox(16, "Erreur", "La valeur" & @CRLF & @ScriptName & @CRLF & "n'a pas été créée dans le registre")
EndIf
While 1 ;On attend que l'ordinateur est chargé (du moins puisse ouvrir une page web)
Local $sHTML = BinaryToString(InetRead("https://wifi.free.fr"))
Local $co = _StringBetween($sHTML, "<h1>", "</h1>")
If IsArray($co) Then
$oIE = _IECreate("https://wifi.free.fr")
$hwnd = _IEPropertyGet($oIE, "hwnd")
$oForms = _IEFormGetCollection($oIE, 0)
$oLogin = _IEFormElementGetObjByName($oForms, "login")
$oPassword = _IEFormElementGetObjByName($oForms, "password")
$oValider = _IEFormElementGetObjByName($oForms, "submit")
_IEFormElementSetValue($oLogin, "3956011846")
_IEFormElementSetValue($oPassword, "xD")
_IEAction($oValider, "click")
While WinGetTitle("[active]") <> "FreeWifi - Windows Internet Explorer" ;tant qu'une nouvelle page nous est pas renvoyé
Sleep(500)
WEnd
Local $sHTML = _IEBodyReadHTML($oIE)
Local $co_reu = _StringBetween($sHTML,'<h1 class="red">',"</h1>")
_IEQuit($oIE)
If IsArray($co_reu) And $co_reu[0] = "CONNEXION AU SERVICE REUSSIE" Then ; On indique si tout c'est bien passé ou pas
TrayTip("Connexion réussi", "FreeWifi Power !!", 3)
Sleep(4000)
Else
TrayTip("Erreur de connexion", "Mon prog n'a pas réussi à te connecter à Freewifi", 4)
Sleep(5000)
EndIf
ExitLoop
EndIf
Sleep(3000)
WEndMerci d'avance à tous ceux qui prendrons le temps de lire ce post.
J'en profite pour demander pourquoi différent design du site selon si on est co ou pas ?




