mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 37
C
cgfiend Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Mar 2003
Posts: 37
Is there a way of adjusting the dialog scroll bar increment when one of the arrows is clicked? I'm using a range between 0 and 65535 (volume control) and the incrementation is too small.

Yes, I did think of a workaround. Make the range smaller and use multiplication. I may do it that way.

Last edited by cgfiend; 24/11/04 06:36 PM.
Joined: Oct 2003
Posts: 306
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Oct 2003
Posts: 306

on *:dialog:m:scroll:*:{
if ($did == 7) {
/set %priv $did(7).sel
did -ra m 6 %priv

}

change this code maybe can help you


mess with the best
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Since you don't want to scroll in increments of 1 in 65535 (because it's too slow), you don't need to use a range of 0 to 65535, as you said. Just use a smaller range (eg N) and /vol -v $calc($did(name,id).sel *65535/N)

If you need to be able to scroll either accurately or quickly (not both), though, you may want to try something like this:
Code:
dialog scr {
  title "Hold down Ctrl to scroll slowly"
  size -1 -1 112 52
  option dbu
  scroll "", 1, 4 13 104 8, horizontal bottom range 0 65535
  button "ok", 2, 38 32 37 12, ok
}
on *:dialog:scr:scroll:1:{
  if $mouse.key !& 2 {
    did -c scr 1 $iif($calc($iif($did(1).sel < $did(1),$v1 -,$v1 +) [color:red]1000[/color]) > 0,$v1,0)
    did -a scr 1 $did(1).sel
  }
  ; rest of your code here
}

/dialog -m scr scr
Whenever you hold down Ctrl while scrolling, it scrolls normally (slowly, in increments of 1), otherwise it scrolls in increments of 1000.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard