Search found 16 matches

by hoangthi
18 Mar 2024, 00:44
Forum: Scripts and Functions (v2)
Topic: simple DIY AHK obfuscation (anti-decompiler)
Replies: 0
Views: 388

simple DIY AHK obfuscation (anti-decompiler)

This DIY macro script will utilize the rename symbol feature (F2 key) in Visual Studio Code. This feature allows for the renaming of variables and functions, and it automatically changes throughout the entire file without breaking the structure. I made this script to batch-edit these symbols. The st...
by hoangthi
16 Mar 2024, 11:19
Forum: Ask for Help (v2)
Topic: how to display unicode chars returned from DllCall
Replies: 6
Views: 159

Re: how to display unicode chars returned from DllCall

I fixed the issue by attempting to convert UTF-8 to UTF-16 first in the C++ code, then compiling DLL and use this in Autohotkey v2: output := DllCall("libs\functions.dll\displayHello", "Cdecl wStr") OutputDebug("DllCall Output, now it is correct: " output) DllCall Output, now it is correct: á à ả ì ...
by hoangthi
16 Mar 2024, 10:40
Forum: Ask for Help (v2)
Topic: how to display unicode chars returned from DllCall
Replies: 6
Views: 159

Re: how to display unicode chars returned from DllCall

Try replacing Astr with Str : output := DllCall("libs\functions.dll\displayHello", "Str") I tried one by one, but none of them worked output := DllCall("libs\functions.dll\displayHello", "Astr") OutputDebug("DllCall Output: " output) Astr: DllCall Output: Unicode chars 谩 脿 岷?矛 铆 Str, WStr: ==> Inva...
by hoangthi
16 Mar 2024, 09:57
Forum: Ask for Help (v2)
Topic: how to display unicode chars returned from DllCall
Replies: 6
Views: 159

Re: how to display unicode chars returned from DllCall

