mIRC Homepage
Posted By: Lastwebpage How to (Re-) Open a channel window? - 27/03/07 03:35 PM
Hello,
I have re-wrote/motify an existing script with balloon popups on the desktop if someone write something.

It works good except one thing. When the ballon appaer it display the channelname, the user and the text, but how:
-How can I display the groupname? $server show me the the full URL to the server, but I want the groupname.
-I use showmirc -s to show the mIRC window if it was minimized/in tray, but how can I select the channel for the message that I not must scroll through all the channels to find the right one, for example:
User ABC Wrote in #XYZ on SERVER:
Blah blah
Now I want that #XYZ is selected and opens when I click on the balloon.

Peter
Posted By: RoCk Re: How to (Re-) Open a channel window? - 27/03/07 03:39 PM
Quote:
How can I display the groupname?

$network ?

Quote:
Now I want that #XYZ is selected and opens when I click on the balloon.


/window -a #XYZ
Posted By: Lastwebpage Re: How to (Re-) Open a channel window? - 27/03/07 06:42 PM
thanks for the answer,
but the second answer not work correct, because unfortunately I have some channels with the same name on different servers.

Peter
Posted By: billythekid Re: How to (Re-) Open a channel window? - 27/03/07 06:44 PM
/join #channel should work. I use short aliases to quickly change between active channels all using /join, even when already IN the channel.
Posted By: Lastwebpage Re: How to (Re-) Open a channel window? - 27/03/07 09:23 PM
hmmmh, I guess my question was not clearly enough...
1) I am in ~20 channels online, some of them have the same name, #help for example, and mIRC is minimized in the tray
2) someone write something on Server ABC in Channel XYZ
3) the script show me with the picture window function a window with "User 123 wrote on ABC in channel XYZ ...." on the desktop
4) I click on this picture window on the desktop
5) I open mIRC and I must search in the treebar/switchbar in which channel the user have spoke something and click on it to open the channel.

It would be nice if I could do the same thing like this search in the tree and open/select the channel within the script.

At the moment I have the following code (thanks Rock)
Code:
menu @DesktopPopup {
  sclick { 
    showmirc $iif($appstate == minimized,-r,-s)
    window -a %DesktopPopup.LastChannel
  }
  rclick { DesktopPopup.doclose $iif($mouse.key & 4,-s) }
  $DesktoPopup.doclose
}
;DesktopPopup.LastChannel stores the channel which "produce" the DestopPopup

But this not work correctly, it works only if the same group than the message was selected before I minmized mIRC, if another group was selected, mIRC opens, but I must open and select the correct channel per hand.
Posted By: RoCk Re: How to (Re-) Open a channel window? - 27/03/07 09:58 PM
Set a variable for the CID like you did for the channel...

you set %DesktopPopup.LastChannel to $chan or #
so also set %DesktopPopup.LastCID to $cid

then use the /scid command in your script with the new variable %DesktopPopup.LastCID

Code:
menu @DesktopPopup {
  sclick { 
    showmirc $iif($appstate == minimized,-r,-s)
    scid %DesktopPopup.LastCID window -a %DesktopPopup.LastChannel
  }
  rclick { DesktopPopup.doclose $iif($mouse.key & 4,-s) }
  $DesktoPopup.doclose
}
;DesktopPopup.LastChannel stores the channel which "produce" the DestopPopup
;DesktopPopup.LastCID stores the connection ID (CID) which "produce" the DesktopPopup
Posted By: Lastwebpage Re: How to (Re-) Open a channel window? - 27/03/07 10:38 PM
That was the solution,
many thanks.

Peter
© mIRC Discussion Forums