mIRC Homepage
Posted By: krunch scrolling text - 30/03/06 06:38 AM
Hi

anyone know how would go about scrolling text using picwindow
the box where it can scoll is only 17 chr's long
Posted By: symphony Re: scrolling text - 30/03/06 06:56 AM
use the /drawtext command, change the starting poisition and you should use a timer "afiak"
Posted By: krunch Re: scrolling text - 30/03/06 08:53 AM
yeh but it seems to just drawtext over top of the old text dont look like it is clearing it
Posted By: symphony Re: scrolling text - 30/03/06 09:13 AM
/drawline to cover the old text then /drawtext overwriting it smile
Posted By: krunch Re: scrolling text - 30/03/06 09:24 AM
that dont look right
Posted By: symphony Re: scrolling text - 30/03/06 09:53 AM
Code:
window -pa @test 10 10 150 150
drawfill -r @test $rgb(255,255,255) $rgb(255,255,255) 10 10 150 150
drawtext -r @test $rgb(255,255,0) 10 12 bah
drawline -r @test $rgb(0,0,0) 40 12 12 120 12
drawtext -r @test $rgb(255,255,0) 25 12 bah
drawline -r @test $rgb(0,0,0) 40 12 12 120 12

Try these commands as follows, this is just an example "not well organized but it may give you an idea.
Posted By: krunch Re: scrolling text - 30/03/06 10:55 AM
that moved the text
i only have s limited amount of space i want to use about 17 char's long
so the possion of the text has to stay the same
Posted By: symphony Re: scrolling text - 30/03/06 11:26 AM
you control the poxition x,y of the text, therefore you can make text shows as CUT while changing position.
Posted By: krunch Re: scrolling text - 30/03/06 12:46 PM
i cant figger this out

this is for a mp3 player witch only have 17 chrs to scroll the text in
when i try todo it with the /did one i have it just goes black with text overlapping
i know i have to take 1 char off the front and add one onto the end from the string but its 1am an im having probs thinking how todo this
Posted By: symphony Re: scrolling text - 30/03/06 02:49 PM
$gettok() $left() $right() smile
Posted By: MikeChat Re: scrolling text - 30/03/06 08:47 PM
if the window has no other info or backgraound image you can clear the window /clear @window
the text might be done with $mid(%text,%i,17)
so get $len on your %text
like
var %text = Smithy: Banging my hammer.mp3
timerredraw 1 1 redraw %text

alias redraw {
inc %x
var %text = $1-
var %texlen = $len(%text)
if (%x > %texlen) { set -u2 %x 1 }
clear @window
drawtext @window ----- $mid(%text,%x,17)
}

I didnt not include all the commands data but myabe this gives you an idea
Posted By: krunch Re: scrolling text - 30/03/06 10:10 PM
the window has a background and other text in there so /clear @window cant be used unless i remake the whole thing again each up date but that would mean its always remaking it and that would take cpu etc
Posted By: krunch Re: scrolling text - 30/03/06 10:45 PM
cheers for you help guys
ive got it scrolling one way
now just todo the other
Posted By: krunch Re: scrolling text - 30/03/06 11:13 PM
sorta
Code:
alias scroll {
  if ($1-) { %scroll-text = $1- }
  if (!%n) { inc %n }
  if (!$mid($1-,%n,17)) { %n = 1 }
  ;echo # $mid(%scroll-text,%n,17)
  drawtext -or $pw-name $pw-cnf 28 35 $mid(%scroll-text,%n,17)
  inc %n
  .timerscroll -m 1 300 scroll
}


i guess its working because its justa mess where the text is , text on top of text

-
if i make it clear and reload all the info it flickers
© mIRC Discussion Forums