mIRC Homepage
Posted By: clutz1572 capturing window movements??? - 09/06/05 04:36 PM
hello again,

is there a way to do this without a dll??? (there are no dlls out that will do it anyways,i've checked) i am having such a hard time with a portion of a script i'm working on.. i'm trying to have custom window #2 change positions (x,y,w,h,ect..) to follow the main custom window(#1).. so far all i got is this test alias that works only when the #2 window is closed.
Code:
testmove {
  if $window(@chat).x $window(@chat).y $window(@chat).w != $window(@opchat.win).x $&
    $window(@opchat.win).y $window(@opchat.win).w {
    window -k0 +de @chat $window(@opchat.win).x $window(@opchat.win).h $window(@opchat.win).w $&
      90
  }
}
  


all i need now is to figure out on how to make my alias work with the window open and trigger when the main windows moves as well - hehe
but anyways, would anyone know if it's possible to do this?(detect window movement and trigger commands, i mean)

thanks in advance
Posted By: Mpdreamz Re: capturing window movements??? - 09/06/05 08:56 PM
Code:
  
alias testmove {
  if $isid { 
    if (%w.x != $window(-3).x) || (%w.y != $window(-3).y) {
      return $true
    }
    else { return $false } 
    set %w.x $window(-3).x
    set %w.y $window(-3).y
  }
}

$testmove will return $true if the window has moved since the last time the alias was called. you could use this with a timer and trigger a /signal or an alias, whatever you prefer. smile
Posted By: DaveC Re: capturing window movements??? - 09/06/05 11:18 PM
alias keepchatinline { timer.keepchatinline -mo 0 250 if ( $!window(@chat) && $!window(@opchat.win) ) $({,) window -k0 +de @chat $!window(@opchat.win).x $!window(@opchat.win).h $!window(@opchat.win).w 90 $(},) }


/keepchatinline

And leave it at that.

PS: was the window line correct, it seems a bit odd whats happening (but i copied your line so if its right its right)
Posted By: clutz1572 Re: capturing window movements??? - 10/06/05 06:13 AM
yes, i agree that it does look odd but, it's the only way i saw to get the sizeing and positions the way i wanted..

and btw dave.... YOU ARE AWESUM!!!!!!!!!!!!!!!thanks so much.. grin
P.S. right? well, i'm not sure about that but it works! lol
@Mpdreamz : thanks for your input also...
© mIRC Discussion Forums