Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #AutoIt3Wrapper_Version=Beta
- #AutoIt3Wrapper_icon=claw.ico
- #AutoIt3Wrapper_UseX64=n
- #AutoIt3Wrapper_Res_requestedExecutionLevel=highestAvailable
- #AutoIt3Wrapper_Res_Icon_Add=claw.ico
- #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
- #include <INet.au3>
- #include <String.au3>
- #include <Array.au3>
- #include <File.au3>
- #include <ButtonConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <ProgressConstants.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- Global $Button1
- Global $aResimler
- Global $resimsay
- #Region ### START Koda GUI section ###
- $Form1_1 = GUICreate("İncisözlük Başlıktaki Resimleri İndir", 369, 88, -1, -1)
- $Input1 = GUICtrlCreateInput("", 8, 25, 209, 21)
- $Label1 = GUICtrlCreateLabel("Başlık Linki", 8, 8, 57, 17)
- $Button1 = GUICtrlCreateButton("Başlat", 8, 56, 209, 25, $WS_GROUP)
- $Button2 = GUICtrlCreateButton("Klasörü Aç", 224, 56, 85, 25, $WS_GROUP)
- $Label2 = GUICtrlCreateLabel("", 315, 60, 45, 16, BitOR($SS_CENTER,$SS_SUNKEN))
- $Input3 = GUICtrlCreateInput("", 224, 24, 137, 21)
- $Label4 = GUICtrlCreateLabel("Klasör Adı", 224, 6, 51, 17)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $Button1
- _FileCreate("C:\temp.txt")
- DirCreate(@ScriptDir & "\Resimler\" & GUICtrlRead($Input3))
- LinkleriAl(GUICtrlRead($Input1))
- GUICtrlSetData($Label2,_FileCountLines("C:\temp.txt"))
- ResimleriAl(@ScriptDir & "\Resimler\" & GUICtrlRead($Input3))
- Case $Button2
- DirCreate(@ScriptDir & "\Resimler\" & GUICtrlRead($Input3))
- Run("explorer.exe " & @ScriptDir & "\Resimler\"& GUICtrlRead($Input3))
- EndSwitch
- WEnd
- Func LinkleriAl($url)
- Dim $aRecords
- $sSource = _INetGetSource($url)
- $aArray1 = _StringBetween($sSource, '<a href="', '"')
- Dim $Apics[1]
- $Apng = _ArrayFindAll($aArray1, ".png", 0, 0, 0, 1)
- $Ajpg = _ArrayFindAll($aArray1, ".jpg", 0, 0, 0, 1)
- $Agif = _ArrayFindAll($aArray1, ".gif", 0, 0, 0, 1)
- _ArrayConcatenate($Apics, $Ajpg)
- _ArrayConcatenate($Apics, $Apng)
- _ArrayConcatenate($Apics, $Agif)
- _ArrayDelete($Apics, 0)
- For $i = 0 To UBound($Apics) - 1
- FileWrite("C:\1", $aArray1[$Apics[$i]] & @CRLF)
- Next
- EndFunc ;==>LinkleriAl
- Func ResimleriAl($path)
- Dim $aResimler
- _FileReadToArray("C:\temp.txt", $aResimler)
- If Not IsArray($aResimler) Then Return SetError(1, 0, 0)
- For $x = 1 To $aResimler[0]
- $random = Random(1000000, 9999999)
- InetGet($aResimler[$x], $path & "\" & $random & ".jpg", '', 0)
- Next
- MsgBox(0,"", "Sayfadaki bütün resimler indirildi.")
- EndFunc ;==>ResimleriAl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement