mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#36086 13/07/03 04:29 AM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
i have a couple scroll id's ina dialog box (17 vert and 18 hor)
i wanted to know how i can use these to set %vars for the position of another dialog

#36087 13/07/03 04:36 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
to set the positions of the scrolls to %vars ?
use the scroll dialog event it will trigger when u change it's position and $did(id).sel will return the position


#36088 13/07/03 04:46 AM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
i have this
Code:
on *:dialog:cpsetup:scroll:*: {
  if ($did == 17) { set %cp.vert $did(17).sel }
  if ($did == 18) { set %cp.hor $did(18).sel }
  did -ra cpsetup 17 %cp.vert
  did -ra cpsetup 18 %cp.hor
}

but it dont change the %vars

#36089 13/07/03 05:04 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
wtf is this for:

did -ra cpsetup 17 %cp.vert
did -ra cpsetup 18 %cp.hor

-r and -a have nothing to do with a scroll id. Your looking for -z, and even still. Why are you setting a scroll position thats already being set by the scroll event anyways?


-KingTomato
#36090 13/07/03 05:06 AM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
awww dangit!
did -ra was for two other id's ;p

#36091 13/07/03 05:08 AM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
here:
Code:
on *:dialog:cpsetup:scroll:*: {
  if ($did == 15) { set %cp.vert $did(15).sel }
  if ($did == 16) { set %cp.hor $did(16).sel }
  did -ra cpsetup 17 %cp.vert
  did -ra cpsetup 18 %cp.hor
}


but it still doesnt seem to work

#36092 13/07/03 05:11 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
he isn't setting it's position, he puts the position to the value of the scroll so $did(scroll id) will return that number.
mtech i don't know what u need this for but it should work.

#36093 13/07/03 05:13 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
what is id 17,18

#36094 13/07/03 05:20 AM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
i want the scroll to change the %var by +1 or -1 depending on what side of the scroll is clicked

and then update the edit boxes with the update var

Code:
on *:dialog:cpsetup:scroll:*: {
  if ($did == 15) { set %cp.vert $did(15).sel }
  if ($did == 16) { set %cp.hor $did(16).sel }
  did -ra cpsetup 17 %cp.vert
  did -ra cpsetup 18 %cp.hor
}

 scroll "", 15, 8 152 16 60
  scroll "", 16, 29 196 100 16, horizontal
  edit "vert", 17, 30 150 100 21, center
  edit "hor", 18, 30 170 100 21, center

#36095 13/07/03 05:23 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
i believe you need to set a range for those scrollbars...


-KingTomato
#36096 13/07/03 05:25 AM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
how do i do that?

sorry i have never worked with scroll bars

#36097 13/07/03 05:27 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
yes,
scroll "", 15, 8 152 16 60, range N1 N2
scroll "", 16, 29 196 100 16, horizontal, range N1 N2
replace N1 N2 with the range of the scrollbar

#36098 13/07/03 05:29 AM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
ok ty, but what should the range be? i think is should be the res of the screen but i dont know...
its supposed to act as a option to move the dialog...

#36099 13/07/03 05:34 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
it depends on how many positions u need and the range will from the N1 position to the N2

#36100 13/07/03 05:43 AM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
got it but i cant get it to stay at the position it is suposed to be...
like i have it at 82, i push up and it goes to 2...

Last edited by MTech; 13/07/03 05:44 AM.
#36101 13/07/03 05:46 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
what have u done

#36102 13/07/03 05:50 AM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
;p
heres what i have so far

http://mtec89.ath.cx/scripts.html

click 'Control panel'

.... look around line 105

#36103 13/07/03 06:10 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
did -z cpsetup 15 %cp.vert
did -z cpsetup 16 %cp.hor
it should resize the range of it but u are missing a parameter cuz the range has N1 and N2
i think i want to SELECT the last position, then use this instead:
did -c cpsetup 15 %cp.vert
did -c cpsetup 16 %cp.hor


#36104 13/07/03 06:13 AM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
so use -c not -z?

#36105 13/07/03 06:19 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
..

Page 1 of 2 1 2

Link Copied to Clipboard