![]() ![]() Here is a (working) Gui script to test it on: main := Gui("-Caption") NumPut("UInt", 1, &varMargin, 0) Error points to these rowsĭllCall("dwmapi\DwmExtendFrameIntoClientArea", "Ptr", HGui, "Ptr", varMargin) VarSetStrCapacity(&varMargin, 16) Pretty sure this is the same as above Writing AutoHotKey scripts is something I have been doing for a while, and I'm not inexperienced in v2, but it really feels like I'm missing something here.ĭllCall("dwmapi\DwmSetWindowAttribute", "Ptr", HGui, "UInt", 2, "Int*", 2, "UInt", 4)ĭllCall("dwmapi\DwmExtendFrameIntoClientArea", "Ptr", HGui, "Ptr", &varMargin) I would really appreciate if someone could convert the script for me and help me understand what I'm doing wrong. I always get this error: "Error: This value of type "VarRef" has no property named "Ptr"." I tried a v1 to v2 converter, Bing Chat, and I spent a long while trying things, and researching and comparing v1 and v2 versions of NumPut() ( v1 and v2) and VarSetCapacity ( v1)/VarSetStrCapacity ( v2) and the buffer function ( v2) (like what the converter recommended). You'll learn to install AutoHotkey and to build your own simple AHK scripts. It adds a drop shadow to the Gui whose Hwnd you enter in the function (and in Win11, it also adds rounded corners) while "-Caption" is in the options to remove the title bar. This video tutorial shows how to get started with AutoHotkey. Hi □! I'm trying to convert the below AutoHotKey v1 code to v2. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |