mIRC Home    About    Download    Register    News    Help

Topic Options
#161162 - 04/10/06 01:43 AM Looking for a way to time this
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
Code:
 alias slap_manager_cb {
  if $2 == sclick {
    if $3 == 6 {
      xdid -t $1 6 Slap $iif(!$xdid($1,6).state,All,$iif($xdid($1,6).state == 1,Checked,Random))
    }
  }
  elseif ($2 == stateclick) {
    stateclick $1-
  }
  elseif !$istok(close changing sizing focus focusout,$2,32) && (mouse* !iswm $2) && (*activate !iswm $2) && (*mov* !iswm $2) {
    echo $color(info) -s */ slap_manager_cb: $1-
  }
}
alias stateclick {
  var %path = $xdid($1,1).mouseitem, %state = $iif($xdid($1,1,%path).state != 2,2,1), %a = 1, %b = $xdid($1,1,%path).num
  while %a <= %b {
    xdid -k $1 1 %state %path %a
    var %c = 1, %d = $xdid($1,1,%path %a).num
    while %c <= %d {
      xdid -k $1 1 %state %path %a %c
      inc %c
    }
    inc %a
  }
  slap_manager_cb $1 stateclick 1 $iif($xdid($1,1,%path).state != 2,2,1)
}
 

This is part of a dialog that I'm making using DCX. When the first alias gets "stateclick" as the 2nd parameter, it calls the 2nd alias, which, in turn, calls the first alias. The fact that each alias does call the other is making it difficult (heck impossible) for me to figure out how long it takes for the code to run. I tried using the usual method of using ticks, but due to the fact that the aliases call each other, this isn't bringing back an accurate representation of the time.

