mIRC Home    About    Download    Register    News    Help

Print Thread
#150972 11/06/06 07:50 PM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
I was wondering if it would be possible to do this, I know it is possible, but, can't find out how to use timers with it, just isn't working, here's the code:
Code:
on *:dialog:vopedit:sclick:1: {
  var %y = 1
  while (%y <= $did($dname,101).lines) {
    did -c vopedit 101 %y
    inc %y
  }
}

the thing is that it does go down the list, but, WAY too fast to take any action, so, I was wondering anyone could help make it click on the next item in the list, every 1 or 2 seconds, thanks.


-Kurdish_Assass1n
#150973 11/06/06 08:00 PM
Joined: May 2005
Posts: 449
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
Code:
on *:dialog:vopedit:sclick:1: {
  var %y = 1
  while (%y <= $did($dname,101).lines) {
timer 1 2 {    
did -c vopedit 101 %y
    inc %y
}  
}
}


*Untested

#150974 11/06/06 08:07 PM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
I get a bunch of these messages:
Quote:

* /timer: timer 1 not active
-
* /timer: timer 1 not active
-
* /timer: timer 1 not active
-
* /timer: timer 1 not active
-
* /timer: timer 1 not active
-
* /timer: timer 1 not active
-
* /timer: timer 1 not active
-
* /timer: timer 1 not active
-
* /timer: timer 1 not active
-
* /timer: timer 1 not active
-
* /timer: timer 1 not active
-
* /timer: timer 1 not active
-
* /timer: timer 1 not active
-
* /timer: timer 1 not active


-Kurdish_Assass1n
#150975 11/06/06 08:14 PM
Joined: Mar 2004
Posts: 155
D
Vogon poet
Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
Code:
on *:dialog:vopedit:sclick:1: {
  var %y = 1
  while (%y <= $did($dname,101).lines) {
[color:red]/.[/color]timer 1 2 {    
did -c vopedit 101 %y
    inc %y
}  
}
}


Untested ... Edit where red

#150976 11/06/06 08:16 PM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
still nothing, same problem, it isn't even working =(


-Kurdish_Assass1n
#150977 11/06/06 08:51 PM
Joined: May 2005
Posts: 449
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
It should be timer 2 1. I'm not sure if that's the problem, but I switched the time and the repetitions. Find this line
Code:
timer 1 2 {    

and replace it with:
Code:
timer 2 1 {

#150978 11/06/06 09:47 PM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
frown still not working


-Kurdish_Assass1n
#150979 11/06/06 10:27 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
maybe a different appproach
Code:
dialog test {
  title ""
  size -1 -1 150 100
  option dbu
  list 100, 5 5 140 80
  button "GO!", 900, 50 80 50 15
}
on *:dialog:test:init:0:{
  var %i = 1
  var %a = a
  while (%i <= 5) {
    did -a test 100 %i %a
    inc %i
    inc %a
  }
}

on *:dialog:test:sclick:900:{
  timermove 5 1 move-alias
}

alias move-alias {
  if (!%i-1) { set %i-1 1 }
  inc %i-1
  did -c test 100 %i-1
  if (%i-1 >= 5) { unset %i-1 | dialog -x test }
}

#150980 11/06/06 10:38 PM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
frown maybe is, well, if I can't do that, then, is there something that I can do using this: (from mIRC Help File
Quote:

$did(name,id)

You can get the settings and values of controls in a dialog by using the $did() dialog id identifier with the following formats and properties as appropriate to the control to which you are referring.


text returns line or Nth line
$did(id) is same as $did(id).text
len returns length of line or length of Nth line
lines returns number of lines
sel returns Line Number of Nth selected line
if N is 0, returns number of selected lines
seltext returns selected text in an editbox or first selected item in a listbox
selstart returns select start character in editbox line
selend returns select end character in editbox line
edited returns $true if text in editbox was changed

state returns 0 = off, 1 = on, and 2 = indeterminate
next returns id of next control in tab key order
prev returns id of previous control in tab key order
visible returns $true if the control is visible, otherwise $false
enabled returns $true if the control is enabled, otherwise $false

csel returns line number of Nth checked box in a listcb control

if N is 0, returns number of checked lines

cstate returns 0 = off, 1 = on for item in a listcb control

like, everything in the listbox?
please help if you can, thanks!


-Kurdish_Assass1n
#150981 12/06/06 12:41 AM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
w00t!! I found out how to do it, got it working, thanks, but, it doesn't send the command, I'll be posting here later in a bit. peace


-Kurdish_Assass1n

Link Copied to Clipboard