Search found 6899 matches
- 01 Dec 2019, 00:08
- Forum: Ask for Help (v2)
- Topic: function objects example
- Replies: 7
- Views: 3595
function objects example
This example isn't working on AHK v2-a107: Function Objects - Definition & Usage | AutoHotkey v2 https://lexikos.github.io/v2/docs/objects/Functor.htm#User-Defined-Examples Also, was there a reason that obj.method("foo", "bar") was changed to: %obj.method%("foo", "bar") Although shouldn't both work?...
- 30 Nov 2019, 23:46
- Forum: Ask for Help (v1)
- Topic: testing 'or' as a variable name
- Replies: 4
- Views: 689
Re: testing 'or' as a variable name
Ah, interesting!
- 30 Nov 2019, 23:28
- Forum: Ask for Help (v1)
- Topic: double (de)reference vs double-deref
- Replies: 8
- Views: 2159
double (de)reference vs double-deref
Seen here: double reference vs double-deref · Issue #298 · Lexikos/AutoHotkey_L-Docs · GitHub https://github.com/Lexikos/AutoHotkey_L-Docs/issues/298 The most common form of dynamic variable reference is called a double reference or double-deref. Shouldn't that be called a double de reference? No. A...
- 30 Nov 2019, 22:44
- Forum: Ask for Help (v1)
- Topic: testing 'or' as a variable name
- Replies: 4
- Views: 689
Re: testing 'or' as a variable name
Reserved words for AHK v2 are listed here: Concepts and Conventions | AutoHotkey v2 https://lexikos.github.io/v2/docs/Concepts.htm#names Although not here, the AHK v1 situation is somewhat different: Concepts and Conventions | AutoHotkey https://www.autohotkey.com/docs/Concepts.htm#names I feel for ...
- 30 Nov 2019, 22:26
- Forum: Ask for Help (v1)
- Topic: Using paramters in BAT to invoke AHK Topic is solved
- Replies: 5
- Views: 1056
Re: Using paramters in BAT to invoke AHK Topic is solved
When you use `n in a batch file, that is 2 characters: ` n When you use `n in an AHK script, that is 1 character: (line feed) When you use `` in an AHK script, that is 1 character: ` When you use ``n in an AHK script, that is 2 characters: ` n See this link: #EscapeChar - Syntax & Usage | AutoHotkey...
- 30 Nov 2019, 19:20
- Forum: Wish List
- Topic: function timeouts: remove '0 is the same as specifying 0.5'
- Replies: 0
- Views: 1651
function timeouts: remove '0 is the same as specifying 0.5'
There are around 8 functions with a timeout parameter, with a stipulation such as: Specifying 0 is the same as specifying 0.5. I would make 0 mean 0 in AHK v2. The reasons for this proposal: - Simplicity. - Consistency across functions with a timeout parameter. Not having to remember which treat 0 l...
- 30 Nov 2019, 14:27
- Forum: General Discussion
- Topic: Regex assistance
- Replies: 4
- Views: 2900
Re: Regex assistance
I think you just want \K , so, the info before the \K is used for searching, but not output in the result. Also, you could use [^(] instead of . , to select consecutive characters, but exclude open parentheses. before/after/after: \b\w+\((.*)\)(?=\s*=>) \b\w+\K\((.*)\)(?=\s*=>) \(([^(]*)\)(?=\s*=>)
- 30 Nov 2019, 13:00
- Forum: Ask for Help (v1)
- Topic: testing 'or' as a variable name
- Replies: 4
- Views: 689
testing 'or' as a variable name
Based on this post: « What's on your mind? » - Page 213 - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=17&t=52&p=303516#p303516 There are places here and there where AHK v1 could be improved re. error handling. (Note: although considerations have to be made re. 'breaking change...
- 30 Nov 2019, 11:32
- Forum: Ask for Help (v1)
- Topic: Is there is a way to tell if the desktop is visible?
- Replies: 1
- Views: 716
Re: Is there is a way to tell if the desktop is visible?
If the desktop is active then the active window has class Progman or WorkerW. However, that may not be sufficient. What if the desktop is the active window, but an inactive window (e.g. Notepad) is taking up most of the screen. (And as you mentioned, if the taskbar is active, there may be inactive w...
- 29 Nov 2019, 15:31
- Forum: Ask for Help (v1)
- Topic: Feeling Stupid, Need a little push in right direction
- Replies: 3
- Views: 527
Re: Feeling Stupid, Need a little push in right direction
I think you want this:
Otherwise the loop stops after the first iteration.
Code: Select all
;before:
GoSub Brush ; Picks a brush
Return
}
;after:
GoSub Brush ; Picks a brush
}
Return
- 29 Nov 2019, 15:18
- Forum: Ask for Help (v1)
- Topic: To check if file is opened in browser and then activate the corresponding tab
- Replies: 1
- Views: 418
Re: To check if file is opened in browser and then activate the corresponding tab
If the tab name is sufficient to identify the file, you could use this: Firefox/Chrome, get tab names/focus tab - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=6&t=26947 If you need the url to identify the file, you could download a plugin to copy titles/urls to the clipboard, a...
- 29 Nov 2019, 15:05
- Forum: Wish List
- Topic: We want AHK for Linux!
- Replies: 78
- Views: 61819
Re: We want AHK for Linux!
SL5 and burque505 are both great users, so I think there's just been some genuine misunderstanding. Cheers.
- 29 Nov 2019, 05:28
- Forum: Ask for Help (v1)
- Topic: AccViewer and toast notification
- Replies: 10
- Views: 3633
Re: AccViewer and toast notification
Try:
WinGet, vWinList, List, % "ahk_class Windows.UI.Core.CoreWindow ahk_exe ShellExperienceHost.exe"
And perhaps set DetectHiddenWindows on/off as desired.
WinGet, vWinList, List, % "ahk_class Windows.UI.Core.CoreWindow ahk_exe ShellExperienceHost.exe"
And perhaps set DetectHiddenWindows on/off as desired.
- 29 Nov 2019, 05:14
- Forum: Ask for Help (v1)
- Topic: static_cast<char> command for autohotkey
- Replies: 3
- Views: 848
Re: static_cast<char> command for autohotkey
When translating code from other languages to AHK, you don't have to translate line for line, AHK can often do things more simply: vText := "abc" Loop Parse, vText MsgBox, % A_LoopField " " Ord(A_LoopField) asc(substr(name,i-1,1)) That's probably about right. Note: Ord is more forwards compatible th...
- 29 Nov 2019, 01:29
- Forum: General Discussion
- Topic: Array-related terminology: values vs. elements
- Replies: 9
- Views: 4840
Re: Array-related terminology: values vs. elements
I like Christophe's answer , or rather, he hints at the right questions. In simple terms, an element is a thing. Is the key name and value, one thing, or, is the value, one thing (with the key name being largely irrelevant). I think it's better to say that the key name and value are one thing. If we...
- 29 Nov 2019, 01:03
- Forum: General Discussion
- Topic: Array-related terminology: values vs. elements
- Replies: 9
- Views: 4840
Re: Array-related terminology: values vs. elements
From reading that Stack Overflow link , it looks like 'element' may be commonly used in a specific PHP context, but that it is unusual to use 'element' in that way in other programming languages. I think of it like this (although perhaps others have a different interpretation): folder/file/file name...
- 28 Nov 2019, 20:45
- Forum: Ask for Help (v1)
- Topic: static_cast<char> command for autohotkey
- Replies: 3
- Views: 848
Re: static_cast<char> command for autohotkey
I believe that this code will do what you want, but it's always good to double-check. Some code: ;============================== ;before: a += static_cast<unsigned int>(name[i]) << 24 ;after (to unsigned 32-bit integer): a += (name[i] & 0xffffffff) << 24 ;for reference (to signed 32-bit integer): a ...
- 28 Nov 2019, 19:57
- Forum: Ask for Help (v1)
- Topic: AccViewer and toast notification
- Replies: 10
- Views: 3633
Re: AccViewer and toast notification
Perhaps this. Cheers.
Code: Select all
;before:
"ahk_id " 0x30084
;after:
"ahk_class Windows.UI.Core.CoreWindow ahk_exe ShellExperienceHost.exe"
;after (you need to change 'MyWindowTitle'):
"MyWindowTitle ahk_class Windows.UI.Core.CoreWindow ahk_exe ShellExperienceHost.exe"
- 28 Nov 2019, 14:41
- Forum: Wish List
- Topic: Execution continues after Reload command
- Replies: 13
- Views: 4926
Re: Execution continues after Reload command
@pneumatic: Interesting question.
Possibly, as a workaround, you could write some custom code at the top of script, in place of #SingleInstance force.
Possibly, as a workaround, you could write some custom code at the top of script, in place of #SingleInstance force.
- 28 Nov 2019, 10:44
- Forum: Suggestions on Documentation Improvements
- Topic: [Archived, Locked] Suggestions on documentation improvements
- Replies: 688
- Views: 288977
Re: Suggestions on documentation improvements
While working on this: GitHub: contributing to the AutoHotkey documentation - AutoHotkey Community https://autohotkey.com/boards/viewtopic.php?f=81&t=70225 I noticed some inconsistent character entities on this page: Using Numpad as Mouse - Script Example | AutoHotkey https://www.autohotkey.com/docs...