Code : Tout sélectionner
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <Google Maps.au3>
#include <File.au3>
#Region ### START Koda GUI section ### Form=c:\program files (x86)\autoit3\scite\koda\forms\version1.kxf
$Form1_1 = GUICreate("Bip Bip", 1920, 1080, -269, 142)
$Button1 = GUICtrlCreateButton("START", 1680, 744, 161, 225)
GUICtrlSetBkColor(-1, 0xB9D1EA)
GUICtrlSetCursor (-1, 0)
$Group1 = GUICtrlCreateGroup("Plan", 16, 24, 1593, 969)
GUICtrlSetBkColor(-1, 0xB9D1EA)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Informations trajet", 1656, 320, 201, 369)
GUICtrlSetBkColor(-1, 0xD7E4F2)
GUICtrlCreateEdit("", 1672, 344, 169, 329)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Radio1 = GUICtrlCreateRadio("ISEN", 1650, 230, 113, 17)
$Radio2 = GUICtrlCreateRadio("MATCH", 1650, 180, 113, 17)
$Radio3 = GUICtrlCreateRadio("Catho", 1650, 280, 113, 17)
$Radio4 = GUICtrlCreateRadio("Grand place Lille", 1650, 130, 145, 17)
$RESET = GUICtrlCreateButton("RESET", 1680, 40, 179, 49)
GUICtrlSetBkColor(-1, 0xB9D1EA)
$url = @ScriptDir & "\gmapsroute.html";lecture de la page html
$url = "https://www.google.fr/maps/dir///@50.6343536,3.040674,14z/data=!4m3!4m2!1m0!1m0"
$ie = _IECreateEmbedded()
$ieobject = GUICtrlCreateObj($ie, 16, 16, 1593, 969)
Local $lat = "40"
_ReplaceStringInFile($url, "LATITUDE", $lat, 1, 0) ;Paramètre 1 = Sensible a la casse || Paramètre 0 = Remplace le premier trouvé
Local $lon = "-100"
_ReplaceStringInFile($url, "LONGITUDE", $lon, 1, 0) ;Paramètre 1 = Sensible a la casse || Paramètre 0 = Remplace le premier trouvé
Local $ZoomLevel = "12"
_ReplaceStringInFile($url, "ALTITUDE", $ZoomLevel, 1, 0) ;Paramètre 1 = Sensible a la casse || Paramètre 0 = Remplace le premier trouvé
_IENavigate($ie, $url, 0)
Sleep(2000)
GUISetState()
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $RESET
_IENavigate($ie, $url, 0)
Case $GUI_EVENT_CLOSE
Exit
Case $Radio1
$nMsg2 = 3
Case $Radio2
$nMsg2 = 4
Case $Radio3
$nMsg2 = 5
Case $Radio4
$nMsg2 = 6
Case $Button1
Switch $nMsg2
Case 3
Send("Isen Lille")
Send("{tab}")
Send("Isen Lille{enter}")
Case 4
Send("Isen Lille")
Send("{tab}")
Send("match solférino lille{enter}")
Case 5
Send("Isen Lille")
Send("{tab}")
Send("Université catholique Lille{enter}")
Case 6
Send("Isen Lille")
Send("{tab}")
Send("Grand place lille{enter}")
EndSwitch
EndSwitch
WEnd