bien le bonjour !
je suis entrain de me faire un script pour me simplifier la vie, le suivie de mes colissimos.
j ai pour le moment reussi a extraire et creer un fichier qui rassemble le nom de mes clients et le numero colissimo.
j'ai la page web colissomo qui s'affiche
j'ai mes boutons qui se créent en fonction du nombre de ligne du fichier csv, et qui prennent le nom du client
mes liens vers le site colissimo se génèrent correctement.
mais problèmes je n'arrive pas a faire en sorte que mes boutons dirigent vers l'adresse générée.
je vous demande donc un coup de main, des indices ou même une solution ( avec explications si possible pour alimenter mon cerveau )
merci d'avance ! ( et soyez indulgents !! )
► Afficher le texte
Code : Tout sélectionner
#include <GUIConstantsEx.au3>
#include <IE.au3>
#include <WindowsConstants.au3>
#include <array.au3>
#include <file.au3>
Local $oIE = _IECreateEmbedded()
GUICreate("Colissimo", 1040, 650, _
(@DesktopWidth - 1100), (@DesktopHeight - 670), _
$WS_OVERLAPPEDWINDOW + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN)
GUICtrlCreateObj($oIE, 50, 10, 750, 600)
$ya = 0
Local $idButton_Home = GUICtrlCreateButton("Start", 230, 610, 100, 30)
Local $idButton_Stop = GUICtrlCreateButton("Stop", 340, 610, 100, 30)
GUISetState(@SW_SHOW) ;Show GUI
_IENavigate($oIE, "http://www.colissimo.fr")
_IEAction($oIE, "stop")
While 1
Local $iMsg = GUIGetMsg()
Select
Case $iMsg = $GUI_EVENT_CLOSE
ExitLoop
Case $iMsg = $idButton_Home
; dans le futur : sauvegarde a J+10 en pdf des pages HTML
; $sPdf = "test.pdf"
;RunWait(@ScriptDir & '\wkhtmltopdf.exe "' & $Html & '" "' & $sPdf & '"')
Dim $oneDarray
_FileReadToArray(@ScriptDir & "\" & "test.csv", $oneDarray)
$columnsCounter = stringsplit($oneDarray[1],";")
Dim $twoDarray[$oneDarray[0] + 1][$columnsCounter[0] + 1]
For $x = 1 to ($oneDarray[0])
$oneRow = stringsplit($oneDarray[$x],";")
For $y = 1 to ($columnsCounter[0])
$twoDarray[$x][$y] = $oneRow[$y]
Next
Next
$Fichier = "test.csv"
Local $count = _FileCountLines($Fichier)
; MsgBox(0, "", $count)
For $i = 1 To $count
; MsgBox(0, "", $twoDarray[$i][4] & $twoDarray[$i][5])
Local $id = GUICtrlCreateButton($twoDarray[$i][4], 930, $ya+20, 100, 30)
$ya = $ya+40
$html = "http://www.colissimo.fr/portail_colissimo/suivre.do?colispart=" & $twoDarray[$i][5]
_IENavigate($oIE, $html)
Next
Case $iMsg = $idButton_Stop
_IEAction($oIE, "stop")
EndSelect
WEnd
GUIDelete()
Exit
mon fichier test.csv ( aucune information n'est réelle bien sur )
► Afficher le texte
2014;08;29;Aglaee ;242171530;OK!
2014;08;30;Sidonie ;242171531;OK!
2014;09;02;Goldarak ;245145338;OK!
2014;09;02;Albator ;245164111;OK!
2014;09;02;Popori ;245175825;OK!
2014;09;02;FraggelRock ;245185818;OK!
2014;09;02;Candy ;245185957;OK!
2014;09;03;Maya ;246102406;OK!
2014;09;03;LegumeMan ;246160027;OK!
2014;09;03;GrosChat ;246170812;OK!
2014;09;03;Glouton ;246175848;OK!
2014;09;03;DurAMou ;247094058;OK!