AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

primitive lock

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
primitive
Guest





PostPosted: Tue Sep 27, 2005 3:49 pm    Post subject: primitive lock Reply with quote

Code:

; use password + NumpadEnter
#singleinstance force
Splashimage,,b w1050 h777 x0 Y0 CWblack CTlime m9 b fs18 zh0,`n`n`nLOCK
loop
{
MouseMove, 3300 , 3330
sleep, 66
process, close, taskmgr.exe
sleep, 66
}
return

Mbutton::
Lbutton::
Rbutton::
Enter::
Escape::
Space::
Tab::
Backspace::
Delete::
Insert::
Up::
Down::
Left::
Right::
Home::
End::
Pgup::
Pgdn::
Lwin::
Rwin::
Appskey::
Scrolllock::
Control::
Alt::
Shift::
Return

::Password::
Exitapp
Return

Back to top
enrica



Joined: 21 Mar 2005
Posts: 114
Location: Bahia, Brasil

PostPosted: Fri Oct 14, 2005 2:23 am    Post subject: Reply with quote

More primitive lock....
Password = password Smile
Code:

#singleinstance force
Process, Priority, , High
Splashimage,,b w1050 h777 x0 Y0 CWblack CTlime m9 b fs18 zh0,`n`n`nLOCK
Winminimizeall
Loop
{
MouseMove, 1666 , 366
sleep, 166
process, close, taskmgr.exe
sleep, 166
}
return

!F4::
!Tab::
^Tab::
+Tab::
^+Tab::
+!Tab::
^+!Tab::
^Esc::
^+!Esc::
+!Esc::
!Esc::
+Esc::
Alt::
Appskey::
Backspace::
CapsLock::
Control::
Delete::
Down::
End::
Enter::
Escape::
Home::
Insert::
Lbutton::
Left::
Lwin::
Mbutton::
Numpad0::
Numpad1::
Numpad2::
Numpad3::
Numpad4::
Numpad5::
Numpad6::
Numpad7::
Numpad8::
Numpad9::
NumpadDel::
NumpadDot::
NumpadEnd::
NumpadEnter::
NumpadHome::
NumpadIns::
NumpadLeft::
NumpadPgDn::
NumpadPgUp::
NumpadRight::
Pgdn::
Pgup::
Rbutton::
Right::
Scrolllock::
Shift::
Space::
Tab::
Up::
Rwin::
#r::
Return

:*:Password::
WinMinimizeAllUndo
Exitapp
Return

_________________
65.6E.72.69.63.61. (My hovercraft is full of eels)


Last edited by enrica on Sat Oct 15, 2005 2:39 pm; edited 2 times in total
Back to top
View user's profile Send private message
vital



Joined: 05 Oct 2005
Posts: 17
Location: china

PostPosted: Sat Oct 15, 2005 4:18 am    Post subject: Reply with quote

i want to automatically unlock 2 minutes later,how can i do?
thanks
Back to top
View user's profile Send private message
enrica



Joined: 21 Mar 2005
Posts: 114
Location: Bahia, Brasil

PostPosted: Sat Oct 15, 2005 11:40 am    Post subject: Reply with quote

This work but is very primitive:
Code:

#singleinstance force
Process, Priority, , High
Splashimage,,b w1050 h777 x0 Y0 CWblack CTlime m9 b fs18 zh0,`n`n`nLOCK

SetTimer, Autoexit, 120000 ;time to unlock

Winminimizeall
Loop
{
MouseMove, 1666 , 366
sleep, 166
process, close, taskmgr.exe
sleep, 166
}
return

!F4::
!Tab::
^Tab::
+Tab::
^+Tab::
+!Tab::
^+!Tab::
^Esc::
^+!Esc::
+!Esc::
!Esc::
+Esc::
Alt::
Appskey::
Backspace::
CapsLock::
Control::
Delete::
Down::
End::
Enter::
Escape::
Home::
Insert::
Lbutton::
Left::
Lwin::
Mbutton::
Numpad0::
Numpad1::
Numpad2::
Numpad3::
Numpad4::
Numpad5::
Numpad6::
Numpad7::
Numpad8::
Numpad9::
NumpadDel::
NumpadDot::
NumpadEnd::
NumpadEnter::
NumpadHome::
NumpadIns::
NumpadLeft::
NumpadPgDn::
NumpadPgUp::
NumpadRight::
Pgdn::
Pgup::
Rbutton::
Right::
Scrolllock::
Shift::
Space::
Tab::
Up::
Rwin::
#r::
Return

Autoexit:
WinMinimizeAllUndo
exitapp
return

:*:Password::
WinMinimizeAllUndo
Exitapp
Return

_________________
65.6E.72.69.63.61. (My hovercraft is full of eels)
Back to top
View user's profile Send private message
vital



Joined: 05 Oct 2005
Posts: 17
Location: china

PostPosted: Mon Oct 17, 2005 1:04 am    Post subject: Reply with quote

thank enrica!
i want to add another function, that is a tooltip "lock the computer 2 minutes later!" appearing,then lock. How can i do ?
Back to top
View user's profile Send private message
enrica



Joined: 21 Mar 2005
Posts: 114
Location: Bahia, Brasil

PostPosted: Mon Oct 17, 2005 9:53 am    Post subject: Reply with quote

Hi Vital, sorry but I'm not a expert, I only make a very basically (primitive) script.
But I'm happy if can help you.
I don't understand if you want to combine both function (lock after 2 minute and then autoexit after 2 more minute)

You can add before the splashimage "lock":
Code:

Splashimage,,b w444 h33 x333 Y322 CWff0066 m9 b fs16 zh0, lock the computer 2 minutes later!.....
Sleep, 120000 ; 2 minute to lock


Or you call your lock script from another script
Code:

#singleinstance force
Splashimage,,b w444 h33 x333 Y322 CWff0066 m9 b fs16 zh0, lock the computer 2 minutes later!.....
Sleep, 120000 ; 2 minute to lock
Run, Lock.ahk 
;(or Run, Lock.exe)
exitapp


or maybe lock the pc after a 2 minute of inactivity
Code:

#Persistent
#InstallKeybdHook
#InstallMouseHook
SetTimer,lock,1000
Return

lock:
If A_TimeIdlePhysical >= 120000 ; 2 minute of keyword inactivity
Run, Lock.ahk 
;(or Run, Lock.exe)
;(or your lock code)
return


I suggest to ask in the help section; smart, expert and gentle people can help you better!.
ciao!
_________________
65.6E.72.69.63.61. (My hovercraft is full of eels)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group