WhiteCrow Posted September 18, 2005 Share Posted September 18, 2005 (edited) This program can be used to thumb trough pictures or html files. It tries to find the picture, display it, and then find the next picture or webpage. It even has a slideshow mode The script is in dutch, but its not that hard to understand It only can be used from within Firefox, when viewing a page. **Warning** can only be used with 1280x1024 and firefox **Warning** = next picture up - next picture down ] automatic, handsfree, picture up (slideshow modus) [ automatic, handsfree, picture down PG_up increase the delay inbetween pictures in slideshow modus. PG_dwn decrease the delay inbetween pictures in slideshow modus. INSERT switching on, downloading all pictures you see comming by F2 download the picture you see now / quit slideshow modus, and return to normal F10 quit script Q quit script expandcollapse popup#Include <Constants.au3> #Include <string.au3> #include <Array.au3> Opt("SendKeyDelay", 0) $infinite=1 $download=2 ;================Settings=============================== $AutomaticSleep=3500 ;tijd tussen het automatisch bladeren $download_yes=0 ;plaatjes downloaden en op hd zetten ? 0=nee 1=ja $downloadpath= "c:\Temp\Data\" ;waar moeten de downloads heen $timestamp_on=1 ;datum en tijd meegeven aan bestandsnamen ? 0=nee 1=ja ;=============================================== HotKeySet ( "=", "GetPic_Up" ) HotKeySet ( "-", "GetPic_Down" ) HotKeySet ( "]", "Automatic_Up" ) HotKeySet ( "[", "Automatic_Down" ) HotKeySet ( "{F10}", "Exits" ) HotKeySet ( "\", "Stop_Automatic" ) HotKeySet ( "q", "Exits" ) HotKeySet ("{PGUP}", "Automatic_sleep_Up") HotKeySet ("{PGDN}", "Automatic_sleep_Down") HotkeySet ("{Insert}", "Downloads") HotkeySet ("{F2}", "Download_now") Do Sleep(200) if $download = 1 then $download_yes=1 MsgBox (0, "", "Downloads staan nu aan") $download=5 endif if $download = 4 then $download_yes=0 $download=2 MsgBox (0, "", "Downloads staan nu weer uit") endif Until $infinite=9999 Func Getpic_Up() $xpos = MouseGetPos(0) $ypos = MouseGetPos(1) MouseClick ("left", 205, 65, 1, 0) Sleep(100) Send("^c") Sleep(100) $klad=ClipGet() $klad2=ClipGet() $klad3=ClipGet() $kladcopy = $klad $kladcopy2= $klad2 $kladcopy3= $klad3 $klad= StringRegExp($klad, '(\d*)', 3) $klad2= StringRegExp($klad2, '(\d*)', 3) $klad3= StringRegExp($klad3, '/(\A*\d*).jpg', 3) if $klad="" then MsgBox(0, "","Je kunt beter naar een pagina gaan met plaatjes..") else $jpggetal = $klad[UBound($klad)-1] $jpggetal2 = $klad2[UBound($klad2)-1] if $klad3="" then Sleep(100) else $jpgnaam = $klad3[UBound($klad3)-1] endif ;MsgBox(0, "",$jpgnaam) endif $slength=StringLen($jpggetal2) $find=StringInStr ($kladcopy2, $jpggetal2 & "." ,0 ,1) +$slength $lefty=StringTrimLeft ($kladcopy2, $find) if StringLen($lefty) >20 then $lefty="" endif if StringLen ($lefty) > 5 then $picurl = $jpggetal2 else $picurl = $jpggetal endif $count1= StringLen ($picurl) $picurl_int = Number($picurl) $picurl_int = $picurl_int + 1 $picurl_int = String ($picurl_int) $count2 = StringLen ($picurl_int) $counter = $count1 - $count2 Do if $counter > 0 then $picurl_int = "0" & $picurl_int endif $counter=$counter-1 Until $counter <1 $welke=StringRight ( $kladcopy, 3 ) if StringLen($lefty) > 5 then $count1= StringLen ($picurl) + StringLen ($lefty) $kladcopy2 = StringTrimRight ($kladcopy2, $count1) $kladcopy = $kladcopy2 & $picurl_int & $lefty else Select case $welke="jpg" $count1= StringLen ($picurl) + 4 $kladcopy = StringTrimRight ($kladcopy, $count1) $kladcopy = $kladcopy & $picurl_int & ".jpg" case $welke="tml" $count1= StringLen ($picurl) + 5 $kladcopy = StringTrimRight ($kladcopy, $count1) $kladcopy = $kladcopy & $picurl_int & ".html" case $welke="htm" $count1= StringLen ($picurl) + 5 $kladcopy = StringTrimRight ($kladcopy, $count1) $kladcopy = $kladcopy & $picurl_int & ".htm" endselect endif if $download_yes=1 then if $timestamp_on=1 then $timestamp="__" & @mon & "-" & @mday & "-" & @year & "_" & @hour & "-" & @min & "-" & @sec else $timestamp="" endif InetGet($kladcopy, $downloadpath & $jpgnaam & $timestamp & ".jpg", 1, 1) ;MsgBox (0, "", "Downloads staan aan " & $kladcopy & " Word gedownload") endif MouseClick ("left", 205, 65, 1, 0) Sleep(100) ClipPut($kladcopy) Send("^v") Sleep(100) Send("{Enter}") MouseMove ( $xpos, $ypos, 0 ) EndFunc ;=================================================================================================== ======== Func Getpic_Down() $xpos = MouseGetPos(0) $ypos = MouseGetPos(1) MouseClick ("left", 205, 65, 1, 0) Sleep(100) Send("^c") Sleep(100) $klad=ClipGet() $klad2=ClipGet() $kladcopy = $klad $kladcopy2= $klad2 $klad= StringRegExp($klad, '/(\d*)\.', 3) $klad2= StringRegExp($klad2, '/(\d*)\.', 3) if $klad="" then MsgBox(0, "","Je kunt beter naar een pagina gaan met plaatjes..") else $jpggetal = $klad[UBound($klad)-1] $jpggetal2 = $klad2[UBound($klad2)-1] endif $slength=StringLen($jpggetal2) $find=StringInStr ($kladcopy2, $jpggetal2 & "." ,0 ,1) +$slength $lefty=StringTrimLeft ($kladcopy2, $find) if StringLen($lefty) >20 then $lefty="" endif if StringLen ($lefty) > 5 then $picurl = $jpggetal2 else $picurl = $jpggetal endif $count1= StringLen ($picurl) $picurl_int = Number($picurl) $picurl_int = $picurl_int - 1 $picurl_int = String ($picurl_int) $count2 = StringLen ($picurl_int) $counter = $count1 - $count2 Do if $counter > 0 then $picurl_int = "0" & $picurl_int endif $counter=$counter-1 Until $counter <1 $welke=StringRight ( $kladcopy, 3 ) if StringLen($lefty) > 5 then $count1= StringLen ($picurl) + StringLen ($lefty) $kladcopy2 = StringTrimRight ($kladcopy2, $count1) $kladcopy = $kladcopy2 & $picurl_int & $lefty else Select case $welke="jpg" $count1= StringLen ($picurl) + 4 $kladcopy = StringTrimRight ($kladcopy, $count1) $kladcopy = $kladcopy & $picurl_int & ".jpg" case $welke="tml" $count1= StringLen ($picurl) + 5 $kladcopy = StringTrimRight ($kladcopy, $count1) $kladcopy = $kladcopy & $picurl_int & ".html" case $welke="htm" $count1= StringLen ($picurl) + 5 $kladcopy = StringTrimRight ($kladcopy, $count1) $kladcopy = $kladcopy & $picurl_int & ".htm" endselect endif MouseClick ("left", 205, 65, 1, 0) Sleep(100) ClipPut($kladcopy) Send("^v") Sleep(100) Send("{Enter}") MouseMove ( $xpos, $ypos, 0 ) EndFunc ;====================================================================================== Func Automatic_Up() Do Send("=") $Infinite=$Infinite+1 Sleep($AutomaticSleep) Until $Infinite > 998 $Infinite = 1 EndFunc Func Automatic_Down() Do Send("-") $Infinite=$Infinite+1 Sleep($AutomaticSleep) Until $Infinite > 998 $Infinite = 1 EndFunc Func Automatic_sleep_Up() $AutomaticSleep = $AutomaticSleep + 500 EndFunc Func Automatic_sleep_Down() $AutomaticSleep = $AutomaticSleep - 500 endfunc Func Stop_Automatic() $infinite=999 Endfunc Func Downloads() $download = $download - 1 endfunc ;============================== Func Download_now() MouseClick ("left", 205, 65, 1, 0) Sleep(100) Send("^c") Sleep(100) $klad3=ClipGet() $kladcopy3= $klad3 $klad3= StringRegExp($klad3, '(\A*\d*).jpg', 3) if $klad3="" then MsgBox(0, "","Je kunt beter naar een pagina gaan met plaatjes..") else $jpgnaam = $klad3[UBound($klad3)-1] endif if $timestamp_on=1 then $timestamp="__" & @mon & "-" & @mday & "-" & @year & "_" & @hour & "-" & @min & "-" & @sec else $timestamp="" endif InetGet($kladcopy3, $downloadpath & $jpgnaam & $timestamp & ".jpg", 1, 1) ;MsgBox(0,"", "Got the Pic " & $kladcopy3, 1) Endfunc Func Exits() exit Endfunc Edited September 18, 2005 by WhiteCrow Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now