Looking for a way to time this - 04/10/06 12:43 AM
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)