Search found 12 matches

by nhan
08 Sep 2023, 22:27
Forum: Visual Studio Code
Topic: Quick tutorial for setting up VSCode for AHK
Replies: 16
Views: 30606

Re: Quick tutorial for setting up VSCode for AHK

Thanks boiler for the quick guide and others for suggesting useful plugins. Is there a way to make a table of contents for an AHK file in VSCode? I'm approaching 600 lines in my AHK file and it's a bit wieldy scrolling up and down. It'd be nice if I can specify an outline/table of contents that can ...
by nhan
16 Aug 2023, 14:22
Forum: Ask for Help (v2)
Topic: What is the difference between having #HotIf and if as 2 separate conditions vs. connecting them with "and"?
Replies: 3
Views: 1132

What is the difference between having #HotIf and if as 2 separate conditions vs. connecting them with "and"?

I have these 2 scripts: Script No.1 #HotIf WinActive("ahk_exe notepad.exe") if GetKeyState("ScrollLock", "T") { f:: { some action } } #HotIf Script No.2 #HotIf WinActive("ahk_exe notepad.exe") and GetKeyState("ScrollLock", "T") { f:: { some action } } #HotIf I thought that the 2 scripts below should...
by nhan
13 Aug 2023, 19:18
Forum: Ask for Help (v2)
Topic: How to send key to inactive/out-of-focus windows?
Replies: 4
Views: 513

Re: How to send key to inactive/out-of-focus windows?

Thank you! That was helpful. I wasn't able to find that post before. Looks like an unsolvable problem for beginner like me. I'll pass this then.
by nhan
13 Aug 2023, 15:55
Forum: Ask for Help (v2)
Topic: How to send key to inactive/out-of-focus windows?
Replies: 4
Views: 513

Re: How to send key to inactive/out-of-focus windows?

Hi @mikeyww, thanks for the suggestion. Sorry I took the Play/Pause key as an example, but I actually wanted other controls over the app (subtitle cycle/toggle, rewind, etc.) and this can't be done using the global multimedia keys. So I was wondering if I could send individual keys instead.
by nhan
13 Aug 2023, 14:28
Forum: Ask for Help (v2)
Topic: How to send key to inactive/out-of-focus windows?
Replies: 4
Views: 513

How to send key to inactive/out-of-focus windows?

I want to press F4 to play/pause SMplayer from any window. After searching around, I came up with the code below F4:: { ControlSend "{Space}",,"ahk_exe smplayer.exe" } which I think should do what I wanted. But pressing F4 only works when the SMPlayer window is active. what else should I do? Thank y...
by nhan
02 Aug 2023, 16:54
Forum: Ask for Help (v2)
Topic: Base mouse position to the right edge of the screen instead of left edge? Topic is solved
Replies: 4
Views: 477

Re: Base mouse position to the right edge of the screen instead of left edge? Topic is solved

Thanks a lot, Russ! That solves my first 2 questions. I only have the last question about whether the coordinates are relative to the main display in multi-monitor setup.
by nhan
02 Aug 2023, 14:24
Forum: Ask for Help (v2)
Topic: Base mouse position to the right edge of the screen instead of left edge? Topic is solved
Replies: 4
Views: 477

Base mouse position to the right edge of the screen instead of left edge? Topic is solved

My question is that the element I want to interact with is at a fixed distance to the right edge of the window. If I use the default CoordMode and MouseGetPos the coordinates of the element I want to click changes if I resize the window. Is there a way to base the mouse coordinates to the right edge...
by nhan
01 Aug 2023, 04:54
Forum: Ask for Help (v2)
Topic: How to have AHK paste text instead of typing out the text?
Replies: 2
Views: 441

Re: How to have AHK paste text instead of typing out the text?

Thanks a lot for the answer! At least now I know that it's not doable. Been scratching my head out for this.
by nhan
01 Aug 2023, 03:55
Forum: Ask for Help (v2)
Topic: How to have AHK paste text instead of typing out the text?
Replies: 2
Views: 441

How to have AHK paste text instead of typing out the text?

I have this [long text] I want to pre pend to my clipboard before pasting, so the pasted text looks like "[long text] [My clipboard]". I've read through the docs and a solution is to use A_Clipboard := "long text" " A_Clipboard . However, A_Clipboard, as said in the docs, stripped off all rich text ...
by nhan
26 Jul 2023, 06:10
Forum: Scripts and Functions (v2)
Topic: Clip() - Send and Retrieve Text using the Clipboard
Replies: 4
Views: 1975

Re: Clip() - Send and Retrieve Text using the Clipboard

Hi @berban, could you please update the examples in v1 to v2 as well? Would be helpful for me to learn how to use it. Thanks a lot!

Go to advanced search