mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
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

Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
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


$maybe
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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)

Last edited by DaveC; 09/06/05 11:23 PM.
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
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...

Last edited by clutz1572; 10/06/05 06:36 AM.

Link Copied to Clipboard