From the documentation: Short answer: Save the script as UTF-8, preferably with BOM. I wished it were that simple. Unicode displayed correctly in C++, as well as in Autohotkey, but not with DllCall. I tried saving the file as UTF-8 with and without BOM, but nothing changed. output := DllCall("libs\...
by hoangthi
16 Mar 2024, 08:58
Forum: Ask for Help (v2)
Topic: how to display unicode chars returned from DllCall
Replies: 6
Views: 159

how to display unicode chars returned from DllCall

I have a very simple "hello world" example in C++, which simply returns "Unicode characters á à ả ì í". I've tested it and confirmed that it displays correctly in the compiled C++ executable file: extern "C" { __declspec(dllexport) const char *displayHello() { return "Unicode characters á à ả ì í"; ...
by hoangthi
11 Aug 2022, 07:47
Forum: Ask for Help (v2)
Topic: [V2-β7](Gui) How to bind variables to callback function inside a loop Topic is solved
Replies: 3
Views: 1003

Re: [V2-β7](Gui) How to bind variables to callback function inside a loop Topic is solved

Simple, just bind the variable to the callback function. Great! I didn't think it was that simple. I am very grateful! instead of myText.OnEvent("Click", CallBackFunc.Bind(A_Index)) I tried (wrong way) myText.OnEvent("Click", CallBackFunc(A_Index)) and also tried (wrong way) myText.OnEvent("Click",...
by hoangthi
11 Aug 2022, 04:46
Forum: Ask for Help (v2)
Topic: [V2-β7](Gui) How to bind variables to callback function inside a loop Topic is solved
Replies: 3
Views: 1003

[V2-β7](Gui) How to bind variables to callback function inside a loop Topic is solved

Hi, I've just added a couple of text fields into my GUI using a Loop function. Each text field has a OnEvent Callback function to retrieve its value whenever I click on it. The issue is, that I can't bind variables inside the Loop to the call back function. No matter what is it in the Loop, it will ...
by hoangthi
06 Aug 2022, 02:28
Forum: Ask for Help (v2)
Topic: [V2-β7] How can I retrieve the "background" option of a Progress Bar? Topic is solved
Replies: 4
Views: 1169

Re: [V2-β7] How can I retrieve the "background" option of a Progress Bar? Topic is solved

You have a couple options here IMO - you can set up a background property on the progress object itself, like so: (In this case, you'll always know what color the background is because you were the one that set the color to begin with.) More robustly, you can use SendMessage to return the control's...
by hoangthi
05 Aug 2022, 10:42
Forum: Ask for Help (v2)
Topic: [V2-β7] How can I retrieve the "background" option of a Progress Bar? Topic is solved
Replies: 4
Views: 1169

[V2-β7] How can I retrieve the "background" option of a Progress Bar? Topic is solved

Hello, I've just added a simple GUI with Progress bar which has the option BackgroundColor, and variable vProgress. myGui.Add("Progress", "x0 h33 w300 Background202124 Disabled vProgress" . ID) I can easily change the background option to another color by this command ProgressControl := myGui[Progre...
by hoangthi
03 Aug 2022, 03:41
Forum: Ask for Help (v2)
Topic: [V2-β7] Why is it so complicated to initialize an array Topic is solved
Replies: 3
Views: 1004

Re: [V2-β7] Why is it so complicated to initialize an array Topic is solved

Update: Sorry for not reading carefully, the array with text index that I wanted, is now Map()
This should work

Code: Select all

Arr := Map()

Arr["hi"] := "hello world"
Arr["bye"] := "see you later"
Arr["hay"] := "how are you?"

by hoangthi
01 Aug 2022, 02:22
Forum: Ask for Help (v2)
Topic: OnMessage MouseMove's Hwnd can't detect Text field or Progress bar Topic is solved
Replies: 3
Views: 944

Re: OnMessage MouseMove's Hwnd can't detect Text field or Progress bar Topic is solved

I don't know about the difference between versions, but for this case you could find the values you want with MouseGetPos with a flag (https://lexikos.github.io/v2/docs/commands/MouseGetPos.htm) On_WM_MOUSEMOVE(wParam, lParam, msg, Hwnd) { MouseGetPos( , , &winHwnd, &ctlHwnd, 2) Hwnd2 := (ctlHwnd ?...
by hoangthi
31 Jul 2022, 09:12
Forum: Ask for Help (v2)
Topic: OnMessage MouseMove's Hwnd can't detect Text field or Progress bar Topic is solved
Replies: 3
Views: 944

OnMessage MouseMove's Hwnd can't detect Text field or Progress bar Topic is solved

In Autohotkey Version 1, I can easily control a Textfield by using "A_GuiControl" inside "OnMessage( 0x200, "WM_MOUSEMOVE" )" This A_GuiControl will show me the variable of the Gui control at the current mouse position. In AHK V2, A_GuiControl is removed, I don't know how to control GUI when I hover...
by hoangthi
30 Jul 2022, 12:53
Forum: Ask for Help (v1)
Topic: how to change a GUI background when I hover the mouse into it Topic is solved
Replies: 2
Views: 583

Re: how to change a GUI background when I hover the mouse into it Topic is solved

Here is an approach that you could use with Gui, Color . https://www.autohotkey.com/boards/viewtopic.php?p=443412#p443412 Yeah Thanks to your hoverTrigger example and after understanding how A_GuiControl works with a GUI, I have successfully created a list of menus that change the background color ...
by hoangthi
30 Jul 2022, 02:57
Forum: Ask for Help (v1)
Topic: how to change a GUI background when I hover the mouse into it Topic is solved
Replies: 2
Views: 583

how to change a GUI background when I hover the mouse into it Topic is solved

Hello, I am making a borderless App that shows multiple selections, like the image below, image.png As I can see, I have two GUIs here, "Notepad" and "Calculator" and their links. When I hover the mouse into a Gui, how can I change its background color, for example: Thanks in advance! Here is the co...
by hoangthi
08 May 2022, 05:45
Forum: Ask for Help (v1)
Topic: Find out the difference between two strings to update new content
Replies: 5
Views: 415

Find out the difference between two strings to update new content

Hello, I am doing a small tool that reads text from a TXT file and updates it to a HTML page, using Jquery PrependTo a #DIV_ID (bottom-up update, new content at the top). I have created an Autohotkey + Chrome AHK script that gets data from some smart home sensors... and this script can communicate w...
by hoangthi
08 Oct 2020, 11:19
Forum: Ask for Help (v1)
Topic: How to draw a parabolic arch from 3 given points?
Replies: 1
Views: 159

How to draw a parabolic arch from 3 given points?

Hello everyone. I would like to auto-draw a simple parabolic arch (using pencil tool on the software MSPAINT), like the example image, from 3 given points (left mouse input), regardless of the rotation I have tried to use the GDIP library but it seems that its arc function and also the ellipse funct...

Go to advanced search