Animated Background/Tool Bar/Switch Bar

By eyiezinc on Aug 17, 2009

Make Your Background/Toolbar/Switchbar Animated With Selected Picture Directory You Can Make picture layer And Rename It With Order "bg1.jpg,bg2.jpg-->>" To Make Like "Gif Picture" Set Delay in miliseconds

;/*
;-------------------------------------------------------------------------------------------
;Addons: Animated Background/Tool Bar/Switch Bar
;Author: Lestat
;Tester: MasTer-PriNce
;Created: 16/08/2009
;----------------------------------------------------------------
;[Description]
;----------------------------------------------------------------
;Make Your Background/Toolbar/Switchbar Animated With Selected Picture Directory
;You Can Make picture layer And Rename It With Order "bg1.jpg,bg2.jpg-->>" To Make Like "Gif ;Picture"
;Set Delay in miliseconds

;U Can "ON" All There Selected In One Time
;-----------------------------------------------------
;Active[Channel/Status/Query] = 1 selected
;-----------------------------------------------------
;Tool Bar                     = 1 Selected
;-----------------------------------------------------
;Switch Bar                   = 1 selected
;-----------------------------------------------------

;Any Question/Help/Idea/ U Can Find Me At /server vampire.webchat.org -j #rimau,#eyiezinc,#myx
;----------------------------------------------------------------------------------------------
;*/

menu channel,status,query {
  Animated[BG/TB/SB]:animate
}
alias animate { if (!$dialog(animate)) { $iif($input(Enable Win Themes?,y),unset %themes,set %themes nothemes) | .dialog -m animate animate } }
dialog animate {
  title "Animated Background [Active/Toolbar/SwithBar] Control"
  size -1 -1 228 266
  option dbu %themes
  box "Active Config", 1, 3 4 221 82
  text "Picture Path", 2, 13 20 34 8
  edit "", 3, 47 19 114 10, read
  button "Browse", 4, 165 19 37 10, flat
  button "SET", 5, 199 43 14 8, flat
  edit "", 6, 167 43 31 9, read center
  check "Status", 7, 53 43 35 10, flat
  check "Channel/@", 8, 53 54 39 10, flat
  check "Query", 9, 53 65 33 10, flat
  check "ON", 10, 170 65 21 10, flat
  check "OFF", 11, 193 65 20 10, flat
  box "Toolbar Config", 12, 3 90 221 79
  text "Picture Path", 13, 13 106 33 8
  edit "", 14, 48 105 114 10, read
  button "Browse", 15, 165 105 37 10, flat
  button "SET", 16, 83 129 14 8, flat
  edit "", 17, 50 129 31 9, read center
  check "ON", 18, 51 151 25 10, flat
  check "OFF", 19, 75 151 21 10, flat
  box "Switch Bar Config", 20, 3 171 221 80
  text "Picture Path", 21, 13 188 34 8
  edit "", 22, 48 186 114 10, read
  button "Browse", 23, 165 186 37 10, flat
  button "SET", 24, 83 210 14 8, flat
  edit "", 25, 50 210 31 9, read center
  check "ON", 26, 51 232 25 10, flat
  check "OFF", 27, 75 232 21 10, flat
  button "CLOSE", 28, 3 252 221 12, flat ok
  check ".jpg", 29, 15 43 21 10, flat
  check ".bmp", 30, 15 54 21 10, flat
  check ".png", 31, 15 65 21 10, flat
  check ".jpg", 32, 15 129 21 10, flat
  check ".bmp", 33, 15 140 21 10, flat
  check ".png", 34, 15 151 21 10, flat
  check ".jpg", 35, 15 210 21 10, flat
  check ".bmp", 36, 15 221 21 10, flat
  check ".png", 37, 15 232 21 10, flat
  check "Center", 38, 104 43 30 10, flat
  check "Photo", 39, 104 54 30 10, flat
  check "Stretch", 40, 104 65 30 10, flat
  check "Fill", 41, 138 54 20 10, flat
  check "Tile", 42, 138 43 20 10, flat
  box "Attribute", 43, 10 34 35 44
  box "Active", 44, 48 34 48 44
  box "Pic Position", 45, 99 34 63 44
  box "ON/OFF", 46, 165 57 51 21
  box "Delay", 47, 165 34 50 22
  box "Picture Directory", 48, 10 11 205 21
  box "Picture Directory", 49, 10 97 205 21
  box "Attribute", 50, 10 120 35 44
  box "Delay", 51, 47 120 53 23
  box "ON/OFF", 52, 47 143 53 21
  box "Picture Directory", 53, 10 178 205 21
  box "Attribute", 54, 10 201 35 44
  box "Delay", 55, 47 201 53 23
  box "ON/OFF", 56, 47 224 53 21
}

