Search found 122 matches
- 22 Apr 2020, 13:38
- Forum: AutoHotkey v2 Help
- Topic: Any text editors with AHK v2 syntax highlighting?
- Replies: 5
- Views: 1663
Any text editors with AHK v2 syntax highlighting?
Like the title says, just wondering if anything's available ATM, cheers
- 22 Apr 2020, 10:25
- Forum: AutoHotkey v2 Help
- Topic: (v2) Encapsulate whole GUI and event handlers inside class?
- Replies: 3
- Views: 670
Re: (v2) Encapsulate whole GUI and event handlers inside class?
Guis := [CustomGui.New(), CustomGui.New()] class CustomGui { __New() { Gui := GuiCreate('', '', this) (this.EditCtrl := Gui.Add('Edit', 'w100 h100')).OnEvent('Change', 'EditCtrl_Change') this.TextCtrl := Gui.Add('Text', 'yp w100 h100') Gui.Add('Button', 'xm', 'Clear').OnEvent('Click', 'ClearBtn_Cli...
- 22 Apr 2020, 06:18
- Forum: AutoHotkey v2 Help
- Topic: (v2) Encapsulate whole GUI and event handlers inside class?
- Replies: 3
- Views: 670
(v2) Encapsulate whole GUI and event handlers inside class?
I've been wanting to write a script with multiple GUIs each having similar controls. For example, all GUIs will have an OK button and a Cancel button. My usual way of tackling this would be to give each control a unique global associated variable but the code was difficult to maintain and reuse, so ...
- 12 Apr 2020, 11:05
- Forum: Ask For Help
- Topic: Operators "/=" and "/" giving different results?
- Replies: 2
- Views: 206
Operators "/=" and "/" giving different results?
Hi guys, I'm a bit confused, here are two bits of code, both divide 1 by 10 and assign it to a variable, but the first one gives the wrong value, why?
Thanks 
Code: Select all
MyVar := 1
MyVar /= 10
MsgBox %MyVar% ;Displays 0
MyVar := 1
MyVar := MyVar / 10
MsgBox %MyVar% ;Displays 0.100000

- 25 Sep 2019, 05:42
- Forum: Ask For Help
- Topic: Cannot launch Chrome from script?
- Replies: 4
- Views: 695
Re: Cannot launch Chrome from script?
After a system restart, everything's back to normal. Typical
Thanks guys for your time!

- 24 Sep 2019, 09:18
- Forum: Ask For Help
- Topic: Cannot launch Chrome from script?
- Replies: 4
- Views: 695
Re: Cannot launch Chrome from script?
Thanks for taking the time to check. That's strange, I'll try on a virtual machine later.
- 24 Sep 2019, 02:38
- Forum: Ask For Help
- Topic: Cannot launch Chrome from script?
- Replies: 4
- Views: 695
Cannot launch Chrome from script?
I recently updated Chrome and suddenly I'm unable to Run, Chrome.exe from within my script. This works with the version I was using before the update. Here's the code that's not working: Target = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" Run, %Target% Nothing happens. Chrome does...
- 02 Apr 2019, 07:06
- Forum: Scripts and Functions
- Topic: HotVoice - Speech Recognition + Volume detection for AHK (C# DLL)
- Replies: 110
- Views: 28897
Re: HotVoice - Speech Recognition + Volume detection for AHK (C# DLL)
Cool thanks guys, I will after work
- 01 Apr 2019, 23:16
- Forum: Scripts and Functions
- Topic: HotVoice - Speech Recognition + Volume detection for AHK (C# DLL)
- Replies: 110
- Views: 28897
Re: HotVoice - Speech Recognition + Volume detection for AHK (C# DLL)
Just stumbled upon this and downloaded the repo, however it seems the file hotvoice.dll is missing from lib dir, script throws error message saying "unable to find lib\hotvoice.dll, exiting..."
- 24 Feb 2019, 20:35
- Forum: Ask For Help
- Topic: Function cannot return ClipboardAll
- Replies: 8
- Views: 2091
Re: Function cannot return ClipboardAll
Well yeah assigning ClipboardAll ro another variable and writing it to a file using FileAppend is all you can do with it. Having ClipboardAll and Clipboard as a variable in the first place was a mistake imo. Yeah, I would have preferred two functions, something like ClipboardGet(Mode:=0) and Clipbo...
- 23 Feb 2019, 21:05
- Forum: Ask For Help
- Topic: Function cannot return ClipboardAll
- Replies: 8
- Views: 2091
- 21 Feb 2019, 22:01
- Forum: Ask For Help
- Topic: Function cannot return ClipboardAll
- Replies: 8
- Views: 2091
- 21 Feb 2019, 09:34
- Forum: Ask For Help
- Topic: Function cannot return ClipboardAll
- Replies: 8
- Views: 2091
Function cannot return ClipboardAll
[Moderator's note: Topic moved from Bug Reports.] Hi, just bumped into the following problem: !v:: Clipboard := ;Clear clipboard Clipboard := MyFunc() ;MyFunc() returns "hello world", write this string to clipboard SendInput, ^v ;Paste clipboard contents (should paste "hello world") Return MyFunc()...
- 21 Feb 2019, 08:24
- Forum: Ask For Help
- Topic: Clipboard working but ClipboardAll not working?
- Replies: 5
- Views: 1038
Re: Clipboard working but ClipboardAll not working?
I'm not sure whether this can be called a bug. The ability to pass a ClipboardAll variable to y function by value was added with AHK v1.0.46. In theory the data in ClipboardAll is no different from the data any regular variable is able to store. If this works: MyVar := ClipboardAll it kind of beats...
- 21 Feb 2019, 06:22
- Forum: Ask For Help
- Topic: Clipboard working but ClipboardAll not working?
- Replies: 5
- Views: 1038
Re: Clipboard working but ClipboardAll not working?
Yeah, that does. I was just about to say that, if I put this code inside a function, it works fine, as long as the clipboard is written to inside the body of the function. I'll use this for the time being. Do you reckon it's a bug? Thanks
- 21 Feb 2019, 06:16
- Forum: Ask For Help
- Topic: Clipboard working but ClipboardAll not working?
- Replies: 5
- Views: 1038
Re: Clipboard working but ClipboardAll not working?
Further digging, there's something odd going on with functions returning (or rather, NOT returning) a value originating from ClipboardAll. Look at the following code which works: !v:: Clipboard := ;Clear clipboard Clipboard := MyFunc() ;MyFunc() returns "hello world", write this string to clipboard ...
- 21 Feb 2019, 04:06
- Forum: Ask For Help
- Topic: Clipboard working but ClipboardAll not working?
- Replies: 5
- Views: 1038
Clipboard working but ClipboardAll not working?
Hi, I'm working on a hotkey that swaps the current clipboard with the prior one. This is handy for swapping words in a text with two clicks, for example, to swap the words "hello" and "autohotkey" in the following string: "hello world autohotkey" >> "autohotkey world hello". Here is my script, but f...
- 29 Jan 2019, 05:35
- Forum: Bug Reports
- Topic: Buggy Help (chm) file of AHK 1.1.30
- Replies: 22
- Views: 6213
Re: Buggy Help (chm) file of AHK 1.1.30
I have also encountered a problem with the new help file: the Ctrl+F text search box misses characters when typing very fast, so for example if I type "hidden" only "hiddn" or "hidde" is registered. Has anyone else noticed this? No, I couldn't reproduce this issue (tested on Win10/IE11 and WinXP/IE...
- 28 Jan 2019, 19:46
- Forum: Ask For Help
- Topic: GetKeyState("Insert", "T") returning wrong toggle state
- Replies: 2
- Views: 972
Re: GetKeyState("Insert", "T") returning wrong toggle state
Thanks swagfag. Was just googling this and this came up: I note that the Insert key, unlike Caps-Lock and Num-Lock, does not have a systemwide state, and it varies per-application or even per-control. I believe (though am uncertain) that maintaining the state of the Insert key is your responsibility...
- 28 Jan 2019, 19:13
- Forum: Bug Reports
- Topic: Buggy Help (chm) file of AHK 1.1.30
- Replies: 22
- Views: 6213
Re: Buggy Help (chm) file of AHK 1.1.30
I like the new help UI but there's one thing which was definitely better in the old help. First, a bit of background. I have configured my new help file to select the Index tab when it starts ( Gear icon > Selected Tab = Index ). In the old help there was no such setting—it would simply remember the...