AutoHotkey Community

It is currently May 27th, 2012, 12:13 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: February 15th, 2009, 3:41 am 
when in a hurry, a simple double click will do the job

u can just copy paste the script and run it directly, its all explained:

###WARNING the answer is 379, if u want to try the script



***************************** START OF SCRIPT


Code:
Sleep, 2000

SetKeyDelay -1
SetMouseDelay -1

Run, notepad.exe
WinWait, Untitled - Notepad
WinMaximize

Send {Enter 4}{Space 50}{# 10}{Space}THE COMPUTER IS NOW BLOCKED{!}{!}{!}{Space}{# 10}{Enter 5}As you approach the door, you notice that someone has scrawled a message on it with a pencil:{Enter}{Enter}"BEWARE: One of the guards always tells the truth, one of them always lies, one of them alternates between the two,{Enter}{Enter}and one craves the taste of human flesh!" Ominous.{Enter}{Enter}Hesitantly, you push the door open and enter a small room.{Enter}{Enter}You find four guards seated at a round table, playing bridge.{Enter}{Enter}You grab your weapon and prepare for a fight, but they just look up at you and nod amicably.{Enter}{Enter}"Hello," says the guard playing North.{Enter}{Enter}"Er, hi," you say. "Um, don't mind me, I was just passing through."{Enter}{Enter}The guard playing South says, "I suppose you want the combination to the other door, then? I'm getting really tired of people asking about that."{Enter}{Enter}"He's lying," says North.{Enter}{Enter}"No," says East, "you're the one lying."{Enter}{Enter}"Graaaaagh," says West.{Enter}{Enter}"Great," you sigh. "What's the code, then?"{Enter}{Enter}"Well," says South, "the first digit is 8."{Enter}{Enter}"No it isn't," says East. "It's 3."{Enter}{Enter}North shakes his head. "They're both lying -- it's 1."{Enter}{Enter}"The second digit now -- that's 7," says South.{Enter}{Enter}"Graaaaagh," says West.{Enter}{Enter}"It's 4, in fact," says North.{Enter}{Enter}East grumbles, "It's definitely more than that."{Enter}{Enter}"Sorry, I meant to say 5," replies North. "And the last digit is 2."{Enter}{Enter}"Don't listen to him," says East. "It's 9."{Enter}{Enter}"No, it is 2, I'm sure of it," says South.{Enter}{Enter}"Graaaaagh," says West.{Enter}{Enter}You roll your eyes. "Great. Thanks a lot, guys."{Enter 4}{Space 157}{Enter}{Space 32}Type in the 3 digit answer (using the numbers on top of the letters) to unlock the computer...{Space 31}{Enter}{Space 157}{Shift Down}{Left 475}{Shift Up}

MouseMove, 2000, 2000
Sleep, 50
MouseMove, 2001, 2000
Sleep, 50
Sleep, 1000


BlockInput, MouseMove

Loop
{
Input, s, L1, {F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{!}{#}{+}{^}{{}{}}{Enter}{Esc}{Space}{Tab}{BS}{Del}{Ins}{Up}{Down}{Left}{Right}{Home}{End}{PgUp}{PgDn}{CapsLock}{ScrollLock}{NumLock}{Ctrl}{LCtrl}{RCtrl}{Alt}{LAlt}{RAlt}{Shift}{LShift}{RShift}{LWin}{RWin}{AppsKey}{Sleep}{Numpad0}{Numpad1}{Numpad2}{Numpad3}{Numpad4}{Numpad5}{Numpad6}{Numpad7}{Numpad8}{Numpad9}{NumpadDot}{NumpadEnter}{NumpadMult}{NumpadDiv}{NumpadAdd}{NumpadSub}{NumpadDel}{NumpadIns}{NumpadClear}{NumpadUp}{NumpadDown}{NumpadLeft}{NumpadRight}{NumpadHome}{NumpadEnd}{NumpadPgUp}{NumpadPgDn}{Browser_Back}{Browser_Forward}{Browser_Refresh}{Browser_Stop}{Browser_Search}{Browser_Favorites}{Browser_Home}{Volume_Mute}{Volume_Down}{Volume_Up}{Media_Next}{Media_Prev}{Media_Stop}{Media_Play_Pause}{Launch_Mail}{Launch_Media}{Launch_App1}{Launch_App2}{PrintScreen}{CtrlBreak}{Pause}
IfEqual, s, 3
   break
else
   Sleep, 0
}

Loop
{
Input, s, L1, {F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{!}{#}{+}{^}{{}{}}{Enter}{Esc}{Space}{Tab}{BS}{Del}{Ins}{Up}{Down}{Left}{Right}{Home}{End}{PgUp}{PgDn}{CapsLock}{ScrollLock}{NumLock}{Ctrl}{LCtrl}{RCtrl}{Alt}{LAlt}{RAlt}{Shift}{LShift}{RShift}{LWin}{RWin}{AppsKey}{Sleep}{Numpad0}{Numpad1}{Numpad2}{Numpad3}{Numpad4}{Numpad5}{Numpad6}{Numpad7}{Numpad8}{Numpad9}{NumpadDot}{NumpadEnter}{NumpadMult}{NumpadDiv}{NumpadAdd}{NumpadSub}{NumpadDel}{NumpadIns}{NumpadClear}{NumpadUp}{NumpadDown}{NumpadLeft}{NumpadRight}{NumpadHome}{NumpadEnd}{NumpadPgUp}{NumpadPgDn}{Browser_Back}{Browser_Forward}{Browser_Refresh}{Browser_Stop}{Browser_Search}{Browser_Favorites}{Browser_Home}{Volume_Mute}{Volume_Down}{Volume_Up}{Media_Next}{Media_Prev}{Media_Stop}{Media_Play_Pause}{Launch_Mail}{Launch_Media}{Launch_App1}{Launch_App2}{PrintScreen}{CtrlBreak}{Pause}
IfEqual, s, 7
   break
else
   Sleep, 0
}

Loop
{
Input, s, L1, {F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{!}{#}{+}{^}{{}{}}{Enter}{Esc}{Space}{Tab}{BS}{Del}{Ins}{Up}{Down}{Left}{Right}{Home}{End}{PgUp}{PgDn}{CapsLock}{ScrollLock}{NumLock}{Ctrl}{LCtrl}{RCtrl}{Alt}{LAlt}{RAlt}{Shift}{LShift}{RShift}{LWin}{RWin}{AppsKey}{Sleep}{Numpad0}{Numpad1}{Numpad2}{Numpad3}{Numpad4}{Numpad5}{Numpad6}{Numpad7}{Numpad8}{Numpad9}{NumpadDot}{NumpadEnter}{NumpadMult}{NumpadDiv}{NumpadAdd}{NumpadSub}{NumpadDel}{NumpadIns}{NumpadClear}{NumpadUp}{NumpadDown}{NumpadLeft}{NumpadRight}{NumpadHome}{NumpadEnd}{NumpadPgUp}{NumpadPgDn}{Browser_Back}{Browser_Forward}{Browser_Refresh}{Browser_Stop}{Browser_Search}{Browser_Favorites}{Browser_Home}{Volume_Mute}{Volume_Down}{Volume_Up}{Media_Next}{Media_Prev}{Media_Stop}{Media_Play_Pause}{Launch_Mail}{Launch_Media}{Launch_App1}{Launch_App2}{PrintScreen}{CtrlBreak}{Pause}
IfEqual, s, 9
   break
else
   Sleep, 0
}

BlockInput, MouseMoveOff

ExitApp



***************************** END



of course, any feedback on these long lines is welcome :D


Report this post
Top
  
Reply with quote  
 Post subject: forgot
PostPosted: February 15th, 2009, 3:43 am 
it looks good in 1280x1024, i dont know about smaller sizes....


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 8th, 2009, 7:51 pm 
Offline

Joined: October 5th, 2009, 6:02 pm
Posts: 66
Location: southampton UK
:lol: VERY NICE , This will keep the kids of pc , Thanks

_________________
All`s well that ends well :-)
I will not appreciate sarcastic or personal insults in reply s to my posts . Those are the acts of cowards being brave from afar .If you cant be productive don't be destructive .


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 9th, 2009, 4:21 am 
Offline

Joined: August 2nd, 2008, 12:31 am
Posts: 101
if you had it check all input at once it would be harder to get into, instead of 1 key at a time... the current method could be spammed with keys, and as long as i press the keys 379 in that order, with any keys in between i would unlock it.


Code:
Input, s, L3,

and then
Code:
IfEqual, s, 379


You don't want the cat to unlock your computer :)

_________________
Woot.

Please read forum etiquette


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Strugling
PostPosted: October 9th, 2009, 7:39 pm 
Offline

Joined: October 5th, 2009, 6:02 pm
Posts: 66
Location: southampton UK
NOPE Cant get it right , Keep locking myself out of my PC LOL
Please post the complete script with the above changes so I can see how its done please . Tired of restarting my pc . lol . It works if I enter the 379 first time , but when I try other keys first , I get locked out completely and 379 don't work any more .
Thanks

_________________
All`s well that ends well :-)
I will not appreciate sarcastic or personal insults in reply s to my posts . Those are the acts of cowards being brave from afar .If you cant be productive don't be destructive .


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 11th, 2009, 9:24 pm 
Offline

Joined: August 2nd, 2008, 12:31 am
Posts: 101
here's the full example...i havn't tested it.

Code:
Sleep, 2000

SetKeyDelay -1
SetMouseDelay -1

Run, notepad.exe
WinWait, Untitled - Notepad
WinMaximize

Send {Enter 4}{Space 50}{# 10}{Space}THE COMPUTER IS NOW BLOCKED{!}{!}{!}{Space}{# 10}{Enter 5}As you approach the door, you notice that someone has scrawled a message on it with a pencil:{Enter}{Enter}"BEWARE: One of the guards always tells the truth, one of them always lies, one of them alternates between the two,{Enter}{Enter}and one craves the taste of human flesh!" Ominous.{Enter}{Enter}Hesitantly, you push the door open and enter a small room.{Enter}{Enter}You find four guards seated at a round table, playing bridge.{Enter}{Enter}You grab your weapon and prepare for a fight, but they just look up at you and nod amicably.{Enter}{Enter}"Hello," says the guard playing North.{Enter}{Enter}"Er, hi," you say. "Um, don't mind me, I was just passing through."{Enter}{Enter}The guard playing South says, "I suppose you want the combination to the other door, then? I'm getting really tired of people asking about that."{Enter}{Enter}"He's lying," says North.{Enter}{Enter}"No," says East, "you're the one lying."{Enter}{Enter}"Graaaaagh," says West.{Enter}{Enter}"Great," you sigh. "What's the code, then?"{Enter}{Enter}"Well," says South, "the first digit is 8."{Enter}{Enter}"No it isn't," says East. "It's 3."{Enter}{Enter}North shakes his head. "They're both lying -- it's 1."{Enter}{Enter}"The second digit now -- that's 7," says South.{Enter}{Enter}"Graaaaagh," says West.{Enter}{Enter}"It's 4, in fact," says North.{Enter}{Enter}East grumbles, "It's definitely more than that."{Enter}{Enter}"Sorry, I meant to say 5," replies North. "And the last digit is 2."{Enter}{Enter}"Don't listen to him," says East. "It's 9."{Enter}{Enter}"No, it is 2, I'm sure of it," says South.{Enter}{Enter}"Graaaaagh," says West.{Enter}{Enter}You roll your eyes. "Great. Thanks a lot, guys."{Enter 4}{Space 157}{Enter}{Space 32}Type in the 3 digit answer (using the numbers on top of the letters) to unlock the computer...{Space 31}{Enter}{Space 157}{Shift Down}{Left 475}{Shift Up}

MouseMove, 2000, 2000
Sleep, 50
MouseMove, 2001, 2000
Sleep, 50
Sleep, 1000


BlockInput, MouseMove

Loop
{
;here --\/
Input, s, L3, {F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{!}{#}{+}{^}{{}{}}{Enter}{Esc}{Space}{Tab}{BS}{Del}{Ins}{Up}{Down}{Left}{Right}{Home}{End}{PgUp}{PgDn}{CapsLock}{ScrollLock}{NumLock}{Ctrl}{LCtrl}{RCtrl}{Alt}{LAlt}{RAlt}{Shift}{LShift}{RShift}{LWin}{RWin}{AppsKey}{Sleep}{Numpad0}{Numpad1}{Numpad2}{Numpad3}{Numpad4}{Numpad5}{Numpad6}{Numpad7}{Numpad8}{Numpad9}{NumpadDot}{NumpadEnter}{NumpadMult}{NumpadDiv}{NumpadAdd}{NumpadSub}{NumpadDel}{NumpadIns}{NumpadClear}{NumpadUp}{NumpadDown}{NumpadLeft}{NumpadRight}{NumpadHome}{NumpadEnd}{NumpadPgUp}{NumpadPgDn}{Browser_Back}{Browser_Forward}{Browser_Refresh}{Browser_Stop}{Browser_Search}{Browser_Favorites}{Browser_Home}{Volume_Mute}{Volume_Down}{Volume_Up}{Media_Next}{Media_Prev}{Media_Stop}{Media_Play_Pause}{Launch_Mail}{Launch_Media}{Launch_App1}{Launch_App2}{PrintScreen}{CtrlBreak}{Pause}

;here--\/
IfEqual, s, 379
   break
else
   Sleep, 0
}



BlockInput, MouseMoveOff

ExitApp

+Esc::
   ExitApp


I've included Shift-Escape as a close key so you don't need to restart everytime you get locked out.

One of the few downsides with this method is that if you type a single character, and then forget you need to retry a few times so that you can get the whole string in properly.

ex:
Typed: 037 937 903 790 379
String: 037|937|903|790|379

To get around this you could increase the size of the keys captured and then look at using IfContains and not IfEquals.

_________________
Woot.

Please read forum etiquette


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2009, 10:01 pm 
Offline

Joined: April 8th, 2009, 8:23 pm
Posts: 3036
Location: Rio de Janeiro - RJ - Brasil
Wouldn't a hotstring do the job? (untested)
Code:
; autoexec stuff ...
; autoexec stuff ...
Return

:?*:379:  ;  <-- whatever you "code" is
; Insert "BlockInput Off" and ExitApp and whatever here

_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"
Image
Antonio França
My stuff: Google Profile


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo, Bing [Bot], Google [Bot], Rajat and 54 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group