DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Execute a launch menu with prior password protection  (Read 5,989 times)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,947
Execute a launch menu with prior password protection
« on: June 16, 2012, 10:46 PM »
Execute a launch menu with prior password protection

I have found a little piece of soft to protect a procedure. But I don't know where to put my menu soft : menuak.ahk

the piece is this :

#SingleInstance Ignore
SetBatchLines, -1

Menu, Tray, NoStandard
Menu, Tray, Add, Exit, GuiClose
Menu, Tray, Default, Exit

InputBox, uName, User`?, Enter your USERNAME!
If uName = Hotdog
 InputBox, uPass, Pass`?, Enter your PASSWORD!, HIDE
Else
 {
   Msgbox, 48, LOL, Wrong guess`, oh foolish mortal!
   Goto, GuiClose
 }

If uPass = Bun
 Goto, EnterScript
Else
 Msgbox, 48, LOL, Geez`, you just can't win!

GuiClose:
 ExitApp
Return

EnterScript:
Msgbox, 48, Ah-HA, Congratulations! You've made it!


Where can I put to run my menuak.ahk ?¿?¿

Best Regards

P.D. Any other piece of source code more powerful is welcome (by example giving me 3 tries, or more complex interaction)

4wd

  • Pedantic Old Bastard
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,652
    • Coding Snacks
Re: Execute a launch menu with prior password protection
« Reply #1 on: June 17, 2012, 02:29 AM »
EnterScript:
Msgbox, 48, Ah-HA, Congratulations! You've made it!

Replace everything below EnterScript: with menuahk.ahk contents.

ie. Delete the Msgbox, 48, Ah-HA, Congratulations! You've made it! and continue with your script.
"I will not follow where the path may lead, but I will go where there is no path, and I will leave a trail." - Muriel Strode, 1903

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,947
Re: Execute a launch menu with prior password protection
« Reply #2 on: June 17, 2012, 10:24 PM »
Let's go.
:-*

Best Regards

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,947
Re: Execute a launch menu with prior password protection
« Reply #3 on: June 17, 2012, 10:34 PM »
Worksssss Worksssss !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



Original address: https://www.donationcoder.com/forum/index.php?topic=31335.0