picture viewer

By Gex on Jan 27, 2006

picture viewer lets u show ur pictures on mirc,with search feature,preview..
load to ur remotes and click picture viewer from the menu.

dialog pview {
  title "Picture Viewer"
  size -1 -1 105 28
  option dbu
  edit "", 2, 2 2 89 10, read autohs
  button "!", 3, 94 2 9 10
  button "search a directory", 4, 2 14 102 12
}
dialog search {
  title "Search Query"
  size -1 -1 118 88
  option dbu
  box "Preview", 1, 55 13 60 73
  icon 2, 64 24 41 39
  list 3, 2 15 50 71, size
  button "browse", 4, 7 5 37 9
  button "load", 5, 66 69 37 12
}
on *:dialog:search:sclick:4 {
  set %folder $sdir($iif(%folder,%folder,C:),choose a folder)
  did -r search 3
  var %trash $findfile(%folder,*.jpg,serach,did -a search 3 $nopath($1-))
}
on *:dialog:search:sclick:3 {
  did -g search 2 " $+ $findfile(%folder,$did(3).seltext,1) $+ "
}
on *:dialog:search:sclick:5 {
  var %file " $+ $findfile(%folder,$did(3).seltext,1) $+ "
  var %height $pic(%file).height
  var %width $pic(%file).width
  /window -padk +btl @picture 250 250 %width %height
  drawpic @picture 0 0  %file 
}
on *:dialog:search:close:* {
  if ($window(@picture)) { window -c @picture }
}

on *:dialog:pview:sclick:3 {
  var %file $sfile(*.jpg,select a picture,load)
  if (%file) {
    did -a pview 2 %file
    var %height $pic(%file).height
    var %width $pic(%file).width
    /window -padk +btl @picture 250 250 %width %height
    drawpic @picture 0 0 " $+ %file $+ "
  }
}
on *:dialog:pview:sclick:4 {
  if ($window(@picture)) { window -c @picture }
  if (!$dialog(search)) {  dialog -m search search }
  else { dialog -v search search }
}
on *:dialog:pview:close:* {
  if ($dialog(search)) { dialog -x search search }
  if ($window(@picture)) { window -c @picture }
}
alias pview { 
if (!$dialog(pview)) { dialog -m pview pview }
}
menu menubar {
  picture viewer:/pview
}

Comments

Sign in to comment.
Gex   -  Jan 28, 2006

thankies Vamplism :)

 Respond  
vampslim   -  Jan 27, 2006

I like the snippnet Gex. V. Nice dude.

 Respond  
Gex   -  Jan 27, 2006

good idea maybe i will do that later.

 Respond  
noMen   -  Jan 27, 2006

indeed nice! I have two suggestions: save the searchdirectory and resize big pictures to fit on the display

 Respond  
Gex   -  Jan 27, 2006

thanks Jared :)

 Respond  
Jared   -  Jan 27, 2006

Cool Gex... like all your codes. :)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.