mIRC Home    About    Download    Register    News    Help

Print Thread
#204513 22/09/08 02:09 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I have a custom window that i update every second, and the problem is that it steal focus from everything else, i create the window with the switches

-Bphf +d

any way i can prevent it from steal focus from other programs?

maybe should add that i using

tbwin Attach @window
tbwin Select @window

to the window since it's showing up in the toolbar in mirc.

Last edited by sparta; 22/09/08 02:24 PM.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Oct 2007
Posts: 214
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Hello Sparta,

You should get the results you wanted if you were to remove the +d from the window parameters.

/help /window (d = open as desktop window)

Cheers,

Jay


Last edited by Buggs2008; 22/09/08 02:45 PM.
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
If i remove the +d, then the window wouldent be "built in" in the tool bar, thats the problem.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Oct 2005
Posts: 28
T
Ameglian cow
Offline
Ameglian cow
T
Joined: Oct 2005
Posts: 28
It just so happens i'm having the exact same issue frown

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?

Last edited by TheArkive; 10/11/08 12:49 PM.

Link Copied to Clipboard