Search found 43 matches
- 21 Mar 2023, 12:16
- Forum: Ask for Help (v1)
- Topic: Why `A_ThisHotkey` is getting the `tilde hotkey` instead of the `normal hotkey`? Topic is solved
- Replies: 3
- Views: 327
Re: Why `A_ThisHotkey` is getting the `tilde hotkey` instead of the `normal hotkey`? Topic is solved
No bug. Explained: A_ThisHotkey When a hotkey is first created -- either by the Hotkey command or a double-colon label in the script -- its key name and the ordering of its modifier symbols becomes the permanent name of that hotkey, shared by all variants of the hotkey. I see. So ~a is counted as a...
- 20 Mar 2023, 09:35
- Forum: Ask for Help (v1)
- Topic: Why `A_ThisHotkey` is getting the `tilde hotkey` instead of the `normal hotkey`? Topic is solved
- Replies: 3
- Views: 327
Why `A_ThisHotkey` is getting the `tilde hotkey` instead of the `normal hotkey`? Topic is solved
Why ` A_ThisHotkey ` is getting the `tilde hotkey` instead of the `normal hotkey`? eg: #NoEnv #SingleInstance Force #Persistent ;~ #Include .\Test.ahk ;~ #Include ..\lib\System\RemoveToolTip.ahk #IfWinActive, ahk_exe ShareX.exe ~a:: i := 1 ; whatever code not important return #IfWinActive a:: ;~ dis...
- 04 Jan 2023, 14:48
- Forum: Ask for Help (v1)
- Topic: Unable to match \R when its surrounded with \s* ?
- Replies: 2
- Views: 207
Unable to match \R when its surrounded with \s* ?
## problem-given_situation I am trying to do the following regex copy_Reduced := RegExReplace(copy_M, "m`a)\s*\R\s*", " __ ") I am "expecting output with all newlines (and surrounding \s*) removed" ## problem-arise_problem The result shows it does not match anything . - (in PCRE regex101 it does wo...
- 21 Oct 2022, 03:17
- Forum: Ask for Help (v1)
- Topic: RegExMatch AHK v1/v2: DotAll: normally, it does not match newlines
- Replies: 4
- Views: 850
Re: RegExMatch AHK v1/v2: DotAll: normally, it does not match newlines
Pos will be 0 if there is no match in v2. In v2, outputvar is a match object if there is a match. By default, a dot matches any single character which is not part of a newline (`r`n) sequence, Note, `r`n , not single `n . v2 docs says the same, it is probably not updated, RegEx newline matching def...
- 31 Aug 2022, 13:12
- Forum: Ask for Help (v1)
- Topic: How can I determine whether the menu bar is currently activated by Alt key? (/ if Alt key is toggled?)
- Replies: 4
- Views: 1038
Re: How to detect if Alt key is toggled?
## Problem (Clarification) In most programs, pressing Alt activates the menu bar . You might want to determine whether the menu bar is active Yes, I meant to say: " activates the menu bar "; not "any real toggle " of alt (-- it just behaves similar to a toggle state (I couldnt find the right term t...
- 29 Aug 2022, 17:34
- Forum: Ask for Help (v1)
- Topic: How can I determine whether the menu bar is currently activated by Alt key? (/ if Alt key is toggled?)
- Replies: 4
- Views: 1038
How can I determine whether the menu bar is currently activated by Alt key? (/ if Alt key is toggled?)
In most of the software, If you press alt , its now in a toggled ON state . If you press alt again, its now in a toggled OFF state . How can I detect that in AHK? <see Update 20220901 [How can I determine whether the menu bar is currently activated by Alt key?]> --- note: ie: I want something analo...
- 10 Jul 2022, 17:25
- Forum: Ask for Help (v1)
- Topic: How to force trigger an hotkey with $ or #Usehook (thats in a different ahk file) Topic is solved
- Replies: 6
- Views: 905
Re: How to force trigger an hotkey with $ or #Usehook (thats in a different ahk file) Topic is solved
SendLevel is the solution! Thanks for the reply.
Following code works::
Following code works::
Code: Select all
; in file AA
r::
SendLevel, 1 ; 1 is normally sufficient, as #InputLevel defaults to 0
SendInput, ^i
return
; in file BB
$^i:: ToolTip, AAA
- 10 Jul 2022, 15:15
- Forum: Ask for Help (v1)
- Topic: How to force trigger an hotkey with $ or #Usehook (thats in a different ahk file) Topic is solved
- Replies: 6
- Views: 905
Re: How to force trigger an hotkey with $ or #Usehook Topic is solved
You can #Include the other file. That makes your script act as if the other script is contained within it. ^r::Gosub, $^i #Include %A_ScriptDir%\bb.ahk Thats true... But I dont really want to do that... It introduces entangle between the files. I rather that BB.ahk is running independent of AA.ahk....
- 09 Jul 2022, 12:48
- Forum: Ask for Help (v1)
- Topic: How to force trigger an hotkey with $ or #Usehook (thats in a different ahk file) Topic is solved
- Replies: 6
- Views: 905
Re: How to force trigger an hotkey with $ or #Usehook Topic is solved
:arrow: Gosub can call any labeled subroutine. Example Yeah, I did saw that in AHK documentation One workaround is to use Gosub to jump directly to the hotkey's subroutine. For example: Gosub #LButton. But the problem is, ^i is in a different .ahk file BB . I dont think ^r in file AA can gosub to a...
- 09 Jul 2022, 11:50
- Forum: Ask for Help (v1)
- Topic: How to force trigger an hotkey with $ or #Usehook (thats in a different ahk file) Topic is solved
- Replies: 6
- Views: 905
How to force trigger an hotkey with $ or #Usehook (thats in a different ahk file) Topic is solved
For example, ; in file AA ^r:: SendInput, ^i return ; in file BB (another lib) $^i:: ToolTip, % "AAA" return ^r will not be able to trigger ^i in this case. What if I do want to force trigger ^i with ^r ? When Im not able to modify file BB (say, file BB is from another person's lib. I know this way ...
- 09 Jul 2022, 11:11
- Forum: Ask for Help (v1)
- Topic: How to SendInput or paste without moving the caret (insertion point)?
- Replies: 1
- Views: 511
Re: How to SendInput or paste without moving the caret (insertion point)?
### lintalist I found a nice solution (workaround) by `lintalist` Just fyi my program Lintalist has a "plugin" which allows you to set the cursor position after pasting and you can use Selected or Clipboard text (an a variety of other plugins) https://autohotkey.com/boards/viewtopic.php?f=6&t=3378 S...
- 22 Apr 2022, 02:59
- Forum: Ask for Help (v1)
- Topic: How to make only part of the window partially transparent? [WinSet]
- Replies: 4
- Views: 487
Re: How to make only part of the window partially transparent? [WinSet]
Using 'WinSet, Transparent' beforehand/afterwards? Em, I am not sure what you mean. Do you mean somehow combine Transparent & Region ? Are you able to provide an example with codes? Say, I want to set: the upper part of the window to alpha = 175 , the lower part to be alpha = 135 . The work around ...
- 22 Apr 2022, 00:43
- Forum: Ask for Help (v1)
- Topic: How to make only part of the window partially transparent? [WinSet]
- Replies: 4
- Views: 487
Re: How to make only part of the window transparent? [WinSet]
https://www.autohotkey.com/docs/commands/WinSet.htm#ExRegion I know this Region command, (I am using this only as a temporary solution) but it makes the window (the part outside the Region) totally invisible -- ie: alpah = 0 ; But how can I make that part only partially transparent -- ie: alpah = 1...
- 17 Apr 2022, 12:28
- Forum: Ask for Help (v1)
- Topic: How to make only part of the window partially transparent? [WinSet]
- Replies: 4
- Views: 487
How to make only part of the window partially transparent? [WinSet]
I know I can use the command WinSet, Transparent, 175, A to make the window transparent.
But it makes the whole window transparent.
How can I make only part of the window transparent?
eg: Make only the upper part transparent, while the lower part is not.
But it makes the whole window transparent.
How can I make only part of the window transparent?
eg: Make only the upper part transparent, while the lower part is not.
- 15 Nov 2021, 20:54
- Forum: Ask for Help (v1)
- Topic: The function in OnClipboardChange gets executed twice when taking screenshot with ShareX Topic is solved
- Replies: 7
- Views: 1268
Re: The function in OnClipboardChange gets executed twice when taking screenshot with ShareX Topic is solved
#Persistent OnClipboardChange("ClipChange") ClipChange() { hwnd := DllCall("GetClipboardOwner", "ptr") DetectHiddenWindows On WinGet name, ProcessName, ahk_id %hwnd% ToolTip Clipboard changed by %name% } Base on lexikos code, here is what I wrote, I test it simply, its working. (But I may just live...
- 15 Nov 2021, 20:44
- Forum: Ask for Help (v1)
- Topic: The function in OnClipboardChange gets executed twice when taking screenshot with ShareX Topic is solved
- Replies: 7
- Views: 1268
Re: The function in OnClipboardChange gets executed twice when taking screenshot with ShareX Topic is solved
Try checking the Type parameter that is sent to the function when ShareX changes the clipboard each time. Perhaps one time it is 0 because it first clears it and the next it is 2 because it then loads it with the captured image. I don't think it is 0 in the first time. But check Type can be helpful.
- 12 Nov 2021, 18:50
- Forum: Ask for Help (v1)
- Topic: The function in OnClipboardChange gets executed twice when taking screenshot with ShareX Topic is solved
- Replies: 7
- Views: 1268
Re: The function in OnClipboardChange gets executed twice when taking screenshot with ShareX Topic is solved
If the Send command is somehow triggering a clipboard change when used with ShareX, try unregistering it before the Send: This does not fix the issue. Because "the Send command" does not "triggering a clipboard change". I think the problem is like what lexikos says: every time ShareX took a screens...
- 11 Nov 2021, 01:29
- Forum: Ask for Help (v1)
- Topic: Explain the AddRemove parameter in OnClipboardChange? Topic is solved
- Replies: 7
- Views: 807
Explain the AddRemove parameter in OnClipboardChange? Topic is solved
Problem: Explain the AddRemove parameter in OnClipboardChange? What does it mean by Call the function after any previously registered functions ? What are previously registered functions ? Quote: OnClipboardChange(Func , AddRemove) AddRemove If blank or omitted, it defaults to 1 (call the function ...
- 11 Nov 2021, 01:16
- Forum: Ask for Help (v1)
- Topic: The function in OnClipboardChange gets executed twice when taking screenshot with ShareX Topic is solved
- Replies: 7
- Views: 1268
The function in OnClipboardChange gets executed twice when taking screenshot with ShareX Topic is solved
[Moderator's note: Topic moved from Bug Reports.] Problem: The function in OnClipboardChange gets executed twice when taking screenshot with ShareX (Though, this may not be a bug of AHK, but a bug of ShareX?) Procedure: 1. execute the following script 2. take a screenshot with ShareX 3. the functio...
- 06 May 2021, 00:46
- Forum: Ask for Help (v1)
- Topic: How to disable a hotkey of a background software?
- Replies: 4
- Views: 358
Re: How to disable a hotkey of a background software?
ControlSend does not allow you to hold down a key. I cannot think of other ways.