mIRC Home    About    Download    Register    News    Help

Print Thread
undo #185660 12/09/07 12:29 PM
Joined: Feb 2006
Posts: 307
N
nataliad Offline OP
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
hello

can you please make a script that with a hotkey (eg ctrl+z) will open the last closed window (query or channel mainly)

thanks

Re: undo [Re: nataliad] #185663 12/09/07 12:48 PM
Joined: Aug 2006
Posts: 183
T
Thrull Offline
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 183
Well, we can't hotkey anything to cntr-z using just Mirc. We'd need a dll for that.

Asside from that, someone can write a script that does what you want.

Here's a very quick script that allows you to do that if you hit Control-F2

Code:
on 1:Part:#: {
  if $nick == $me { %LastWin = $chan }
}

on 1:CLOSE:?:{
  %LastWin = $target 
}

Alias CF2 {
  if $chr(35) isin %LastWin { join %LastWin }
  elseif $chr(35) !isin %LastWin { query %Lastwin }
  else { echo -ag Sorry, I don't know which window you mean. }
}


The above works, but hasn't been tested very well. It also only works on channels and queries, not DCC sends, DCC gets, or DCC Chats.

You can load logs into the window as well, but that'd take a bit more scripting and I'm too tired to do it. this assumes you keep logs of course. smile

Last edited by Thrull; 12/09/07 01:00 PM.

Yar
Re: undo [Re: Thrull] #185802 14/09/07 11:25 AM
Joined: Feb 2006
Posts: 307
N
nataliad Offline OP
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
I get this
Code:
* /query: insufficient parameters (line 849, script.ini)

Re: undo [Re: nataliad] #185804 14/09/07 12:51 PM
Joined: Aug 2006
Posts: 183
T
Thrull Offline
Vogon poet
Offline
Vogon poet
T
Joined: Aug 2006
Posts: 183
Worked fine for me. Did you open a query Window and then close it? If not, then the variable will be $null and you'll get the exact error you got.


Yar
Re: undo [Re: nataliad] #185806 14/09/07 01:16 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
The code Thrull posted works fine for me too, here's a shortened code which does the exact same thing:


Code:
on me:*:Part:#: { %LastWin = $chan }
on *:CLOSE:?:{ %LastWin = $target }

alias CF2 {
  $iif(%LastWin,$iif(#* iswm %LastWin,join,query)) %LastWin
}

Re: undo [Re: nataliad] #185841 14/09/07 11:00 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Try putting the script into a new remote file.