mIRC Home    About    Download    Register    News    Help

Print Thread
#96486 02/09/04 01:55 AM
Joined: Dec 2002
Posts: 208
H
Hrung Offline OP
Fjord artisan
OP Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
I would like a way to make mirc minimize and lock with a command. This way, it would be possible to make it automatically lock within an auto-away script, for example. It might also be useful to have an option to always lock on minimize.


If I knew now what I will know then... maybe things will have been different...
Joined: Aug 2003
Posts: 309
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Aug 2003
Posts: 309
this is a great idea. kinda like window locking. and when u try to maximize or unlock it prompts for a password. something along those lines.

*Great Idea smile


-Nick (Darko)
-Admin irc.aussiechat.org
-#Chatzone, #helpdesk
Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
This would be a very useful feature, perhaps in the form of an extra /showmirc switch

Joined: Aug 2004
Posts: 101
D
Vogon poet
Offline
Vogon poet
D
Joined: Aug 2004
Posts: 101
It's cool!
I had once tried to code it myself with an alias. It minimized all windows and mIRC itself. Then it used $?* to ask for a password. The dialog won't let you do anything else while you're at it! Wrong password minimizes mIRC again. It was working quite well before I accidentally deleted it and abandoned the mini-project...

It would be really cool to have it!


Maybe I wake up one day to notice that all my life was just a dream!
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
You could use something, like this;

alias showmirc {
if (l isin $1) {
; Checks if 'l' switch isin $1 (mIRC uses, mnrstxop)
if ((!$2) && (!%md5p)) { echo -a ERROR: INSUFFICENT PARAMETERS | return }
; Checks if a passwd is already stored, if not, you need to specify one.
if ($2) { set %md5p $md5($2) }
; Stores your pass in variable %md5p, as an MD5, not plain-text
}
; ends if statement
!showmirc $+(-,$remove($1,-,l))
; performs default showmirc commands.
}

on 1:APPACTIVE:{
; triggers when appstate changes.
if ($appactive == $false) && ($window(-2).state == tray) { set %md5pr $true }
; if mIRC isnt active, and its state is 'in the tray' set a variable so we know.
elseif (($appactive == $true) && (%md5pr)) {
; otherwise, if mIRC is active, and %md5pr is true, then mIRC must have just
[/color]; returned from the tray
while (%md5imp != %md5p) {
; while %md5imp isnt the same as your stored password, keep looping.
var %md5imp = $md5($input("What is the Password?",poqga,Password Request))
; in the loop we set %md5imp to the password your asked to type in, if
[/color]; its wrong, loop again, and again, if not end loop.
}
; end of while loop
unset %md5pr
; unset the %md5pr so next time mIRC isnt active and isnt in the tray it wont
[/color]; ask for the pass
}
; end if statement
}


Syntax; i.e. /showmirc -t[color:red]l passwd[/color]

You just add the 'l' parameter, once you have specified a password once you dont need to include it ever again, unless you /unset it manually or wish to change the password.

Hope this helps.

Eamonn.

Joined: Aug 2004
Posts: 101
D
Vogon poet
Offline
Vogon poet
D
Joined: Aug 2004
Posts: 101
Seems cool!
I had the same ideas but without overriding showmirc (I used a custom alias).
I also minimized all windows (so that noone else could even see a portion of what you were doing). Pretty easy to add to what you wrote here.
In addition I'd put a cancel option to the password input box so that in minimizes mIRC again. In this way, if someone restored it by mistake and didn't know the password, he could minimize it again without problem.

I'm still too lazy to rewrite this even though it's just a minor addition to what you've already written...

It would still be great to have it built-in!
Perhaps there is a way around this we haven't thought of?


Maybe I wake up one day to notice that all my life was just a dream!
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
problem with doing this scriptwise is that it's to easely removed...


If it ain't broken, don't fix it!
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
Very true, however it would need to be saved somewhere, by mIRC, and some kind of retrieval system if the password is lost, in which case, anyone can 'retrieve' the password.. so it'd take alot of workaround.

Eamonn.


Link Copied to Clipboard