 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
Posted: Wed Apr 13, 2005 8:17 am Post subject: |
|
|
My 2 cents
Would creating a transparent window thats always on top work? _________________ my lame sig  |
|
| Back to top |
|
 |
niwi
Joined: 27 Feb 2005 Posts: 128 Location: Heidelberg, Germany
|
Posted: Wed Apr 13, 2005 10:52 am Post subject: |
|
|
Hi,
| MYYM wrote: | | Quote: | If I just use an AHK script asking for password, there is no problem to kill this app with ALT-F4 or using the task manager.
|
did you try my last post?
you can't close or kill this script without the password. !!
just try it.. and let me know the result?!
MYYM |
I tried your script. It is possible to change to other apps and close them and I don't like to have a password hard coded in a script.
So I still think about what I can do...
NiWi. |
|
| Back to top |
|
 |
daonlyfreez
Joined: 16 Mar 2005 Posts: 755 Location: Berlin
|
Posted: Sat Jun 25, 2005 11:10 pm Post subject: |
|
|
Long time ago since you asked, but I found this:
WinLock.dll
See also this thread with more
| Quote: | Visual Basic example:
Private Declare Sub LockKeys Lib "WinLock" (Optional intHWND As Long)
Private Declare Sub UnlockKeys Lib "WinLock" ()
' This example demonstrates you use of
' - LockKeys
' - UnlockKeys
' functions of the WinLock.dll.
Sub WinLockDemo()
' ~~[ Step 1 ]~~
' Lock the system hot keys:
' Win+D ' Show Desktop using Windows key
' Win+E ' Run Explorer
' Win+F+(Ctrl) ' Find:All (and Find: Computer)
' Win+M ' Minimize all windows
' Win+R ' Run program
' Win+F1 ' Windows Help
' Alt+Tab ' Task switching
' Ctrl+Esc ' Start menu
' Win+Tab ' Special task switching mode
' Win+Pause ' Windows system properties
'
' Some Registry keys will be TEMPORARY changed
' to disable the Ctrl+Alt+Del sequence in Windows 2000/XP:
' HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System:
' DWORD:DisableChangePassword = 1
' DWORD:DisableLockWorkstation = 1
' DWORD:DisableTaskMgr = 1
' DWORD:DisableChangePassword = 1
' HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer:
' DWORD:NoBlock = 1
' DWORD:NoChangeStartMenu = 1
' DWORD:NoClose = 1
' DWORD:NoRun = 1
' DWORD:NoSMHelp = 1
LockKeys
' ~~[ Your Main Cycle ]~~
' Implement your MAIN CYCLE for slideshow, screensaver, kiosk or game HERE:
MsgBox "System hot keys and Task Manager are currently LOCKED. Please try out all the known sequences like Alt+Tab, Ctrl+Esc, Windows key etc... and press OK to unlock."
' ~~[ Step 2 ]~~
' Do not forget to unlock the hot keys:
UnlockKeys
End Sub |
_________________ (sorry, homesite offline atm) |
|
| Back to top |
|
 |
Elza Guest
|
Posted: Fri Jul 22, 2005 8:15 pm Post subject: Try Transparent Screen Lock |
|
|
I think I have found what you are looking for
http://www.e-motional.com/tscreenlock.htm
It is a transparent screensaver that allows you to use the windows password to get in. This link is for the WinNT/2000/Xp version. They have another version for Win98 |
|
| Back to top |
|
 |
niwi
Joined: 27 Feb 2005 Posts: 128 Location: Heidelberg, Germany
|
Posted: Tue Jul 26, 2005 7:34 am Post subject: Re: Try Transparent Screen Lock |
|
|
Hi,
Thank you for reporting this link - but the software is not freeware...
NiWi. |
|
| Back to top |
|
 |
Nemroth
Joined: 07 Sep 2004 Posts: 262 Location: France
|
Posted: Tue Jul 26, 2005 6:36 pm Post subject: |
|
|
| daonlyfreez wrote: | Long time ago since you asked, but I found this:
WinLock.dll
|
As I'm not able to do it, is it possible that someone post an example on how to use this DLL in AHK with DllCall to lock and unlock the PC ?
Thanks by advance. |
|
| Back to top |
|
 |
