Windows Data Types for AHK
Translated MSDN Types for DllCall's in AutoHotkey
Source
AutoHotkey_MSDN_Types (GitHub)
Features
- Offline Version: Pro (Faster than the online version) | Con (Must be updated manually)
- Online Version: Pro (Downloaded every time the latest translation) | Con (Slower than the offline version)
Screenshots
- After starting
- After search something (like LP...)
Info
- Version: v0.2
- URL AHK Thread
Changelog
- 0.2 | Small fixes
- 0.1 | First Release
Contributing
- special thanks to just me
- thanks to AutoHotkey Community
Copyright and License
Unlicense
References and useful links
- Header Annotations
- Windows Data Types
- Data Type Ranges
- Large Integers
- Windows Coding Conventions
- What Is a Window?
- Structure Alignment
Programming Guide for 64-bit Windows
- The New Data Types
- Rules for Using Pointers
Please report any kind of bugs (Script, Gui or Type translation)
Windows Data Types for AHK
Windows Data Types for AHK
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
Re: Windows Data Types for AHK
Nice tyvm
Re: Windows Data Types for AHK
Extremely useful! Thankyou!
May I make a suggestion?
How about a checkbox or something to control matching behavior?
For example, if you type UINT, it shows PUINT etc.
A checkbox to state that the match much start with what you typed would enable you to find the correct datatype quicker, and may also speed up searches.
[Edit]
Also, could you maybe have it ignore trailing spaces?
If you double click a definition on MSDN and copy / paste, you end up with trailing spaces.
For example, on this page, if I double click the word UINT and CTRL+C, you get UINT plus 15 spaces afterwards.
[Yet another Edit]
Also, how about a hotkey, that when you hit it, it copies the selected text and puts it in the search box?
May I make a suggestion?
How about a checkbox or something to control matching behavior?
For example, if you type UINT, it shows PUINT etc.
A checkbox to state that the match much start with what you typed would enable you to find the correct datatype quicker, and may also speed up searches.
[Edit]
Also, could you maybe have it ignore trailing spaces?
If you double click a definition on MSDN and copy / paste, you end up with trailing spaces.
For example, on this page, if I double click the word UINT and CTRL+C, you get UINT plus 15 spaces afterwards.
[Yet another Edit]
Also, how about a hotkey, that when you hit it, it copies the selected text and puts it in the search box?
Re: Windows Data Types for AHK
@evilC
Your suggestion is exactly what I needed too.
I made these changes:
Source: https://gist.github.com/tmplinshi/cedaf22f1de666539886
Your suggestion is exactly what I needed too.
I made these changes:
Code: Select all
Added:
- "Contains" checkbox.
- Double-click cell to copy text.
- Auto select text in edit box when focused.
- "Always On Top" checkbox.
Modified:
- Trim keyword, etc...
Re: Windows Data Types for AHK
jnizm has already added my suggestion to his code - I tested a beta version for him with this and some other enhancements in it.
Has he not released it yet?
Has he not released it yet?
Re: Windows Data Types for AHK
Seems not.
Re: Windows Data Types for AHK
The version I tested was
https://dl.dropboxusercontent.com/u/406 ... _Types.ahk
He also added some hotkeys to copy what was selected and strip spaces - if you double-click a datatype column in an MSDN definition , you select the whole space-padded column.
I think he was also working on a hotkey such that if you hit it, it pasted the best (ie shortest match) answer straight into your text editor - so you don't even have to have the app visible to use it.
https://dl.dropboxusercontent.com/u/406 ... _Types.ahk
He also added some hotkeys to copy what was selected and strip spaces - if you double-click a datatype column in an MSDN definition , you select the whole space-padded column.
I think he was also working on a hotkey such that if you hit it, it pasted the best (ie shortest match) answer straight into your text editor - so you don't even have to have the app visible to use it.
Re: Windows Data Types for AHK
Thanks. Good idea to use hotkey.
Re: Windows Data Types for AHK
I just found this. Late to the game as usual. Looks useful. Thanks.
Re: Windows Data Types for AHK
Added References and useful links.
If you got more, let me know and I will add them.
If you got more, let me know and I will add them.
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
Re: Windows Data Types for AHK
damn, how do i find out about this only just now. this should be linked to from the docs or something.
anyway, what are the alternatives for? whats the upshot of just using the AHK Type all the time, everywhere?
anyway, what are the alternatives for? whats the upshot of just using the AHK Type all the time, everywhere?
Re: Windows Data Types for AHK
- Hello swagfag, I'm unsure what you're asking. I find this kind of info useful for translating the hundreds of types listed on MSDN for Winapi functions and structs, and converting them to the AHK type for use with DllCall and structs. You can also get size/sign info via Visual Studio.
- HotKeyIt keeps a very good list of parameter information, and here are 2 other links where I check and use that list. Cheers.
WinApi
https://hotkeyit.github.io/v2/docs/commands/WinApi.htm
C++: DllCall: get parameter types/sizes - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 23&t=39426
DllCall converter/cleaner (e.g. x32 to x64/x32 two-way compatible) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=31365
- HotKeyIt keeps a very good list of parameter information, and here are 2 other links where I check and use that list. Cheers.
WinApi
https://hotkeyit.github.io/v2/docs/commands/WinApi.htm
C++: DllCall: get parameter types/sizes - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 23&t=39426
DllCall converter/cleaner (e.g. x32 to x64/x32 two-way compatible) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=31365
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Windows Data Types for AHK
Ex, LPSTR can be Ptr or alternatively Str, as per this list. So does it make any difference if one were to use the first type, Ptr, all the time everywhere?
Re: Windows Data Types for AHK
- You can use Ptr,&var or Str,var, they're generally interchangeable.
- IIRC Str has the advantage of resolving the data to a string for you, otherwise you might need to use VarSetCapacity(var, -1).
- In some situations you need to be careful that a parameter can be both written to and read from, I can't remember if this affects Ptr/Str.
- Maybe there are times when the string could have multiple null characters in it, so you'd have to use Ptr.
- Also, using AStr or WStr can be more convenient than StrPut and Ptr.
- IIRC Str has the advantage of resolving the data to a string for you, otherwise you might need to use VarSetCapacity(var, -1).
- In some situations you need to be careful that a parameter can be both written to and read from, I can't remember if this affects Ptr/Str.
- Maybe there are times when the string could have multiple null characters in it, so you'd have to use Ptr.
- Also, using AStr or WStr can be more convenient than StrPut and Ptr.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Re: Windows Data Types for AHK
Nice script .
Cheers.
Assuming the list is correct, you can always use the first and second type, as long as you pass an argument which matches the type. You can read about the types in dllcall -> Types of Arguments and Return Values.So does it make any difference if one were to use the first type, Ptr, all the time everywhere?
Cheers.
Re: Windows Data Types for AHK
Thanks! If possible, can this list be included in the help file for DllCall? It would make translation of Windows API calls much easier for everyone.
Re: Windows Data Types for AHK
Every time I use the script (offline version), the listview loading time really bugs me.. So I took a look at the script again, and found the reason.
Disable ListView redrawing can helps too.
LV_ModifyCol(1, "Sort") should be outside the Loop.loop, parse, MSDN_TYPES, `n, `r
{
MSDN_TYPES_ARR := StrSplit(A_LoopField, ",")
LV_Add("", MSDN_TYPES_ARR[1], MSDN_TYPES_ARR[2], MSDN_TYPES_ARR[3], MSDN_TYPES_ARR[4]), LV_ModifyCol(1, "Sort")
}
Disable ListView redrawing can helps too.
Code: Select all
GuiControl, -Redraw, LVData
[ Adding a lot of data to ListView.. ]
GuiControl, +Redraw, LVData
Re: Windows Data Types for AHK
Nice, both tweaks improve a bit the online version too.
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: Chunjee and 100 guests