Help! How to send clicks or keys to the CMsgBox function

Get help with using AutoHotkey and its commands and hotkeys
Posts: 23
Joined: 21 Feb 2016, 19:31

Help! How to send clicks or keys to the CMsgBox function

27 Jul 2018, 18:31

I have used Custom MessageBox in several applications and like it.
I am trying to write a Tutorial which calls CMsgBox function and then is able to click any of the buttons on it.

The first button is named &Text. When I open the window, I can type a t or press the space bar and Button1, the Text named button is activated.
But, I have tried Send, ControlSend, ControlClick and cannot get any of them to work from another window. Doing Send, t will show the letter t on the following window.
I see CMsgBox has a loop that waits for buttons to be pressed. I've tried updating that also but to no avail.

If anyone uses this function regularly, can you try controlling it from another window and see what I'm talking about?

My CMsgBox code is simply:

AddType := CMsgBox("Add Item","Add which type of item?","*&Text|&Program|&Document|&Folder|&Link|&URL|&Batch|&Hotstring|&Cancel",,1)

I want to call this from one thread and activate any of the buttons from another window in the same program.

The original source code for Custom Messagebox is here ... m-buttons/

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], flyingDman, Google [Bot], Odlanir, tom0925 and 129 guests