mIRC Home    About    Download    Register    News    Help

Print Thread
#188065 17/10/07 03:44 AM
Joined: Jun 2007
Posts: 157
W
Vogon poet
OP Offline
Vogon poet
W
Joined: Jun 2007
Posts: 157
can anyone (willing) write a code
that would make text written in EDIT control on dialog
to float like <marqee> tags do for html ?


The harder I chase my dreams the more I experience the time for smiles and tears...
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
This code can be used to scroll a string of text from one end to the other. Unfortunately, due to mIRC's space character limitations, you can't make it appear to be scrolling across like the <marquee> tag. You may be able to make the marquee work properly with the use of a dll like spaces.dll.

Code:
alias mq.start {
  ;*** Call to start the scrolling
  unset %mq.*
  set %mq.point 0
  .timer.mq -m 0 500 mq.disp
}

alias mq.stop {
  unset %mq.*
  .timer.mq off
}

alias mq.disp {
  ;*** Scrolls one character for each call (chr(32) ignored)
  var %mq.title = This is the text to scroll in the textbox
  inc %mq.point 1
  if (%mq.point > $len(%mq.title)) set %mq.point 1
  if ($mid(%mq.title,%mq.point,1) == $chr(32)) inc %mq.point 1
  var %mq.disp = $right(%mq.title,$calc($len(%mq.title) - %mq.point)) $left(%mq.title,%mq.point)
  echo -a did -ra <id_of_dialog_item> %mq.disp
}



Change the value of %mq.title to scroll whatever you want.

/sb.start to start the scroll action.
/sb.stop to stop it.

-genius_at_work

Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
what about $chr(160) instead of 32?


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Lpfix5 #188088 17/10/07 02:10 PM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
If that is what they want to do, and if chr160 shows up as a space on their font.

-genius_at_work

Joined: Jun 2007
Posts: 157
W
Vogon poet
OP Offline
Vogon poet
W
Joined: Jun 2007
Posts: 157
thank you so much ^^


The harder I chase my dreams the more I experience the time for smiles and tears...

Link Copied to Clipboard