Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

ImageShack Picture Viewer

Recommended Posts

  • Administrators

With this script you can browse through all of the imageshack.us pictures you've double clicked on.

 

 


on *:LOAD:{ if (!$isdir($mircdirDLImages)) { mkdir DLImages | echo -a 06Thanks for using Image Viewer, memo/pm FelicianoX for questions } }



on *:START:{ .timerImageLinks 0 3600 imagelinkscheck }



on $^*:HOTLINK:/http\x3A\/\/((img\d{1,3})\.imageshack\.us)(\/\2\/\d+\/\w+\.(png|jpg|gif))/Si:#:{

  if (!$hget(ImageLinks,$1) && $group(#Image).status == On) {

    .disable #Image

    .hfree ImageLinks

    hadd -m ImageLinks $1 1

    .enable #Image

  }

  if ($group(#Image).status == off) {

    .enable #Image

    hadd -m ImageLinks $1 1

  }

}



#Image on



on $*:HOTLINK:/http\x3A\/\/((img\d{1,3})\.imageshack\.us)(\/\2\/\d+\/\w+\.(png|jpg|gif))/Si:#:{

  url $1

  if (!$readini(ImageLinks.ini,Downloaded,$1)) {

    var %t $ticks

    hadd -m $+(ImageSocket.,%t) GET $regml(3)

    hadd $+(ImageSocket.,%t) Host $regml(1)

    sockopen $+(image.,%t) $regml(1) 80

  }

}



#Image end



on *:sockopen:image.*:{

  var %a sockwrite -nt $sockname

  %a GET $hget($+(ImageSocket.,$gettok($sockname,2,46)),GET) HTTP/1.0

  %a Host: $hget($+(ImageSocket.,$gettok($sockname,2,46)),Host) $+ $str($crlf,2)

}



on *:sockread:image.*:{

  if (!$sock($sockname).mark) {

    var %a

    sockread %a

    if (%a == $null) {

      sockmark $sockname 1

    }

  }

  else {

    sockread &image

    var %o $gettok($hget($+(ImageSocket.,$gettok($sockname,2,46)),GET),3,47))

    bwrite $qt($+($mircdirDLImages\,%o)) -1 -1 &image

  }

}



on *:sockclose:image.*:{

  var %l $+(http://,$hget($+(ImageSocket.,$gettok($sockname,2,46)),Host),$hget($+(ImageSocket.,$gettok($sockname,2,46)),GET))

  writeini -n ImageLinks.ini Sizes $+(http://,$hget($+(ImageSocket.,$gettok($sockname,2,46)),Host),$hget($+(ImageSocket.,$gettok($sockname,2,46)),GET)) $bytes($lof($+($mircdirDLImages\,$gettok($hget($+(ImageSocket.,$gettok($sockname,2,46)),GET),3,47))),k) kilobytes

  writeini -n ImageLinks.ini Downloaded %l 1

  hfree -w $+(ImageSocket.,$gettok($sockname,2,46))

}



alias ImageLinksCheck {

  !var %a $iif(%last,$calc($ini(ImageLinks.ini,Downloaded,0) -250),1)

  !while (%a  249,1)

  dialog -m ImagesView ImagesView

}



menu * {

  .ImageShack Picture Viewer

  ..ImageShack Picture Viewer: openimagelinks

  ..ImageShack Picture Viewer 250: openimagelinks 1

}



on *:DIALOG:ImagesView:init:0:{

  !did -b ImagesView 5,8

  !did -c ImagesView 1 1

  !did -a ImagesView 4 Size: $pics

  !var %a $iif(%last,$calc($ini(ImageLinks.ini,Downloaded,0) -250),1)

  !while (%a 

iamgeag.jpg

dsfdsfk.jpg

Link to comment
Share on other sites



×
×
  • Create New...