Wingfat
Joined: 23 Aug 2004 Posts: 193 Location: East Bay, California USA
|
Posted: Tue Jul 26, 2005 6:38 pm Post subject: |
|
|
Here is ascript that will shade the Active Window with out the Tray Icon...
I am still working on a way to lock it so someone cant close the window with out a password.
| Code: |
#notrayicon
#singleinstance,Force
;***********************************
; Change the "C:\Temp" directory to what ever active window you use everyday
; Or set to blank to enforce the "LastWindowFound"
WinWait, C:\temp\AutoHotkey\Scripts
IfWinNotActive, C:\temp\AutoHotkey\Scripts, ,
WinActivate, C:\temp\AutoHotkey\Scripts
WinSet,Transparent, 10, C:\temp\AutoHotkey\Scripts
winset,AlwaysOnTop,ON
;**********************************
; Loops the Window to keep it on top
loop
{
ifwinnotactive,C:\temp\AutoHotkey\Scripts
{
winactivate,C:\temp\AutoHotkey\Scripts
}
}
return
|
_________________ ----------------------------
Wingfool you fat! I mean, Wingfat you fool!
Line from Woody Allen's movie "What's Up Tiger Lilly?"
----------------------------- |
|
| Back to top |
|
 |
notloggedindaonlyfreez Guest
|
Posted: Wed Jul 27, 2005 11:15 am Post subject: |
|
|
@Nemroth: You can use the script here too. It's a normal grey window now, 'uncloseable' and forced always on top, but you can adapt it to become transparent (will ofcourse only work on NT-based systems), or add anything you want, or adapt it (access-screen/kiosk/screensaver).
You can use AHK's hotstring ability for "invisible" password/phrase access (hardcoded into the compiled script)
How to use and control the .dll, I don't know either, but I think AHK can do all you need... |
|
| Back to top |
|
 |
Nemroth
Joined: 07 Sep 2004 Posts: 262 Location: France
|
Posted: Wed Jul 27, 2005 2:14 pm Post subject: |
|
|
Thanks daonlyfreez, I will try to make the DllCall for the WinLock DLL (it will be my first one if I succeed...)
I can confirm that the WinLock DLL here and the one here are not the same as the exported functions are not the same. I seen that wih DLL Export Viewer
The How to realize a kind of kiosk-mode? topic can help to make an access screen utility that block the usage of the PC by hitting an hotkey... |
|
| Back to top |
|
 |
