Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;enter time down to the second
- f1::
- FormatTime, CurrentTime,, HH:mm:ss
- InputBox, UserInput, Security Check, Enter the current time (HH:MM:SS):
- if (UserInput = CurrentTime)
- MsgBox, Correct! Somehow you did it.
- else
- MsgBox, Incorrect.`nExpected: %CurrentTime%`nYou entered: %UserInput%
- return
- ; gui button moves when wrong
- f2::
- #NoEnv
- #SingleInstance Force
- SetWorkingDir %A_ScriptDir%
- Gui, Font, s10
- Gui, Add, Text, x20 y20, What is 7 + 5?
- Gui, Add, Edit, vAnswer x20 y50 w200
- Gui, Add, Button, vRunButton gCheckAnswer x20 y90 w100 h30, Submit
- Gui, Show, w400 h250, Extremely Secure System
- return
- CheckAnswer:
- Gui, Submit, NoHide
- if (Answer = "12")
- {
- MsgBox, Correct! Security verification complete.
- ExitApp
- }
- else
- {
- ; Get random position inside the GUI
- Random, NewX, 20, 280
- Random, NewY, 120, 200
- ; Move the button
- GuiControl, Move, RunButton, x%NewX% y%NewY%
- ; Make the user suffer
- Random, Joke, 1, 4
- if (Joke = 1)
- MsgBox, Wrong. The button has relocated.
- else if (Joke = 2)
- MsgBox, Incorrect. Try finding the button.
- else if (Joke = 3)
- MsgBox, Security level increased.
- else
- MsgBox, Nice try. I moved the button.
- GuiControl, Focus, Answer
- }
- return
- ;Button gets progressively smaller
- f3::
- #NoEnv
- #SingleInstance Force
- SetWorkingDir %A_ScriptDir%
- Gui, Font, s10
- Gui, Add, Text, x20 y20, What is 7 + 5?
- Gui, Add, Edit, vAnswer x20 y50 w220 h25
- Gui, Add, Button, vSubmitButton gCheckAnswer1 x20 y90 w120 h35, Submit
- Gui, Show, w350 h180, Extremely Secure System
- return
- CheckAnswer1:
- Gui, Submit, NoHide
- if (Answer = "12")
- {
- MsgBox, 64, Success, Correct!`n`nSecurity verification complete.
- ExitApp
- }
- ; Count the failed attempts
- FailCount++
- ; Make the button smaller
- NewWidth := 120 - (FailCount * 15)
- NewHeight := 35 - (FailCount * 4)
- ; Don't let it become completely unusable
- if (NewWidth < 25)
- NewWidth := 25
- if (NewHeight < 10)
- NewHeight := 10
- ; Move it slightly as well
- Random, NewX, 20, 280
- Random, NewY, 90, 140
- GuiControl, Move, SubmitButton, x%NewX% y%NewY% w%NewWidth% h%NewHeight%
- ; Different message depending on how many times they've failed
- if (FailCount = 1)
- Message := "Wrong.`n`nThe button has been slightly reduced."
- else if (FailCount = 2)
- Message := "Still wrong.`n`nThe button is getting smaller."
- else if (FailCount = 3)
- Message := "Incorrect.`n`nYou are making the button nervous."
- else if (FailCount = 4)
- Message := "Wrong again.`n`nThe button is now approximately the size of a peanut."
- else if (FailCount = 5)
- Message := "Incorrect.`n`nGood luck clicking the button now."
- else
- Message := "Wrong.`n`nThe button continues to shrink."
- MsgBox, 48, Security Failure, %Message%
- GuiControl, Focus, Answer
- return
- ;Enter the number of windows currently open
- f4::
- #NoEnv
- #SingleInstance Force
- SetWorkingDir %A_ScriptDir%
- ; Count currently open windows
- WinGet, WindowCount, Count
- Gui, Font, s10
- Gui, Add, Text, x20 y20 w320, Security Check
- Gui, Add, Text, x20 y50 w320, Enter the number of windows currently open:
- Gui, Add, Edit, vAnswer x20 y80 w200 h25
- Gui, Add, Button, gCheckAnswer2 x20 y120 w100 h30, Submit
- Gui, Show, w370 h180, Extremely Secure System
- return
- CheckAnswer2:
- Gui, Submit, NoHide
- if (Answer = WindowCount)
- {
- MsgBox, 64, Success, Correct!`n`nYou have successfully proven that you know how many windows you have open.
- ExitApp
- }
- else
- {
- MsgBox, 48, Incorrect, Wrong.`n`nYou entered: %Answer%`nActual count: %WindowCount%`n`nSecurity verification failed.
- }
- return
- ;Enter the number of pixels between two buttons
- f5::
- #NoEnv
- #SingleInstance Force
- SetWorkingDir %A_ScriptDir%
- Gui, Font, s10
- Gui, Add, Text, x20 y20 w400, EXTREMELY SECURE VERIFICATION
- Gui, Add, Text, x20 y50 w400, Enter the number of pixels between the two buttons:
- Gui, Add, Button, vButtonOne x40 y100 w100 h35, BUTTON 1
- Gui, Add, Button, vButtonTwo x240 y100 w100 h35, BUTTON 2
- Gui, Add, Edit, vAnswer x120 y155 w140 h25
- Gui, Add, Button, gCheckAnswer3 x160 y195 w100 h30, Submit
- Gui, Show, w400 h250, Pixel Security System
- ; Get Button 1 position
- GuiControlGet, ButtonOnePos, Pos, ButtonOne
- ; Get Button 2 position
- GuiControlGet, ButtonTwoPos, Pos, ButtonTwo
- ; Calculate right edge of Button 1
- ButtonOneRight := ButtonOnePosX + ButtonOnePosW
- ; Calculate left edge of Button 2
- ButtonTwoLeft := ButtonTwoPosX
- ; Calculate the gap
- CorrectAnswer := ButtonTwoLeft - ButtonOneRight
- return
- CheckAnswer3:
- Gui, Submit, NoHide
- if (Answer = CorrectAnswer)
- {
- MsgBox, 64, ACCESS GRANTED, Correct!`n`nThe buttons are exactly %CorrectAnswer% pixels apart.`n`nYou have successfully proven that you understand completely unnecessary mathematics.
- ExitApp
- }
- else
- {
- MsgBox, 48, ACCESS DENIED, Incorrect!`n`nYou entered: %Answer% pixels.`n`nThe correct answer is %CorrectAnswer% pixels.`n`nPerhaps you should physically measure the screen.
- }
- return
- ;Click the button when the clock reaches a specific second
- f6::
- #NoEnv
- #SingleInstance Force
- SetWorkingDir %A_ScriptDir%
- ; Pick a random target second
- Random, TargetSecond, 0, 59
- Gui, Font, s10
- Gui, Add, Text, x20 y20 w360 Center, EXTREMELY SECURE VERIFICATION
- Gui, Add, Text, x20 y55 w360 Center, Click the button when the clock reaches:
- Gui, Add, Text, vTargetText x20 y85 w360 Center cRed, SECOND %TargetSecond%
- Gui, Add, Text, vClockText x20 y120 w360 Center, Current second: 00
- Gui, Add, Button, vClickButton gCheckClick x130 y165 w140 h40, CLICK ME
- Gui, Show, w400 h240, Precision Security System
- SetTimer, UpdateClock, 50
- return
- UpdateClock:
- FormatTime, CurrentSecond,, ss
- GuiControl,, ClockText, Current second: %CurrentSecond%
- return
- CheckClick:
- FormatTime, ClickSecond,, ss
- ClickSecond := ClickSecond + 0
- if (ClickSecond = TargetSecond)
- {
- MsgBox, 64, ACCESS GRANTED, PERFECT!`n`nYou clicked at exactly second %TargetSecond%.`n`nYour ability to stare at a clock has been verified.
- ExitApp
- }
- else
- {
- Difference := ClickSecond - TargetSecond
- if (Difference < 0)
- Difference := -Difference
- MsgBox, 48, ACCESS DENIED, WRONG!`n`nTarget second: %TargetSecond%`nYou clicked at: %ClickSecond%`n`nYou were %Difference% second(s) off.`n`nPlease develop faster reflexes.
- }
- return
- ; The instructions change every 5 seconds.
- f7::
- #NoEnv
- #SingleInstance Force
- SetWorkingDir %A_ScriptDir%
- FailCount := 0
- InstructionNumber := 1
- TimeLeft := 5
- Gui, Font, s10, Segoe UI
- Gui, Add, Text, x20 y20 w400 h25 Center, EXTREMELY SECURE VERIFICATION
- Gui, Add, Text, x20 y55 w400 h25 Center, CURRENT INSTRUCTION:
- Gui, Add, Text, vInstructions x30 y90 w380 h45 Center, Click the button.
- Gui, Add, Button, vActionButton gDoAction x145 y150 w150 h40, CLICK ME
- Gui, Add, Text, vTimerText x20 y205 w400 h25 Center, Instructions change in 5 seconds...
- Gui, Show, w440 h255, Extremely Secure System
- SetTimer, ChangeInstructions, 5000
- SetTimer, UpdateTimer, 1000
- return
- ChangeInstructions:
- Random, InstructionNumber, 1, 5
- TimeLeft := 5
- if (InstructionNumber = 1)
- {
- NewInstruction := "Click the button."
- }
- else if (InstructionNumber = 2)
- {
- NewInstruction := "Do NOT click the button."
- }
- else if (InstructionNumber = 3)
- {
- NewInstruction := "Click the button twice."
- }
- else if (InstructionNumber = 4)
- {
- NewInstruction := "Click the button only once."
- }
- else
- {
- NewInstruction := "Click the button before the instructions change."
- }
- GuiControl,, Instructions, %NewInstruction%
- return
- UpdateTimer:
- TimeLeft--
- if (TimeLeft < 0)
- TimeLeft := 5
- GuiControl,, TimerText, Instructions change in %TimeLeft% seconds...
- return
- DoAction:
- if (InstructionNumber = 1)
- {
- MsgBox, 64, ACCESS GRANTED, Correct!`n`nYou followed the instructions.`n`nSecurity verification complete.
- ExitApp
- }
- else if (InstructionNumber = 2)
- {
- MsgBox, 48, SECURITY FAILURE, You clicked it.`n`nThe instructions specifically said NOT to.`n`nExcellent work.
- }
- else if (InstructionNumber = 3)
- {
- FailCount++
- if (FailCount >= 2)
- {
- MsgBox, 64, ACCESS GRANTED, You clicked twice.`n`nSomehow, you survived the verification process.
- ExitApp
- }
- else
- {
- MsgBox, 48, SECURITY FAILURE, Thats one click.`n`nYou need to click it one more time.
- }
- }
- else if (InstructionNumber = 4)
- {
- MsgBox, 64, ACCESS GRANTED, Correct!`n`nYou clicked exactly once.
- ExitApp
- }
- else if (InstructionNumber = 5)
- {
- MsgBox, 64, ACCESS GRANTED, You clicked the button.`n`nVerification complete.
- ExitApp
- }
- return
- ; Enter a random 8-digit number shown for exactly 0.75 seconds
- f8::
- #NoEnv
- #SingleInstance Force
- SetWorkingDir %A_ScriptDir%
- ; Generate a random 8-digit number
- Random, RandomNumber, 10000000, 99999999
- Gui, Font, s10, Segoe UI
- Gui, Add, Text, x20 y20 w400 h25 Center, EXTREMELY SECURE VERIFICATION
- Gui, Add, Text, x20 y60 w400 h25 Center, Memorize this number:
- Gui, Add, Text, vNumberText x20 y95 w400 h45 Center, %RandomNumber%
- Gui, Add, Edit, vAnswer x110 y155 w220 h30
- Gui, Add, Button, gCheckAnswer5 x155 y200 w130 h40, SUBMIT
- Gui, Add, Text, vStatusText x20 y250 w400 h25 Center, Number will disappear in 0.75 seconds...
- Gui, Show, w440 h290, Extremely Secure System
- ; Wait exactly 750 milliseconds
- SetTimer, HideNumber, -3000
- return
- HideNumber:
- GuiControl,, NumberText, ????????
- GuiControl,, StatusText, The number is gone. Good luck.
- return
- CheckAnswer5:
- Gui, Submit, NoHide
- if (Answer = RandomNumber)
- {
- MsgBox, 64, ACCESS GRANTED, Correct!`n`nYou successfully memorized an 8-digit number in 0.75 seconds.`n`nYour brain has been verified.
- ExitApp
- }
- else
- {
- MsgBox, 48, ACCESS DENIED, Incorrect.`n`nYou entered: %Answer%`n`nThe correct number was: %RandomNumber%`n`nPerhaps 750 milliseconds was excessive.
- }
- return
- GuiClose:
- ExitApp
- ; You have to click "I Agree" three times, but it moves each time.
- f9::
- #NoEnv
- #SingleInstance Force
- SetWorkingDir %A_ScriptDir%
- ClickCount := 0
- Gui, Font, s10, Segoe UI
- Gui, Add, Text, x20 y20 w420 h25 Center, EXTREMELY SECURE AGREEMENT
- Gui, Add, Text, x20 y55 w420 h40 Center, You must click "I Agree" three times.
- Gui, Add, Text, x20 y95 w420 h25 Center, The button may or may not remain where you expect.
- Gui, Add, Text, vCountText x20 y135 w420 h25 Center, Agreements completed: 0 / 3
- Gui, Add, Button, vAgreeButton gAgree x160 y180 w140 h40, I AGREE
- Gui, Show, w460 h250, Extremely Secure System
- return
- Agree:
- ClickCount++
- if (ClickCount >= 3)
- {
- MsgBox, 64, ACCESS GRANTED, You clicked "I Agree" three times.`n`nYou are now officially extremely secure.`n`nThank you for agreeing to absolutely nothing.
- ExitApp
- }
- GuiControl,, CountText, Agreements completed: %ClickCount% / 3
- ; Pick a new random location
- Random, NewX, 30, 310
- Random, NewY, 175, 195
- GuiControl, Move, AgreeButton, x%NewX% y%NewY%
- if (ClickCount = 1)
- {
- MsgBox, 48, AGREEMENT REQUIRED, Thank you for agreeing.`n`nPlease agree again.
- }
- else if (ClickCount = 2)
- {
- MsgBox, 48, ALMOST THERE, One more agreement required.`n`nThe button has moved because security.
- }
- return
- ; After submitting, it asks you to confirm your answer — then asks you to confirm the confirmation
- f10::
- #NoEnv
- #SingleInstance Force
- SetWorkingDir %A_ScriptDir%
- Gui, Font, s10, Segoe UI
- Gui, Add, Text, x20 y20 w420 h25 Center, EXTREMELY SECURE VERIFICATION
- Gui, Add, Text, x20 y55 w420 h25 Center, What is 7 + 5?
- Gui, Add, Edit, vAnswer x160 y100 w120 h30
- Gui, Add, Button, gSubmitAnswer x160 y155 w120 h40, SUBMIT
- Gui, Show, w460 h230, Extremely Secure System
- return
- SubmitAnswer:
- Gui, Submit, NoHide
- ; First confirmation
- MsgBox, 36, CONFIRM YOUR ANSWER, You entered:`n`n%Answer%`n`nAre you absolutely sure this is your answer?
- IfMsgBox, No
- {
- MsgBox, 48, CANCELLED, Your answer has not been accepted.`n`nPlease reconsider your life choices.
- return
- }
- ; Second confirmation
- MsgBox, 36, CONFIRM YOUR CONFIRMATION, You confirmed that "%Answer%" is your answer.`n`nDo you confirm that you just confirmed your answer?
- IfMsgBox, No
- {
- MsgBox, 48, CONFIRMATION CANCELLED, Your confirmation has been cancelled.`n`nNothing has been accomplished.
- return
- }
- ; Third level of unnecessary bureaucracy
- MsgBox, 36, FINAL CONFIRMATION, You have confirmed your confirmation.`n`nAre you REALLY, REALLY sure you confirmed your confirmation?
- IfMsgBox, No
- {
- MsgBox, 48, SECURITY FAILURE, The confirmation of your confirmation was not confirmed.`n`nPlease start over.
- return
- }
- ; Finally check the answer
- if (Answer = "12")
- {
- MsgBox, 64, ACCESS GRANTED, Correct!`n`nYour answer was confirmed.`nYour confirmation was confirmed.`nYour confirmation of the confirmation was confirmed.`n`nSecurity verification complete.
- ExitApp
- }
- else
- {
- MsgBox, 48, ACCESS DENIED, Unfortunately, after all of that...`n`nyour answer was wrong.`n`nCorrect answer: 12`nYour answer: %Answer%
- }
- return
- esc::exitapp
Advertisement
Add Comment
Please, Sign In to add comment