mIRC Homepage
Posted By: sparta resize mirc - 09/04/10 12:35 PM
Any way you can make "mirc" understand you resize the program? not to confuse with minimize.. smile
Posted By: chacha Re: resize mirc - 09/04/10 12:53 PM
?!
Posted By: Riamus2 Re: resize mirc - 09/04/10 02:50 PM
Do you mean having it save the size for future use, or so you have access to what size it is in a script? If you want to save the size, you can save the window position (also size) from the mIRC icon in the top left (Position > Save).
Posted By: DJ_Sol Re: resize mirc - 09/04/10 04:16 PM
Is there a way to tell with an identifier if mirc becomes resized?

I dont think so. You should be able to get mirc's dimensions. Cant remember the identifier. So you could save those and then check to see if they changed.
Posted By: Horstl Re: resize mirc - 09/04/10 04:52 PM
Originally Posted By: DJ_Sol
You should be able to get mirc's dimensions. Cant remember the identifier.
$window(-2).w /.h

Originally Posted By: /help $window
$window(N/@name)
Returns properties for a window.

[...]

Note: You can also get the .w and .h properties by specifying: -1 for the width and height of the screen, -2 for the main mIRC window, and -3 for the MDI window where all other windows inside mIRC are displayed.

Maybe something like:
Code:
; adjust delay (= load) acc. to your need
alias startresizecheck { .timerresizecheck -om 0 20 resizecheck }

alias -l resizecheck {
  if ($hget(rsc,main)) {
    if ($v1 != $window(-2).w $window(-2).h) {
      hadd rsc main $v2
      ECHO -sgt main window resized to $v2
    }
  }
  else hadd -m rsc main $window(-2).w $window(-2).h
}

Posted By: sparta Re: resize mirc - 09/04/10 08:42 PM
Thnx Horstl!

I test your code and see if i can do something with it smile
Posted By: sparta Re: resize mirc - 15/04/10 10:41 AM
The script running ok, just got one problem from it, firefox flicker allot when i running that script, resize don't have any trigger in mirc it self? or somthing i can use to check without a running timer?
Posted By: Riamus2 Re: resize mirc - 15/04/10 11:33 AM
Other than manually checking, a timer is the only way to automatically see if it was resized. If you explained why you want to know if it's resized, there may be a better method to do whatever you're trying to do.

As for FF flickering, that script shouldn't cause it to flicker from looking at it. It only checks every 20 seconds. Even if it checked every second, it shouldn't make FF flicker.
Posted By: Wims Re: resize mirc - 15/04/10 11:57 AM
Quote:
It only checks every 20 seconds. Even if it checked every second, it shouldn't make FF flicker.
it's milisecond, not second, running a code every 20ms can cause a slow down on mirc, but shouldn't affect firefox
Posted By: Riamus2 Re: resize mirc - 15/04/10 12:09 PM
Sorry, missed seeing the -m. But, I agree, even in ms, it shouldn't make FF flicker, though I would have to test it to make certain.
Posted By: sparta Re: resize mirc - 15/04/10 12:33 PM
It moving my lagbar to the upper right corner, and i think it's when it check the lagbar the flicker appear. Moving it cos not everyone using the same resolution as me. And it also moving the lagbar if mirc is resized ..
Posted By: Riamus2 Re: resize mirc - 15/04/10 12:55 PM
Try changing the timer so it's not triggered as often. 250-500 ms should be good enough.
Posted By: Wims Re: resize mirc - 15/04/10 07:22 PM
You need to be clearer, why are you talking about firefox ? Why are you talking about a lagbar ?
It seem you have a problem with your script, the code isn't related to firefox, nor to a lagbar.
And I'm sure the delay in the timer isn't the problem, running this timer with a 1 ms delay is still not a problem.
Posted By: Riamus2 Re: resize mirc - 15/04/10 07:47 PM
I'm sure his script is slow and that's why it's causing issues because it is being run so often. That's why I said to cut down how much the script is run.
Posted By: sparta Re: resize mirc - 15/04/10 11:20 PM
I running it every sec, and not using -m switch at all, and i dont think its slow. dialog based lagbar that show my lag, and moving if i rezize mirc, thats all it does.
Posted By: DJ_Sol Re: resize mirc - 16/04/10 06:43 AM
You asked for a script to tell when your mirc was resized. All it does is tell whether its resized. It doesn't resize mirc. It wouldn't do anything to your lagbar script.
Posted By: sparta Re: resize mirc - 16/04/10 09:08 AM
Code:
alias lagbar-loc {
  if ($dialog(lagsbar)) {
    dialog -s lagsbar $calc($window(-2).w - 180 + $window(0,1).x) $calc($window(0).y + 37) 155 -7
  }
}

And when i resize mirc this litle code keep the dialog "lagsbar" in the right corner, and same goes if you using different resolution.
© mIRC Discussion Forums