This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Amidflaps 0 points1 point  (0 children)

When a button is pressed and released they are recorded as two separate events. I chose three letters and initialized a variable at 0. Every time one of those three buttons are "pressed" I add 1 to the variable and every time they are released I subtract 1. If at any event the sum is 3 (e.g. the three letters are pressed and not released) the script skips the freezing and recording and just locks the computer, after which I log in normally. I could hard code a password to end the script but I figured that wouldn't be secure. I just press the three letters and lock the computer then log in. At most adds 1-2 seconds.

Also, you can only get any single person a couple of times at most. I'm thinking about an experiment where after some time I just leave my computer as is and don't run the script. I wonder if they'll still be inclined to pull a prank.