Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

<<kiu-WinHider>>: Hide and password protect win


  • Please log in to reply
3 replies to this topic
kiu
  • Members
  • 234 posts
  • Last active: Oct 10 2010 07:30 PM
  • Joined: 18 Dec 2005
this is a script to hide your windows from unwanted eyes. Naturally the program can bypassed by expert people, but not for normal one.
Use CTRL+WIN+h to hide a window and CTRL+WIN+s to show one of them if the password is correct. When you start the program, a master pwd must be specified. When you want to show a window, if you specify the correct pwd, it's shown a menu with all hidden window. Select the one you want to show.
Thanks Lazslo for the suggestions
Naturally this is a beta version. Use it at your own risk.

;Author: Salvatore Agostino Romeo
;exit app by killing app
#NoTrayIcon
pwd=
Menu,kiu,add
InputBox, pwd, Insert a pwd, Insert the master password`n to show hidden windows, HIDE
num:=1
SetTimer,hidewins,500
return

;hide all "encrypted windows"
hidewins:
	Loop,%num%
		{
			wth_temp:=win%A_Index%
			WinHide, ahk_id %wth_temp%
		}
return

;select window to hide
^#h::
	winToHide=
	MouseGetPos, , , winToHide
	;if the user press cancel
	win%num%=%winToHide%
	num:=num+1
return

;unhide a window if the user specify the right password
^#s::
	Menu,kiu,DeleteAll
	InputBox, new_pwd, Insert a pwd, Insert the password to unhide a window, HIDE
	if (new_pwd=pwd)
	{
		Loop,%num%
			{
				wth_temp:=win%A_Index%
				DetectHiddenWindows, On
				WinGetTitle, title , ahk_id %wth_temp%
				DetectHiddenWindows, Off
				Menu,kiu,add,%title%,showWin			
			}
		Menu,kiu,show
	}
return

showWin:
	SetTimer,hidewins,off
	wth_temp:=win%A_ThisMenuItemPos%
	WinShow,ahk_id %wth_temp%
	win%A_ThisMenuItemPos%=
	Loop,% num - A_ThisMenuItemPos
		{
			before:=A_ThisMenuItemPos + A_Index - 1
			after:=A_ThisMenuItemPos + A_Index
			win%before%:=win%after%
		}
	num:=num-1
	SetTimer,hidewins,500
return


____________________
______________________
kiu - www.romeosa.com

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005
Nice! It would be probably more useful, if there were a master password (changed at a separate hotkey, after entering the old password). A hotkey just hides the foreground window, and another hotkey asks for the password, and un-hides all the hidden windows, or only the last ones in the opposite order as they were hidden.

The title of the post would be better "Hide and password protect windows", because there is no encryption.

kiu
  • Members
  • 234 posts
  • Last active: Oct 10 2010 07:30 PM
  • Joined: 18 Dec 2005
thanks for the suggestion. With a little of time I will work on what you writed
____________________
______________________
kiu - www.romeosa.com

kiu
  • Members
  • 234 posts
  • Last active: Oct 10 2010 07:30 PM
  • Joined: 18 Dec 2005
update:changes suggested by Laszlo
new: when you specify the right pwd, a menu appears with all hidden windows: select that you want
____________________
______________________
kiu - www.romeosa.com