
Bref, y'a des jours où je doit vraiment rien avoir a faire, alors suite a une remarque que j'avais faite sur se site (toutes les photos ne sont pas forcément afficher), j'ai fait sa :
► Afficher le texte
Code : Tout sélectionner
;-----------------------------------------------------------Includes :
#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
;-----------------------------------------------------------Variables :
Global $y=1
Global $url = 1
Global $url_full = 1
Global $num = 1
;-----------------------------------------------------------GUI :
$Form1 = GUICreate("Photo Adopte un mec !!!", 815, 600)
GUICtrlCreateGroup("Recherche / Action", 10,10,795,60)
$fiche = GUICtrlCreateInput("Numéros de la fiche", 20,30,250,30) ;
$cherche = GUICtrlCreateButton("Chercher",280,30,75,30)
$previous = GUICtrlCreateButton("<<",370,30,75,30)
$label = GUICtrlCreateLabel("Photo numéros : "& $y, 450,40)
$next = GUICtrlCreateButton(">>",550,30,75,30)
$enregistrer = GUICtrlCreateButton("Enregistrer la photo sous ...",640,30,150,30)
GUISetState(@SW_SHOW)
$oIE = _IECreateEmbedded()
GUICtrlCreateObj($oIE, 10, 80, 795, 510)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $cherche
fiche()
case $previous
previous()
case $next
suivant()
case $enregistrer
dl()
EndSwitch
WEnd
;-----------------------------------------------------------Fonctions :
func display()
if $url = 1 then
else
global $url_full = $url & $y & ".jpg"
_IENavigate($oIE,$url_full)
EndIf
endfunc
func suivant()
$y = $y + 1
display()
$label = GUICtrlCreateLabel("Photo numéros : "& $y, 450,40)
endfunc
func previous()
$y = $y - 1
if $y = 0 Then
$y = 1
EndIf
display()
$label = GUICtrlCreateLabel("Photo numéros : "& $y, 450,40)
endfunc
func fiche()
Global $y=1
$label = GUICtrlCreateLabel("Photo numéros : "& $y, 450,40)
Global $num = GUICtrlRead($fiche)
if StringIsDigit($num) = 1 Then ;verification du numéros de la fiche
If stringlen($num) = 8 then
$split = StringSplit($num,"")
$url = "http://p" & $split[8] & ".adopteunmec.com/" & $split[8] & "/"& $split[7] & "/" & $split[6] & "/" & $split[5] & "/" & $split[4] & "/" & $split[3] & "/" & $split[2] & "/image"
ElseIf stringlen($num) = 7 then
$split = StringSplit($num,"")
$url = "http://p" & $split[7] & ".adopteunmec.com/" & $split[7] & "/" & $split[6] & "/" & $split[5] & "/" & $split[4] & "/" & $split[3] & "/" & $split[2] & "/image"
ElseIf stringlen($num) = 6 then
$split = StringSplit($num,"")
$url = "http://p" & $split[6] & ".adopteunmec.com/" & $split[6] & "/" & $split[5] & "/" & $split[4] & "/" & $split[3] & "/" & $split[2] & "/image"
ElseIf stringlen($num) = 5 then
$split = StringSplit($num,"")
$url = "http://p" & $split[5] & ".adopteunmec.com/" & $split[5] & "/" & $split[4] & "/" & $split[3] & "/" & $split[2] & "/image"
ElseIf stringlen($num) = 4 then
$split = StringSplit($num,"")
$url = "http://p" & $split[4] & ".adopteunmec.com/" & $split[4] & "/" & $split[3] & "/" & $split[2] & "/image"
ElseIf stringlen($num) = 3 then
$split = StringSplit($num,"")
$url = "http://p" & $split[3] & ".adopteunmec.com/" & $split[3] & "/" & $split[2] & "/image"
EndIf
Else
msgbox(0,"Erreur","Erreur dans la saisie du numéros de la fiche.")
endif
display()
endfunc
func dl()
if $url_full = 1 Then
msgbox(0,"Erreur","Veuillez selectionner une photo")
Else
$test = @ScriptDir & '\' & $num &'\image'& $y & '.jpg'
DirCreate($num)
Inetget($url_full,$test, 1,0)
EndIf
EndFunc
Voilou si vous avez des idées ou autres ^^