On 1:dialog:animate:init:*: {
  if (!%apower) { .set %apower off }
  if (!%tpower) { .set %tpower off }
  if (!%hpower) { .set %hpower off }
  if (!%attx) { .set %attx .jpg }
  if (!%tttx) { .set %tttx .jpg }  
  if (!%httx) { .set %httx .jpg }
  if (!%activated) { .set %activated s }
  if (!%acligment) { .set %acligment c }
  if (!%apath) { set %apath c:\ | .did -a $dname 3 %apath } | else { did -a $dname 3 %apath } 
  if (!%tpath) { set %tpath c:\ | .did -a $dname 14 %tpath } | else { did -a $dname 14 %tpath } 
  if (!%hpath) { set %hpath c:\ | .did -a $dname 22 %hpath } | else { did -a $dname 22 %hpath } 
  if (%apower == ON) { .did -cb $dname 10 | .did -ue $dname 11 }
  if (%tpower == ON) { did -cb $dname 18 | did -ue $dname 19 }
  if (%hpower == ON) { .did -cb $dname 26 | .did -ue $dname 27 }
  if (%apower == OFF) { .did -cb $dname 11 | .did -ue $dname 10 }
  if (%tpower == OFF) { .did -cb $dname 19 | .did -ue $dname 18 }
  if (%hpower == OFF) { .did -cb $dname 27 | .did -ue $dname 26 }
  if (%attx == .jpg) { .did -cb $dname 29 | .did -ue $dname 30,31 }
  if (%attx == .bmp) { .did -cb $dname 30 | .did -ue $dname 29,31 }
  if (%attx == .png) { .did -cb $dname 31 | .did -ue $dname 30,29 }
  if (%tttx == .jpg) { .did -cb $dname 32 | .did -ue $dname 33,34 }
  if (%tttx == .bmp) { .did -cb $dname 33 | .did -ue $dname 32,34 }
  if (%tttx == .png) { .did -cb $dname 34 | .did -ue $dname 32,33 }
  if (%httx == .jpg) { .did -cb $dname 35 | .did -ue $dname 36,37 }
  if (%httx == .bmp) { .did -cb $dname 36 | .did -ue $dname 35,37 }
  if (%httx == .png) { .did -cb $dname 37 | .did -ue $dname 35,36 }
  if (%adelay) || (%adelay != $null) { .did -a $dname 6 %adelay } | else { .set %adelay 200 | did -a $dname 6 200 }
  if (%tdelay) || (%tdelay != $null) { .did -a $dname 17 %tdelay } | else { .set %tdelay 200 | did -a $dname 17 200 }
  if (%hdelay) || (%hdelay != $null) { .did -a $dname 25 %hdelay } | else { .set %hdelay 200 | did -a $dname 25 200 }
  if (%activated == s) { .did -cb $dname 7 | .did -ue $dname 8,9 }
  if (%activated == c) { .did -cb $dname 8 | .did -ue $dname 7,9 }
  if (%activated == q) { .did -cb $dname 9 | .did -ue $dname 8,7 }
  if (%acligment == c) { .did -cb $dname 38 | .did -ue $dname 39,40,41,42 }
  if (%acligment == p) { .did -cb $dname 39 | .did -ue $dname 38,40,41,42 }
  if (%acligment == r) { .did -cb $dname 40 | .did -ue $dname 39,38,41,42 }
  if (%acligment == f) { .did -cb $dname 41 | .did -ue $dname 39,40,38,42 }
  if (%acligment == t) { .did -cb $dname 42 | .did -ue $dname 39,40,41,38 }
}
On 1:dialog:animate:sclick:*: {
  if ($did = 4) { did -r $dname 3 | $iif($shortfn($sdir(c:,Picture Path For Active)),.set %apath $ifmatch) | .did -a $dname 3 %apath }
  if ($did = 5) { $iif($$?"Delay In Milisecond" isnum,.set %adelay $ifmatch)  | did -r $dname 6 | did -a $dname 6 %adelay | $iif($timer(abgn),.timerabgn -m 0 %adelay abgn) } 
  if ($did = 15) { did -r $dname 14 | $iif($shortfn($sdir(c:,Picture Path For ToolBar)),.set %tpath $ifmatch) | .did -a $dname 14 %tpath }
  if ($did = 16) { $iif($$?"Delay In Milisecond" isnum,.set %tdelay $ifmatch)  | did -r $dname 17 | did -a $dname 17 %tdelay | $iif($timer(tbgn),.timertbgn -m 0 %tdelay tbgn) }
  if ($did = 23) { did -r $dname 22 | $iif($shortfn($sdir(c:,Picture Path For Switch Bar)),.set %hpath $ifmatch) | .did -a $dname 22 %hpath }
  if ($did = 24) { $iif($$?"Delay In Milisecond" isnum,.set %hdelay $ifmatch)  | did -r $dname 25 | did -a $dname 25 %hdelay | $iif($timer(hbgn),.timerhbgn -m 0 %hdelay hbgn) }
  if ($did = 32) { if ($did($dname,$did).state) { .set %tttx $did($dname,$did).text | .did -cb $dname $did | .did -ue $dname 33,34 | clearbg  } }
  if ($did = 33) { if ($did($dname,$did).state) { .set %tttx $did($dname,$did).text | .did -cb $dname $did | .did -ue $dname 32,34 | clearbg  } }
  if ($did = 34) { if ($did($dname,$did).state) { .set %tttx $did($dname,$did).text | .did -cb $dname $did | .did -ue $dname 32,33 | clearbg  } }
  if ($did = 35) { if ($did($dname,$did).state) { .set %httx $did($dname,$did).text | .did -cb $dname $did | .did -ue $dname 36,37 | clearbg  } }
  if ($did = 36) { if ($did($dname,$did).state) { .set %httx $did($dname,$did).text | .did -cb $dname $did | .did -ue $dname 35,37 | clearbg  } }
  if ($did = 37) { if ($did($dname,$did).state) { .set %httx $did($dname,$did).text | .did -cb $dname $did | .did -ue $dname 35,36 | clearbg  } }
  if ($did == 18) { if ($did($dname,$did).state) { .set %tpower ON | .timertbgn -m 0 %tdelay tbgn | .did -b $dname $did | .did -ue $dname 19 } }
  if ($did == 19) { if ($did($dname,$did).state) { .set %tpower OFF | .timertbgn off | .did -cb $dname $did | .did -ue $dname 18 | .clearbg } }
  if ($did == 26) { if ($did($dname,$did).state) { .set %hpower ON | .timerhbgn -m 0 %hdelay hbgn | .did -cb $dname $did | .did -ue $dname 27 } }
  if ($did == 27) { if ($did($dname,$did).state) { .set %hpower OFF | .timerhbgn off | .did -cb $dname $did | .did -ue $dname 26 | .clearbg  } }
  if ($did = 29) { if ($did($dname,$did).state) { .set %attx $did($dname,$did).text | .did -cb $dname $did | .did -ue $dname 30,31 | .clearbg } }
  if ($did = 30) { if ($did($dname,$did).state) { .set %attx $did($dname,$did).text | .did -cb $dname $did | .did -ue $dname 29,31 | .clearbg } }
  if ($did = 31) { if ($did($dname,$did).state) { .set %attx $did($dname,$did).text | .did -cb $dname $did | .did -ue $dname 29,30 | .clearbg } }
  if ($did = 7) { if ($did($dname,$did).state) { .set %activated s | .did -cb $dname $did | .did -ue $dname 8,9 | .clearbg } }
  if ($did = 8) { if ($did($dname,$did).state) { .set %activated c | .did -cb $dname $did | .did -ue $dname 7,9 | .clearbg } }
  if ($did = 9) { if ($did($dname,$did).state) { .set %activated q | .did -cb $dname $did | .did -ue $dname 7,8 | .clearbg } }
  if ($did == 10) { if ($did($dname,$did).state) { .set %apower ON | .timerabgn -m 0 %adelay abgn | .did -b $dname $did | .did -ue $dname 11 } }
  if ($did == 11) { if ($did($dname,$did).state) { .set %apower OFF | .timerabgn off | .did -b $dname $did | .did -ue $dname 10 | .clearbg } }
  if ($did = 38) { if ($did($dname,$did).state) { .set %acligment c | .did -cb $dname $did | .did -ue $dname 39,40,41,42 } }
  if ($did = 39) { if ($did($dname,$did).state) { .set %acligment p | .did -cb $dname $did | .did -ue $dname 38,40,41,42 } }
  if ($did = 40) { if ($did($dname,$did).state) { .set %acligment r | .did -cb $dname $did | .did -ue $dname 39,38,41,42 } }
  if ($did = 41) { if ($did($dname,$did).state) { .set %acligment f | .did -cb $dname $did | .did -ue $dname 39,40,38,42 } }
  if ($did = 42) { if ($did($dname,$did).state) { .set %acligment t | .did -cb $dname $did | .did -ue $dname 39,40,41,38 } }
}
alias abgn {
  inc %actis
  if ($findfile(%apath,$+(*,%attx),%actis)) && (%activated == s) { background $+(-,%activated,%acligment) $shortfn($findfile(%apath,$+(*,%attx),%actis)) }
  if ($findfile(%apath,$+(*,%attx),%actis)) && (%activated == c) {  background $+(-,%acligment) $iif($left($active,1) == $chr(35) || ($left($active,1) == @),$active) $shortfn($findfile(%apath,$+(*,%attx),%actis)) }
  if ($findfile(%apath,$+(*,%attx),%actis)) && (%activated == q) {  background $+(-,%acligment) $iif($left($active,1) != $chr(35) && ($left($active,1) != @),$active) $shortfn($findfile(%apath,$+(*,%attx),%actis)) }
  elseif (!$findfile(%apath,$+(*,%attx),%actis)) { set %actis 1 } 
}
alias tbgn {
  inc %tctis
  if ($findfile(%tpath,$+(*,%tttx),%tctis)) { background -l $shortfn($findfile(%tpath,$+(*,%tttx),%tctis)) }
  else { .set %tctis 1 }
}
alias hbgn {
  inc %hctis
  if ($findfile(%hpath,$+(*,%httx),%hctis)) { background -h $shortfn($findfile(%hpath,$+(*,%httx),%hctis)) }
  else { .set %hctis 1 }
}
alias clearbg {
  .background -xs 
  var %bg = 1
  while ($chan(%bg)) {
    background -x $chan(%bg)
    if ($window(%bg)) { .background -x $window(%bg) }
    inc %bg
  }
  var %bg = 1
  while ($query(%bg)) {
    background -x $query(%bg)
    inc %bg
  }
  background -xl
  background -xh
}
On 1:unload: { .rmx }
alias rmx {
  unset %themes %apower %tpower %hpower %attx %tttx %httx %activated %acligment %apath %tpath $&
    %hpath %adelay %tdelay %hdelay %actis %tctis %hctis 
}

Comments

Sign in to comment.
click2011   -  Jun 08, 2011

)

More
 Respond  
TheWhistler   -  Nov 20, 2009

Nice 1 but 1 thing no gif for it, can you make it to use GIF's , i useing it and like it very nice

More
 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.