Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 518737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:58:04+00:00 2026-05-13T07:58:04+00:00

And how? I want to implement an simple enough dialog with several buttons.

  • 0

And how?

I want to implement an simple enough dialog with several buttons.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:58:04+00:00Added an answer on May 13, 2026 at 7:58 am

    One of the easiest ways to get some simple dialogs and a bit of associated code running in Windows is AutoHotKey. It’s free-as-in-beer, too.

    It’s a macro script environment where you can write little programs as scripts (and hook them to keys, that’s where it got its name and original purpose).

    AHK is a BASIC-like tiny scripting language that’s all about simplicity and ease of use. Good enough for most small projects you’d care to do.


    One use case/experience

    I’m not a Windows programmer at all; I used to program in Delphi a bit, but now I’m mostly working in Java. Recently my girlfriend needed a bit of hacking: She bought a product with a registration key, and part of that key was smudged off the sticker. What we needed was a program to brute-force try all the possible missing letters/numbers in the program’s registration dialog. Legitimate hacking, if you will.

    I considered doing this in Delphi, then I started thinking about which arcane system calls I’d be needing to reach into the GUI of another program and to poke text into the input dialog… it turned out to be very easy in AHK. I needed about 10 minutes to write my hacking program, and it took about 5 minutes to find the right key.

    If I remember correctly, my little program even included a dialog for specifying what we knew of the key, and which places had to be trial-and-errored. And of course a “start” button.


    Update with example

    I really wish I still had that little script I wrote as described above, but it’s been several years and I’ve thrown it away.

    I dug up this little gem on the net:

    This is a working example script that uses a timer to change the names of the buttons in a MsgBox dialog. Although the button names are changed, the IfMsgBox command still requires that the buttons be referred to by their original names.

    #SingleInstance
    SetTimer, ChangeButtonNames, 50 
    MsgBox, 4, Add or Delete, Choose a button:
    IfMsgBox, YES 
        MsgBox, You chose Add. 
    else 
        MsgBox, You chose Delete. 
    return 
    
    ChangeButtonNames: 
    IfWinNotExist, Add or Delete
        return  ; Keep waiting.
    SetTimer, ChangeButtonNames, off 
    WinActivate 
    ControlSetText, Button1, &Add 
    ControlSetText, Button2, &Delete 
    return
    

    I agree that this is a silly and useless program; I found it quite hard to find useful small examples on the ‘net. Most of the people who write AHK scripts seem to enjoy hanging bells and whistles off their creations until they end up being full-fledged applications and no longer suitable as small examples.

    A lot of useful snippets of code, though, can be found in AHK’s Tutorial and overview:

    http://www.autohotkey.com/docs/Tutorial.htm

    Much of what they talk about is hanging certain capabilities off certain keys. This is how AHK started, but meanwhile it’s a (mostly) full-fledged Windows programming language. So don’t pay too much attention to the key mapping stuff.

    Here’s a cute little script to run Notepad and then issue a message box:

    RunWait Notepad
    MsgBox The user has finished (Notepad has been closed).
    

    Here’s a small dialog to get some input from a user:

    MsgBox, 4, , Would you like to continue?
    IfMsgBox, No
        return
    ; Otherwise, the user picked yes.
    MsgBox You pressed YES.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 340k
  • Answers 340k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer .find_all() returns list of all found elements, so: input_tag =… May 14, 2026 at 4:42 am
  • Editorial Team
    Editorial Team added an answer It would probably be easier if you used a ViewBox.… May 14, 2026 at 4:42 am
  • Editorial Team
    Editorial Team added an answer This does not sound like a problem with the code.… May 14, 2026 at 4:42 am

Related Questions

Not infrequently, one wants to implement the <=> (comparison, or spaceship) operator on a
I hope this is a simple enough question for any SQL people out there...
the problem is pretty easy if you reduce it to one class. Given the
This question is meant to apply to interfaces in general, but I'll use AS3/Flex
Yes, the title doesn't make much sense, but here's my situation. I have two

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.