daonlyfreez
Joined: 16 Mar 2005 Posts: 755 Location: Berlin
|
Posted: Fri Jul 29, 2005 11:28 am Post subject: |
|
|
How about this?
(WinNT based systems only, mousecontrol and transparency are used)
Not a screensaver (but could be easily adapted to become one), but a 'normal' script/app... (adaptation of my previous script)
You will see the desktop and all running applications (everything), but you will NOT be able to interact with it. The mouse can be moved freely around, but won't do anything...
You can choose to hide the desktop, and/or the taskbar too, or minimize all applications... Moreover you can 'disable' the TaskManager...
Pressing the F1 key, or typing "stop" will stop it (and nothing else should)...
Enable the 'Security Settings' only if everything works as expected, or you might lock yourself out...
USE AT YOUR OWN RISK!
| Code: | #persistent
#singleinstance force
#notrayicon
setbatchlines, -1
SetWinDelay, -1
; ********** Variables
Title = Break me!
; changing the transparency to 0 will send all
; keystrokes/mouseclicks thru the window to the
; window behind. For security, set it to atleast 1 (max 255)
setTrans = 1
; Size adaptations for screen dimensions, might need adaptation
sh = %a_screenheight%
;sh -= 24
sw = %a_screenwidth%
;sw -= 5
; ********** SECURITY SETTINGS ON: **********
/*
; Hide the Desktop/Taskbar:
DetectHiddenWindows, on
WinHide, Program Manager
WinHide, ahk_class Shell_TrayWnd
DetectHiddenWindows, off
; Minimize all:
Send, #m
; Disable them Windows Security Screen (Ctrl + Alt + Delete Screen) buttons:
WinSecurityButtons("off")
*/
; ********** Create the Gui
Gui, +alwaysontop -sysmenu -resize +owner
Gui, Show, x0 y0 h%sh% w%sw%, %Title%
WinSet, Transparent, %setTrans%, %Title%
Gui, -Caption
WinActivate, %Title%
Return
; ********** Disable them 'specific' keycombos:
#b::
#l::
#p::
#c::
#v::
#k::
#i::
#a::
#Space::
#u::
^q::
^w::
!F4::
^F4::
#d::
#e::
#f::
#F3::
#^f::
F3::
#m::
#+m::
#r::
#F1::
!TAB::
!+TAB::
LWin::
RWin::
#ESC::
^ESC::
^+ESC::
AppsKey::
#TAB::
#+TAB::
#PAUSE::
!ESC::
#+ESC::
F11::
return
; Catch mouse
LButton::
RButton::
MButton::
WheelDown::
WheelUp::
XButton1::
XButton2::
return
; ********** Disable gui actions
GuiClose:
GuiEscape:
GuiSize:
GuiContextMenu:
GuiDropFiles:
return
; ********** This should be the only way to stop it:
F1:: ; press F1
:*:stop:: ; type "stop"
; ********** SECURITY SETTINGS OFF: **********
/*
; Enable buttons
WinSecurityButtons("")
; Enable Desktop
DetectHiddenWindows, on
WinShow, Program Manager
WinShow, ahk_class Shell_TrayWnd
; Minimize all undo:
Send, #+m
*/
; **********
; Done, so exit...
ExitApp
; ********** Functions - Routines **********
; --- Disable/enable Windows Security Window buttons...
WinSecurityButtons(toggle)
{
If toggle = off
{
SetTo = 1
}
else
SetTo = 0
; Edit Registry
Keys1 = NoBlock,NoRun,NoSMHelp,NoChangeStartMenu,NoClose,NoLogoff
Loop, PARSE, Keys1,`,
{
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\Explorer, %A_LoopField%, %SetTo%
}
Keys2 = DisableTaskMgr,DisableChangePassword,DisableLockWorkstation
Loop, PARSE, Keys2,`,
{
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, %A_LoopField%, %SetTo%
}
return
} |
_________________ (sorry, homesite offline atm) |
|
| Back to top |
|
 |
Nemroth
Joined: 07 Sep 2004 Posts: 262 Location: France
|
Posted: Fri Jul 29, 2005 1:50 pm Post subject: |
|
|
Thanks daonlyfreez.
I will study your code and try it. |
|
| Back to top |
|
 |
