mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2005
Posts: 28
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Oct 2005
Posts: 28
I saw this topic already listed as "Custom window problem". I posted to it but no one answered. I'm hoping to get some feedback.

I'm using this:

/window -dfhop +dL

here is the alias and the usage:
USAGE: /buddy_logon [text1] [text2]
(generally [text1] = nick .... [text2] = network)

Code:

alias buddy_logon {
  .timerbud_note_* off
  .timer_logon_close off
  if ( $window(@Logon) ) window -c @Logon

  var %bground $gettok($(%menu_settings),4,32)
  var %Fcolor $gettok($(%menu_settings),3,32)
  var %Fname $gettok($(%menu_settings),1,32)
  var %Fsize $gettok($(%menu_settings),2,32)
  var %phrase Logon: $1 on $2
  var %width $width($(%phrase),$(%Fname),$(%Fsize),0,0)
  var %height $height($(%phrase),$(%Fname),$(%Fsize))

  var %width2 $calc( %width + 20 )
  var %height2 $calc( %height + 60 )

  var %y $calc( %height2 * -1 )

  window -dfhop +dL @Logon 0 0 %width2 %height2
  window @Logon 0 %y
  window -a @Logon
  drawrect -f @Logon %Fcolor 0 0 0 %width2 %height2
  drawtext @Logon %bground %Fname %Fsize 10 30 %phrase

  bud_note_enter @Logon %height2
  .timer_logon_close 1 5 bud_note_exit @Logon %height2
}



Here is the part giving me trouble:

window -dfhop +dL @Logon 0 0 %width2 %height2
window @Logon 0 %y
window -a @Logon


The function of this window is to be a notification window when someone logs on. It is similar to the MSN Messenger notification, but it happens in the top left corner.

I'm trying to do this WITHOUT the focus being taken. Sometimes I'll be typing in another app when the window comes up, and my typing will be interrupted. Also, one slight annoyance is that I can't open the window with a negative y value (so that it opens off the screen, then my timers kick in and move the window down... a simple sliding animation).

Currently I have to open the window hidden at x=0 y=0, and then change y to y=(%height2 * -1)

Opening with -h means i have to use -a to see it again! And i know that -a WILL steal the focus. I double-checked the focus problem by not using -h, then -a, but still the same problem, as was stated before, it is a desktop window.

Is it possible to request this as a feature?

ie. not steal focus, and can open window with negative values for off-screen opening? ... also being able to hide and view the window without stealing focus?

Or is there something about how mIRC handles windows to prevent that kind of functionality?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Quote:
Is it possible to request this as a feature?

ie. not steal focus, and can open window with negative values for off-screen opening? ... also being able to hide and view the window without stealing focus?
The simple answer is Yes. You do so through the Feature Suggestions section of this forum.

As no one replied to your earlier post, it's likely that those who tried various options to try to do what you're requesting within the current restrictions of mIRC coding, were unable to do so, and rather than post a whole bunch of things like "Sorry I can't do this" they decided to just not post at all.

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Have you checked out the $tip() identifier? It is designed exactly for this stuff, although the notifications always slide up from the bottom right corner.

If this intended for notifications when users in your notify list log on, you don't even have to script it - mirc has this built-in.

Type /help tips for more information.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Oct 2005
Posts: 28
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Oct 2005
Posts: 28
Thanks for your responses guys.

qwerty, that is particularly helpful. Much appreciated! Though I wish it could be set even if mIRC was active, this is still a very viable option for me.

Once again, thank you.


Link Copied to Clipboard