mIRC Home    About    Download    Register    News    Help

Print Thread
scrolling text #145974 30/03/06 06:38 AM
Joined: Dec 2002
Posts: 94
K
krunch Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
Hi

anyone know how would go about scrolling text using picwindow
the box where it can scoll is only 17 chr's long


Lets get dirty
Re: scrolling text #145975 30/03/06 06:56 AM
Joined: Jan 2006
Posts: 468
symphony Offline
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
use the /drawtext command, change the starting poisition and you should use a timer "afiak"

Re: scrolling text #145976 30/03/06 08:53 AM
Joined: Dec 2002
Posts: 94
K
krunch Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
yeh but it seems to just drawtext over top of the old text dont look like it is clearing it


Lets get dirty
Re: scrolling text #145977 30/03/06 09:13 AM
Joined: Jan 2006
Posts: 468
symphony Offline
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
/drawline to cover the old text then /drawtext overwriting it smile

Re: scrolling text #145978 30/03/06 09:24 AM
Joined: Dec 2002
Posts: 94
K
krunch Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
that dont look right


Lets get dirty
Re: scrolling text #145979 30/03/06 09:53 AM
Joined: Jan 2006
Posts: 468
symphony Offline
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
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.

Re: scrolling text #145980 30/03/06 10:55 AM
Joined: Dec 2002
Posts: 94
K
krunch Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
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


Lets get dirty
Re: scrolling text #145981 30/03/06 11:26 AM
Joined: Jan 2006
Posts: 468
symphony Offline
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
you control the poxition x,y of the text, therefore you can make text shows as CUT while changing position.

Re: scrolling text #145982 30/03/06 12:46 PM
Joined: Dec 2002
Posts: 94
K
krunch Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
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


Lets get dirty
Re: scrolling text #145983 30/03/06 02:49 PM
Joined: Jan 2006
Posts: 468
symphony Offline
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
$gettok() $left() $right() smile

Re: scrolling text #145984 30/03/06 08:47 PM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
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

Re: scrolling text #145985 30/03/06 10:10 PM
Joined: Dec 2002
Posts: 94
K
krunch Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
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


Lets get dirty
Re: scrolling text #145986 30/03/06 10:45 PM
Joined: Dec 2002
Posts: 94
K
krunch Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
cheers for you help guys
ive got it scrolling one way
now just todo the other


Lets get dirty
Re: scrolling text #145987 30/03/06 11:13 PM
Joined: Dec 2002
Posts: 94
K
krunch Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
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

Last edited by krunch; 30/03/06 11:27 PM.

Lets get dirty