Hope I was clear, and that someone can assist in resolving this (I find it hard to believe that it's unresolvable)

Top
#161163 - 04/10/06 02:11 AM Re: Looking for a way to time this
genius_at_work Offline
Hoopy frood

Registered: 08/10/05
Posts: 1741
Where is the alias first called from? You should be able to use the "usual method" by putting it outside of those two aliases. It appears that the alias is called from within a DIALOG event, or some other event.

on *:EVENT:{
var %ctime = $ctime
;### Call your alias here ###
echo -a $calc($ctime - %ctime)
}

-genius_at_work

Top
#161164 - 04/10/06 02:23 AM Re: Looking for a way to time this
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
Unfortunately, due to the fact that this is for a DCX dialog (I don't know how familiar you are with DCX), I'm unable to figure out just where the initial setting should go. Here's the entire code that I currently have
Code:
 dialog slap_manager {
  title "Slap Manager"
  size -1 -1 498 306
}
on *:dialog:slap_manager:*:*: {
  if ($devent == init) {
    dcx Mark $dname slap_manager_cb
    xdialog -b $dname +nty

    ;// Call initilisation alias
    slap_manager_init_dcx
  }
}

alias -l slap_manager_init_dcx {
  ;// Initialising control: Slaps List (Text 4)
  xdialog -c $dname 4 text 170 10 100 12 center
  xdid -t $dname 4 Slaps List

  ;// Initialising control: (List 3)
  xdialog -c $dname 3 list 170 25 150 199 tabstop multi extsel
  if !$exists(slaps.txt) {
    .write slaps.txt around a bit with a large trout
  }
  loadbuf -ao $dname 3 slaps.txt

  ;// Initialising control: (TreeView 1)
  xdialog -c $dname 1 treeview 10 25 150 200 haslines showsel tabstop checkbox hasbuttons linesatroot
  xdid -l $dname 1 16
  var %a = 1, %b = $scon(0)
  while %a <= %b {
    .scon %a
    xdid -a $dname 1 $+(%a,$chr(9),+e 0 0 0 1 0 $rgb(0,0,255) $network,$chr(9),)
    var %c = 1, %d = $chan(0)
    while %c <= %d {
      xdid -a $dname 1 $+(%a %c,$chr(9),+e 0 0 0 1 0 $rgb(0,0,255) $chan(%c),$chr(9),)
      var %e = 1, %f = $nick($chan(%c),0)
      while %e <= %f {
        xdid -a $dname 1 $+(%a %c %e,$chr(9),+e 0 0 0 1 0 $rgb(0,0,255) $nick($chan(%c),%e),$chr(9),)
        inc %e
      }
      inc %c
    }
    inc %a
  }
  ;// Initialising control: Slap (Button 5)
  xdialog -c $dname 5 button 330 10 75 20 tabstop
  xdid -t $dname 5 Slap

  ;// Initialising control: (Check 6)
  xdialog -c $dname 6 check 330 35 150 18 tabstop 3state
  xdid -t $dname 6 Slap All

  ;// Initialising control: Network/Channel/Nick (Text 2)
  xdialog -c $dname 2 text 10 10 150 12 center
  xdid -t $dname 2 Network/Channel/Nick

}

alias slap_manager_cb {
  if $2 == sclick {
    if $3 == 6 {
      xdid -t $1 6 Slap $iif(!$xdid($1,6).state,All,$iif($xdid($1,6).state == 1,Checked,Random))
    }
  }
  elseif ($2 == stateclick) {
    stateclick $1-
  }
  elseif !$istok(close changing sizing focus focusout,$2,32) && (mouse* !iswm $2) && (*activate !iswm $2) && (*mov* !iswm $2) {
    echo $color(info) -s */ slap_manager_cb: $1-
  }
}
alias stateclick {
  var %path = $xdid($1,1).mouseitem, %state = $iif($xdid($1,1,%path).state != 2,2,1), %a = 1, %b = $xdid($1,1,%path).num
  while %a <= %b {
    xdid -k $1 1 %state %path %a
    var %c = 1, %d = $xdid($1,1,%path %a).num
    while %c <= %d {
      xdid -k $1 1 %state %path %a %c
      inc %c
    }
    inc %a
  }
  slap_manager_cb $1 stateclick 1 $iif($xdid($1,1,%path).state != 2,2,1)
}
;//
menu status,channel {
  slap_manager :   dialog $iif(!$dialog(slap_manager),-md,-ev) slap_manager slap_manager
}
 
I didn't think it would be appropriate to post this problem in the DCX forum, as I didn't think it was related to the DCX.dll...however, if you think I'd get a better answer there, I'm willing to give it a try.

Top
#161165 - 04/10/06 04:07 AM Re: Looking for a way to time this
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
This is hard to follow a bit, where is your alias slap_manager_cb called from in the dialog I only see calls for slap_manager?
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top
#161166 - 04/10/06 04:15 AM Re: Looking for a way to time this
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
Quote:
dcx Mark $dname slap_manager_cb
As I said, this dialog uses the DCX.dll (and aliases that work with the dll, like xdid, and $xdid) which makes it harder to track. The alias is referred to as a call back alias, and all commands go through that alias. Using mIRC dialog identifiers, the alias gets called in the following format:
Code:
 slap_manager_cb $dname $devent $did <misc. parameters> 

Top
#161167 - 04/10/06 04:24 AM Re: Looking for a way to time this
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
Oh i c its marking the alias well its right on the INIT of the dialog that the script starts.

so calculated the TIME from the initialization.

register a var current ctime then do its performed then echo back old %ctime till now the duration of it
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top
#161168 - 04/10/06 04:27 AM Re: Looking for a way to time this
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
Quote:
Unfortunately, due to the fact that this is for a DCX dialog (I don't know how familiar you are with DCX), I'm unable to figure out just where the initial setting should go. Here's the entire code that I currently have
Code:
 dialog slap_manager {
  title "Slap Manager"
  size -1 -1 498 306
}
on *:dialog:slap_manager:*:*: {
  if ($devent == init) {
[color:red]%x = $ctime[/color]
    dcx Mark $dname slap_manager_cb
    xdialog -b $dname +nty

    ;// Call initilisation alias
    slap_manager_init_dcx
  }
}

alias -l slap_manager_init_dcx {
  ;// Initialising control: Slaps List (Text 4)
  xdialog -c $dname 4 text 170 10 100 12 center
  xdid -t $dname 4 Slaps List

  ;// Initialising control: (List 3)
  xdialog -c $dname 3 list 170 25 150 199 tabstop multi extsel
  if !$exists(slaps.txt) {
    .write slaps.txt around a bit with a large trout
  }
  loadbuf -ao $dname 3 slaps.txt

  ;// Initialising control: (TreeView 1)
  xdialog -c $dname 1 treeview 10 25 150 200 haslines showsel tabstop checkbox hasbuttons linesatroot
  xdid -l $dname 1 16
  var %a = 1, %b = $scon(0)
  while %a <= %b {
    .scon %a
    xdid -a $dname 1 $+(%a,$chr(9),+e 0 0 0 1 0 $rgb(0,0,255) $network,$chr(9),)
    var %c = 1, %d = $chan(0)
    while %c <= %d {
      xdid -a $dname 1 $+(%a %c,$chr(9),+e 0 0 0 1 0 $rgb(0,0,255) $chan(%c),$chr(9),)
      var %e = 1, %f = $nick($chan(%c),0)
      while %e <= %f {
        xdid -a $dname 1 $+(%a %c %e,$chr(9),+e 0 0 0 1 0 $rgb(0,0,255) $nick($chan(%c),%e),$chr(9),)
        inc %e
      }
      inc %c
    }
    inc %a
  }
  ;// Initialising control: Slap (Button 5)
  xdialog -c $dname 5 button 330 10 75 20 tabstop
  xdid -t $dname 5 Slap

  ;// Initialising control: (Check 6)
  xdialog -c $dname 6 check 330 35 150 18 tabstop 3state
  xdid -t $dname 6 Slap All

  ;// Initialising control: Network/Channel/Nick (Text 2)
  xdialog -c $dname 2 text 10 10 150 12 center
  xdid -t $dname 2 Network/Channel/Nick
[color:red]echo -a $+(Time:,$duration($ctime($ctime - %x)))[/color]
}

alias slap_manager_cb {
  if $2 == sclick {
    if $3 == 6 {
      xdid -t $1 6 Slap $iif(!$xdid($1,6).state,All,$iif($xdid($1,6).state == 1,Checked,Random))
    }
  }
  elseif ($2 == stateclick) {
    stateclick $1-
  }
  elseif !$istok(close changing sizing focus focusout,$2,32) && (mouse* !iswm $2) && (*activate !iswm $2) && (*mov* !iswm $2) {
    echo $color(info) -s */ slap_manager_cb: $1-
  }
}
alias stateclick {
  var %path = $xdid($1,1).mouseitem, %state = $iif($xdid($1,1,%path).state != 2,2,1), %a = 1, %b = $xdid($1,1,%path).num
  while %a <= %b {
    xdid -k $1 1 %state %path %a
    var %c = 1, %d = $xdid($1,1,%path %a).num
    while %c <= %d {
      xdid -k $1 1 %state %path %a %c
      inc %c
    }
    inc %a
  }
  slap_manager_cb $1 stateclick 1 $iif($xdid($1,1,%path).state != 2,2,1)
}
;//
menu status,channel {
  slap_manager :   dialog $iif(!$dialog(slap_manager),-md,-ev) slap_manager slap_manager
}
 
I didn't think it would be appropriate to post this problem in the DCX forum, as I didn't think it was related to the DCX.dll...however, if you think I'd get a better answer there, I'm willing to give it a try.
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top
#161169 - 04/10/06 04:45 AM Re: Looking for a way to time this
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
Unfortunately that brings up the amount of time that it takes to generate the dialog, which isn't what I'm looking for.
Maybe I'm being too general. When the alias slap_manager_cb sees stateclick as the 2nd parameter, then the alias stateclick is called.
In the stateclick alias, all of the items under the one that was checked become checked (it's a treeview item, when the root is checked, then all of the branches are checked automatically).

What I want is to time how long it takes for all of the items to be checked.

Well, I sort of have it. I changed the stateclick alias to read
Code:
alias stateclick {
  var %path = $xdid($1,1).mouseitem, %state = $iif($xdid($1,1,%path).state != 2,2,1), %a = 1, %b = $xdid($1,1,%path).num, %ticks = $ticks
  while %a <= %b {
    xdid -k $1 1 %state %path %a
    var %c = 1, %d = $xdid($1,1,%path %a).num
    while %c <= %d {
      xdid -k $1 1 %state %path %a %c
      inc %c
    }
    inc %a
  }
  echo -a $duration($calc(($ticks - %ticks) / 1000)) $calc(($ticks - %ticks) % 1000)
  slap_manager_cb $1 stateclick 1 $iif($xdid($1,1,%path).state != 2,2,1)
}
  
Unfortunately this gives me the time for each item that is checked, on an item by item basis, not a total for all of them.

UPDATE: Problem resolved.


Edited by RusselB (04/10/06 05:10 AM)

Top
#161170 - 04/10/06 05:14 AM Re: Looking for a way to time this
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
ok then why not variable the stateclick start then when its finished to have it calculate I tried this myself but the time that everything is checked is done real quick 0 Seconds to 1 Second delay

[code]
dialog slap_manager {
title "Slap Manager"
size -1 -1 498 306
}

on *:dialog:slap_manager:*:*: {
if ($devent == init) {
dcx Mark $dname slap_manager_cb
xdialog -b $dname +nty
;// Call initilisation alias
slap_manager_init_dcx
}
}

alias -l slap_manager_init_dcx {
;// Initialising control: Slaps List (Text 4)
xdialog -c $dname 4 text 170 10 100 12 center
xdid -t $dname 4 Slaps List
;// Initialising control: (List 3)
xdialog -c $dname 3 list 170 25 150 199 tabstop multi extsel
if !$exists(slaps.txt) {
.write slaps.txt around a bit with a large trout
}
loadbuf -ao $dname 3 slaps.txt
;// Initialising control: (TreeView 1)
xdialog -c $dname 1 treeview 10 25 150 200 haslines showsel tabstop checkbox hasbuttons linesatroot
xdid -l $dname 1 16
var %a = 1, %b = $scon(0)
while %a <= %b {
.scon %a
xdid -a $dname 1 $+(%a,$chr(9),+e 0 0 0 1 0 $rgb(0,0,255) $network,$chr(9),)
var %c = 1, %d = $chan(0)
while %c <= %d {
xdid -a $dname 1 $+(%a %c,$chr(9),+e 0 0 0 1 0 $rgb(0,0,255) $chan(%c),$chr(9),)
var %e = 1, %f = $nick($chan(%c),0)
while %e <= %f {
xdid -a $dname 1 $+(%a %c %e,$chr(9),+e 0 0 0 1 0 $rgb(0,0,255) $nick($chan(%c),%e),$chr(9),)
inc %e
}
inc %c
}
inc %a
}
;// Initialising control: Slap (Button 5)
xdialog -c $dname 5 button 330 10 75 20 tabstop
xdid -t $dname 5 Slap
;// Initialising control: (Check 6)
xdialog -c $dname 6 check 330 35 150 18 tabstop 3state
xdid -t $dname 6 Slap All
;// Initialising control: Network/Channel/Nick (Text 2)
xdialog -c $dname 2 text 10 10 150 12 center
xdid -t $dname 2 Network/Channel/Nick
}

alias slap_manager_cb {
if $2 == sclick {
if $3 == 6 {
xdid -t $1 6 Slap $iif(!$xdid($1,6).state,All,$iif($xdid($1,6).state == 1,Checked,Random))
}
}
elseif ($2 == stateclick) {
%bc = $ctime
stateclick $1-
}
elseif !$istok(close changing sizing focus focusout,$2,32) && (mouse* !iswm $2) && (*activate !iswm $2) && (*mov* !iswm $2) {
echo $color(info) -s */ slap_manager_cb: $1-
}
}

alias stateclick {
var %path = $xdid($1,1).mouseitem, %state = $iif($xdid($1,1,%path).state != 2,2,1), %a = 1, %b = $xdid($1,1,%path).num
while %a <= %b {
xdid -k $1 1 %state %path %a
var %c = 1, %d = $xdid($1,1,%path %a).num
while %c <= %d {
xdid -k $1 1 %state %path %a %c
inc %c
}
inc %a
}
echo -a $+(Time:,$duration($calc($ctime - %bc)))
slap_manager_cb $1 stateclick 1 $iif($xdid($1,1,%path).state != 2,2,1
}
;//
menu status,channel {
slap_manager : dialog $iif(!$dialog(slap_manager),-md,-ev) slap_manager slap_manager
}
[code]
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top
#161171 - 04/10/06 05:16 AM Re: Looking for a way to time this
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
Hmm I dont know if you edited after or before my post??
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top
#161172 - 04/10/06 06:24 AM Re: Looking for a way to time this
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
I edited before your post, and the solution I came up with (while not perfect) was to change the echo line that was giving me the individual timings, and change it to increment a variable. This works, unfortunately I had to manually call for the results from that variable when I saw that the task was completed. I will give your idea a try and see if it works better.

Sorry, but your suggestion isn't working. It's returning a time like my last post, on an item by item basis. Thanks anyways


Edited by RusselB (04/10/06 06:32 AM)

Top
#161173 - 04/10/06 06:50 AM Re: Looking for a way to time this
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
its not over here, I knwo what you meant because i tried a few echo methods

but this one is returning WHOLE time one time only

more and more I tested the end result sometimes was like 9 seconds
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top
#161174 - 04/10/06 07:03 AM Re: Looking for a way to time this
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
Weird that you're getting a very different response than me.
Here's a screen shot showing a portion of the results from my test running the dialog just once.
[img=http://img243.imageshack.us/img243/7351/tempzg7.th.jpg]

Top
#161175 - 04/10/06 07:22 AM Re: Looking for a way to time this
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
My Image

The Code

Here is again the code incase I edited by mistake.

Code:
dialog slap_manager {
  title "Slap Manager"
  size -1 -1 498 306
}

on *:dialog:slap_manager:*:*: {
  if ($devent == init) {
    dcx Mark $dname slap_manager_cb
    xdialog -b $dname +nty
    ;// Call initilisation alias
    slap_manager_init_dcx
  }
}

alias -l slap_manager_init_dcx {
  ;// Initialising control: Slaps List (Text 4)
  xdialog -c $dname 4 text 170 10 100 12 center
  xdid -t $dname 4 Slaps List
  ;// Initialising control: (List 3)
  xdialog -c $dname 3 list 170 25 150 199 tabstop multi extsel
  if !$exists(slaps.txt) {
    .write slaps.txt around a bit with a large trout
  }
  loadbuf -ao $dname 3 slaps.txt
  ;// Initialising control: (TreeView 1)
  xdialog -c $dname 1 treeview 10 25 150 200 haslines showsel tabstop checkbox hasbuttons linesatroot
  xdid -l $dname 1 16
  var %a = 1, %b = $scon(0)
  while %a &lt;= %b {
    .scon %a
    xdid -a $dname 1 $+(%a,$chr(9),+e 0 0 0 1 0 $rgb(0,0,255) $network,$chr(9),)
    var %c = 1, %d = $chan(0)
    while %c &lt;= %d {
      xdid -a $dname 1 $+(%a %c,$chr(9),+e 0 0 0 1 0 $rgb(0,0,255) $chan(%c),$chr(9),)
      var %e = 1, %f = $nick($chan(%c),0)
      while %e &lt;= %f {
        xdid -a $dname 1 $+(%a %c %e,$chr(9),+e 0 0 0 1 0 $rgb(0,0,255) $nick($chan(%c),%e),$chr(9),)
        inc %e
      }
      inc %c
    }
    inc %a
  }
  ;// Initialising control: Slap (Button 5)
  xdialog -c $dname 5 button 330 10 75 20 tabstop
  xdid -t $dname 5 Slap
  ;// Initialising control: (Check 6)
  xdialog -c $dname 6 check 330 35 150 18 tabstop 3state
  xdid -t $dname 6 Slap All
  ;// Initialising control: Network/Channel/Nick (Text 2)
  xdialog -c $dname 2 text 10 10 150 12 center
  xdid -t $dname 2 Network/Channel/Nick
}

alias slap_manager_cb {
  if $2 == sclick {
    if $3 == 6 {
      xdid -t $1 6 Slap $iif(!$xdid($1,6).state,All,$iif($xdid($1,6).state == 1,Checked,Random))
    }
  }
  elseif ($2 == stateclick) {
    %bc = $ctime
    stateclick $1-
  }
  elseif !$istok(close changing sizing focus focusout,$2,32) &amp;&amp; (mouse* !iswm $2) &amp;&amp; (*activate !iswm $2) &amp;&amp; (*mov* !iswm $2) {
    echo $color(info) -s */ slap_manager_cb: $1-
  }
}

alias stateclick {
  var %path = $xdid($1,1).mouseitem, %state = $iif($xdid($1,1,%path).state != 2,2,1), %a = 1, %b = $xdid($1,1,%path).num
  while %a &lt;= %b {
    xdid -k $1 1 %state %path %a
    var %c = 1, %d = $xdid($1,1,%path %a).num
    while %c &lt;= %d {
      xdid -k $1 1 %state %path %a %c
      inc %c
    }
    inc %a
  }
  echo -a $+(Time:,$duration($calc($ctime - %bc)))
  slap_manager_cb $1 stateclick 1 $iif($xdid($1,1,%path).state != 2,2,1
}
;//
menu status,channel {
  slap_manager :   dialog $iif(!$dialog(slap_manager),-md,-ev) slap_manager slap_manager
}
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top
#161176 - 04/10/06 07:40 AM Re: Looking for a way to time this
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
hmm...that last post of yours works exactly as you said, although due to the speed, I changed it from $ctime to $ticks (and adjusted the echoed display for the differences)

Thanks for your help.

Top
#161177 - 04/10/06 08:33 AM Re: Looking for a way to time this
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
its exactly the same as the other post maybe something happend when i put color blue in the text who knows

$ctime actually is equivelant to $ticks they are both called and processed at the same equivelant speed

same with like $uptime(system,1) and $duration($calc($ticks / 1000)))
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top
#161178 - 04/10/06 08:45 AM Re: Looking for a way to time this
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
They may be processed at the same speed, but $ticks is measured in milliseconds, and $ctime in seconds. Since the speed of my system was always returning 0 seconds for the script to process, I needed something more accurate, which is why I went with $ticks

The following code shows the differences easily enough
Code:
 alias f5 {
  echo -at $ctime $ticks
  .timer -m 1 10000 echo -at $!ctime $!ticks
}
 

Top
#161179 - 04/10/06 09:40 AM Re: Looking for a way to time this
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
My appoligies i forgot ticks was measured in ms

Just for future references when you want to go between your code to do something, know what event is triggered when you want it to calculate something then when it ends.

This is how I determined what you wanted, if you follow the code carefully if you request a single click from your stateclick it goes to the WHILE loop in your alias, (carefull do not insert echo in while loop) else it will keep triggering the echo till finish

And what usually helps is to echo parts of your script back to you when testing to know what does what and what happens when you do stuff. like small example [12 being a button in dialog]

On *:Dialog:whatever:sclick:12:{
if (!$server) { return }
else { echo -a I am connected to $+(Server:,$server) }
}

now lets say this $null val for server was something in the script I wanted to test that make sure it works but ways probably this is a bad example but you get the point instead of using return I would put a echo -a NO SERVER CONNECT MADE so this way i can test if that part of the code is working if so then im good... else I work on it
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top