I'm a complete newby with AHK (1 day experience), but OK with VBA and Delphi, so it all makes sense so far, and looks amazing. I can process keystrokes to launch and paste OK, so now I'm looking at something a bit more complex.
I want to activate a form or popup menu which will then take various actions (mostly pastes) depending on keystrokes from the user. It looks like a menu will do this, but I was looking for something a bit more controllable in terms of format, like a form with buttons. The reason for avoiding a popup menu is that there are likely to be 20-30 options.
So the idea is that I launch the form with eg Ctrl-Alt-P, then select an item either using a key or key combination or by mouse selection, which makes changes to the active form.
I would really appreciate some pointers on what might meet this need.
Gabby
Menu-like popup Topic is solved
Re: Menu-like popup Topic is solved
Controllable in terms of format would suggest a GUI for your form. You can put buttons on that. Your script can create a GUI first and not show it straight away. Add a hotkey to show the GUI, Add subroutines to do the work (e.g. pasting text). Try this:
I hope that gets you started.
Code: Select all
Gui, -Caption
Gui, Margin, 0, 0
Loop, 24
Gui, Add, Button, w80 gAction, Action #%A_Index%
Return
^!p:: Gui, Show
Action:
Gui, Hide
MsgBox, %A_GuiControl%
Return
Re: Menu-like popup
If you want more control you will need to make the GUI yourself.
You can make a new GUI with add controls with and show it with
You can make a new GUI with
Code: Select all
Gui, New [, Options, Title]
Code: Select all
Gui, Add, ControlType [, Options, Text]
Code: Select all
Gui, Show [, Options, Title]
Please excuse my spelling I am dyslexic.
Re: Menu-like popup
Thanks for the suggestions, particularly to the use of a GUI (elsewhere known as a form - who'da thunk it).
I've decided that a ListView probably meets my needs best, with a few other controls.
Gabby
I've decided that a ListView probably meets my needs best, with a few other controls.
Gabby
Who is online
Users browsing this forum: Google [Bot] and 254 guests