I am just a beginner from "AutoHotkey" community.
("AutoHotkey" is a free, open source macro-creation and automation
software utility, which allows users to automate repetitive tasks and modify
the Windows user interface.
It is driven by a custom scripting language that is aimed specifically at
providing keyboard shortcuts or hotkeys, and is intended to be backwards
compatible with the AutoIt2 language.)
Well, what I am trying to do there is simply write a script that would
allow me to create a message box or a GUI window that displays Unicode
characters (the problem is, the Unicode is not supported in "AHK")
I asked on the "AHK" forum about how I could do that and I was told that
I needed to use an "AHK" DllCall command for that. ( DllCall command in
"AHK" calls any function inside MS DLL, such as a standard Windows API
function, and uses it as if it were a part of the "AHK" script)
Later, I was told that prior to using DllCall command I should read MSDN
first and decide on which functions from DLL Library I need to use to create
a unicode GUI window. That's how I happened to arrive at this forum.
So, can you please tell me which DLL functions I need to choose so that I
could create a unicode GUI window in "AHK" using that DllCall command?
Thank you all.
I know nothing about AutoHotkey, but I know something Windows programming
and Unicode.
Possible options to create a GUI:
1. Create a window
You need a "message pump" to move the windows messages arround,
which I am not sure AutoHotkey supports
2. Create a dialog
You need a "message pump" (same as before) and Windows resources
3. Create a MessageBox
The only one that can probably be created with a simple DllCall
4. Write your own DLL that creates complex UI, expose one or two
simple APIs, and call those APIs from AutoHotkey
For case 3 you need to
- pass the numeric value for the MB_* flags you want (in Winuser.h)
- pass the string in UTF-16 encoding (not sure if AutoHotkey can do that)
- call MessageBoxW from user32.dll
Here is the doc: http://msdn.microsoft.com/en-us/library/ms645505(VS.85).aspx
But in the long run the it would be best if AutoHotkey would move to Unicode.
Not being Unicode is more and more embarrasing as time passes :-)
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
thank you for responding.
Please, tell me what this "message pump" is. Where can I get it?
> 4. Write your own DLL that creates complex UI, expose one or two
> simple APIs, and call those APIs from AutoHotkey
Please tell me what, if I wanted to to write my own DLL, I would have to
start with.
"Mihai N." wrote:
> > I am just a beginner from "AutoHotkey" community.
> ....
> Please tell me what, if I wanted to to write my own DLL, I would have to
> start with.
You should start by learning Windows programming, a long job.
If all you need is to show some UI from AutoHotkey, then it is probably
not worth the trouble :-)