topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 16, 2024, 12:30 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Execute a launch menu with prior password protection  (Read 4059 times)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Execute a launch menu with prior password protection
« on: June 16, 2012, 05: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

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,643
    • View Profile
    • Donate to Member
Re: Execute a launch menu with prior password protection
« Reply #1 on: June 16, 2012, 09:29 PM »
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.

Contro

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

Best Regards

Contro

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

http://img101.imageshack.us/img101/7251/besotene2.gif
Execute a launch menu with prior password protection
http://img101.imageshack.us/img101/7251/besotene2.gif
Execute a launch menu with prior password protection
http://img101.imageshack.us/img101/7251/besotene2.gif
Execute a launch menu with prior password protection
http://img101.imageshack.us/img101/7251/besotene2.gif
Execute a launch menu with prior password protection


http://img182.imageshack.us/img182/2968/sugarwarez276kq2.gif
Execute a launch menu with prior password protection