JSLover
Joined: 20 Dec 2004 Posts: 541 Location: LooseChange911.com... the WTC attacks were done by the US Gov't... the official story is a lie...
|
Posted: Sat Sep 24, 2005 10:19 am Post subject: Re: free transparent screen saver |
|
|
I know this is an old thread, but I found it searching for my problem (haven't solved my problem yet tho)...
| niwi wrote: | | The answer is to see what is on my screen, but if someone tries to access the computer the password has to be entered. |
...I believe this does exactly that...
| Code: | /*
Bugs...
* 1 keypress gets thru, that press is sent to the active window, if someone can compromise security in one keypress then more power to them...to disable this 1 press, you can create a transparent window over the screen to catch keys or enable BlockInput below, if you enable that, then mouse movement won't turn off the screen saver, any keypress will tho & that press won't go to any window.
*/
/*
CoordMode, Tooltip
TrayTip, , % A_TimeIdlePhysical
*/
if A_TimeIdlePhysical<319
Sleep, 1000
/*
else
TrayTip, , No Sleep
*/
;BlockInput, on ; use keyboard to remove screen saver
A_TimeIdlePhysical_Last=0
Loop
{
if (A_TimeIdlePhysical<A_TimeIdlePhysical_Last)
break
A_TimeIdlePhysical_Last:=A_TimeIdlePhysical
/*
A_TimeIdle_Last:=A_TimeIdle
Tooltip, % A_TimeIdlePhysical " < " A_TimeIdlePhysical_Last "`n" A_TimeIdle " < " A_TimeIdle_Last ;, 640, 480
*/
Sleep, 10 ; without this it eats 50% CPU!?!
}
;msgbox, Lock Workstation!
DllCall("LockWorkStation") |
...everyone else's approach was to disable all input so you can't Ctrl+Alt+Del, mine just locks as soon as A_TimeIdlePhysical has reduced at all.
I know that may not look pretty with all the debug code in it, but if you just delete all the /* */ comments you can clear up what it's really doing...or uncomment the debug code to see status info.
I only tested by really running the script, I didn't compile, make it a .scr & run it that way, but I can't see why it running that way would change what it does.
Hrm...you might even be able to remove the DllCall & check the box in the screen saver dialog "On resume, password protect" or "On resume, show Welcome Screen". That way the check box is listened to...basically all you need is a screen saver that does nothing & then exits...that checkbox in windows should handle the locking... _________________
Home • Click image! • Blog |
|
| Back to top |
|
 |
Dewi Morgan
Joined: 03 Oct 2005 Posts: 178
|
Posted: Thu Oct 06, 2005 3:44 pm Post subject: |
|
|
A quick skim of this thread shows that nobody else has pointed it out, so:
You can't get a real password protected screensaver running with "true" transparency under any modern version of Windows (NT/2000/XP).
These run screen savers in the "security" desktop - a seperate, protected workspace. Anything running on one desktop can't communicate with anything on another desktop (launch processes, get a screendump, etc). So screensavers can't be truly transparent.
You can launch the screensaver and pass it a screengrab at startup. This would be static, so will clearly be wrong if there are any animated things on the desktop (an analog clock would be the worst, but even the taskbarclock would count).
You can just try (as people have written here) to block all keys like ctrl-alt-del, but however you do that, you'll never have the security of a real screensaver, so that's basically a Really Bad Idea.
I think this is the method that "Transparent screenlock pro" are using, though, particularly since (if I read their blurb right) they offer the ability to *properly* lock thescreen when the user moves away from the computer.
There's an interesting suggestion here, though:
http://www.halfbakery.com/idea/Transparent_20_20Screensaver
| Quote: | | You could do workarounds, like running a background piece of spyware on your main desktop who is willing to broadcast the desktop's contents to whoever asks (ie. the screensaver). |
Apparently it has been done:
| Quote: | | Clear Screen Saver is on the Win2K resource kit (exoensive) Supplement One CD-ROM in the Apps\clearscreensaver folder. |
_________________ Yet another hotkeyer. |
|
| Back to top |
|
 |
Elza Guest
|
Posted: Fri Oct 07, 2005 3:36 am Post subject: |
|
|
Dewi,
I do not agree with you when you say that you cannot get "a real password protected screensaver running with true transparency under any modern verion of windows"
Transparent Screen Lock Pro http://www.e-motional.com/tscreenlock.htm seems to do exactly that. And to unlock the system the user must enter the same logon password that they use to log on to windows. If they change their password the program knows as you do not have to enter the password anywhere in Transparent Screen Lock Pro's configuration - meaning that the program uses the internal password of windows.
I am now testing a beta version of the program where you select Transparent as one of the screensavers in "Dispaly Properties" If you want the beta version just e-mail them and they send you a link to download the beta - i don't think you need to be a registered user.
Obviously you dont have the same security of a real screensaver because a real screensaver hides your desktop. Here your desktop of completely exposed but a user cannot do anything to the system without entering a password.
I have read the stuff on the halfbakery.com site and none of that makes any sense to me.
Best thing to do is to try Transparent from the site i have above and add your comments about that here.
If somebody has another solution then they should mention it too. I would like to try it out. |
|
| Back to top |
|
 |
Dewi Morgan
Joined: 03 Oct 2005 Posts: 178
|
Posted: Sat Oct 08, 2005 5:39 am Post subject: |
|
|
Yes. Read the end of my post to find out how they did it - you cannot do this without a "spy" program passing the information to the screensaver.
I'm sure that is possible through AHK, so long as people are aware that they need to do it that way: which is why I pointed it out. _________________ Yet another hotkeyer. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|