Search found 7 matches
- 12 Jun 2024, 17:27
- Forum: Ask for Help (v2)
- Topic: how to display the `outputdebug` text in real-time?
- Replies: 0
- Views: 53
how to display the `outputdebug` text in real-time?
Hello, I have written a script for automatic clicking in a game. I want to display the script's running status using `outputdebug` (for example, "Function A executed, now executing Function B"). The AutoHotkey Plus Plus extension in VS Code and DebugView can achieve this, but my laptop is very old, ...
- 13 May 2024, 18:52
- Forum: Ask for Help (v2)
- Topic: How to pass variables into Gui's callback function and how to terminate another function within one function? Topic is solved
- Replies: 6
- Views: 571
Re: How to pass variables into Gui's callback function and how to terminate another function within one function? Topic is solved
Thank you!boiler wrote: ↑12 May 2024, 08:10Code: Select all
#Requires AutoHotkey v2.0 MC := MyClass() MyGui := Gui() MyGui.Add('Button', 'w150 h50', 'Click me').OnEvent('Click', MC.MyMethod) MyGui.Show class MyClass { MyMethod(*) { MsgBox 'Hello' } }
I indeed did not write * in the parameter list of the method in the class.
- 12 May 2024, 06:23
- Forum: Ask for Help (v2)
- Topic: How to pass variables into Gui's callback function and how to terminate another function within one function? Topic is solved
- Replies: 6
- Views: 571
Re: How to pass variables into Gui's callback function and how to terminate another function within one function? Topic is solved
No, the EventObj wouldn’t contain just properties. It would need to contain methods (like functions in a class object), so that those could be registered to be called by your events instead of functions. I don’t see a reason why you need to consider using that approach, especially since you apparen...
- 09 May 2024, 04:51
- Forum: Ask for Help (v2)
- Topic: How to pass variables into Gui's callback function and how to terminate another function within one function? Topic is solved
- Replies: 6
- Views: 571
Re: How to pass variables into Gui's callback function and how to terminate another function within one function? Topic is solved
Example: #Requires AutoHotkey v2.0 bp := 6 MyGui := Gui() MyGui.Add('Button', 'w100 h60', 'Go').OnEvent('Click', MyFunc.Bind(bp)) MyGui.Show MyFunc(val, *) { MsgBox 'The passed value is ' val } Thank you, I solved it using BoundFunc. Are there other methods? I don’t understand "An "event sink", or ...
- 06 May 2024, 23:54
- Forum: Ask for Help (v2)
- Topic: How to pass variables into Gui's callback function and how to terminate another function within one function? Topic is solved
- Replies: 6
- Views: 571
How to pass variables into Gui's callback function and how to terminate another function within one function? Topic is solved
Hello everyone. Since I’m not a programmer, I don’t understand a lot of the content in the programming manual. Could you please teach me with simple examples? First question: How to pass variables into Gui's callback function? I do not want to redefine the variables cfgFileDir and cfgArrRB inside th...
- 08 Feb 2024, 12:18
- Forum: Ask for Help (v2)
- Topic: i wand script for double click
- Replies: 8
- Views: 778
Re: i wand script for double click
Thank you. I get itNote: A line that begins with a comma (or any other operator) is automatically appended to the line above it. See also: comma performance.
- 04 Feb 2024, 20:56
- Forum: Ask for Help (v2)
- Topic: i wand script for double click
- Replies: 8
- Views: 778
Re: i wand script for double click
#Requires AutoHotkey v2.0 #SingleInstance Force *RButton::DoubleRB.count() Class DoubleRB { static _i:=0 ,_obmProc:=ObjBindMethod(this,"_proc") static count() { ++this._i setTimer this._obmProc, -250 } static _proc() { switch (format("{1}", this._i, this._i:=0)) { default: return case 1: SendInput ...