Search found 315 matches

by blad4
14 Apr 2024, 13:06
Forum: Ask for Help (v1)
Topic: Storing PID of a window
Replies: 12
Views: 223

Re: Storing PID of a window

Jesus Christ! How did you do that so quick? The script looks insane! pseudo-code One thing I'm still not understanding: even if you have the PID, how are you going to know which window you're activating, since (1) "all of these applications have the same WinTitle" and (2) "I may open/close programs,...
by blad4
14 Apr 2024, 09:09
Forum: Ask for Help (v1)
Topic: Storing PID of a window
Replies: 12
Views: 223

Re: Storing PID of a window

Thanks very much, that seems to be getting closer. This should be simpler, pseudo-code: 1:: - checks if there is a window in the taskbar, in the firstmost location - retrieves the PID of said window - stores the PID to a variable called 'pid1' 2:: - checks if there is a window in the taskbar, in the...
by blad4
13 Apr 2024, 16:11
Forum: Ask for Help (v1)
Topic: Storing PID of a window
Replies: 12
Views: 223

Re: Storing PID of a window

Hi thank you. Maybe I am not explaining myself adequately, and your replies are certainly helping me. The taskbar placement is the only distinguishable factor for me, since I may open/close programs, pin/unpin and move them around on the taskbar. This is why my desire is to find a link between #N an...
by blad4
13 Apr 2024, 14:25
Forum: Ask for Help (v1)
Topic: Storing PID of a window
Replies: 12
Views: 223

Re: Storing PID of a window

Thanks guys, but how do I connect WinTitle, WinText, ExcludeTitle or ExclusdeTest to the order of the applications in the taskbar? I can adapt this when I input WinTitle, for example, but all of these applications have the same WinTitle.. WinGet, OutputVar, PID , [WinTitle, WinText, ExcludeTitle, Ex...
by blad4
13 Apr 2024, 13:21
Forum: Ask for Help (v1)
Topic: Storing PID of a window
Replies: 12
Views: 223

Storing PID of a window

Currently I use "#1", "#2" etc activate specific windows which are open

Is there a way to store the PID of each window as a variable? I cannot find any old topics on the matter, it would be pretty cool
by blad4
10 Apr 2024, 12:59
Forum: Ask for Help (v1)
Topic: ControlSend to winList
Replies: 1
Views: 50

ControlSend to winList

Hi, I can't for the life of me get this working: WinGet, winList, List, ahk_class Afx:0000000140000000:0:0000000000010005:0000000000000000:0000000000000000 Loop % winList Controlsend,, {down}, % "ahk_id " winList%a_index% Despite this working absolutely fine: WinGet, winList, List, ahk_class Afx:000...
by blad4
08 Apr 2024, 05:06
Forum: Ask for Help (v1)
Topic: Checking WinActive in terms of #x
Replies: 2
Views: 80

Re: Checking WinActive in terms of #x

Thanks rohwedder. I already use controlsend, to send the commands to all the same windows at the same time. This thread is about emulting the 'Win+num' function to bring applications pinned on the taskbar to the front, as explained here https://answers.microsoft.com/en-us/windows/forum/all/windows-1...
by blad4
07 Apr 2024, 14:12
Forum: Ask for Help (v1)
Topic: Checking WinActive in terms of #x
Replies: 2
Views: 80

Checking WinActive in terms of #x

The coding noob that I am, I wonder if anyone could shed light on what it would take to perform the below code after recognising what window is currently active? This would end up with a toggle of: "If Window 1 is active, activate Windows 2 and 4 If Window 2 is active, activate Windows 1 and 3" winx...
by blad4
13 Mar 2024, 11:11
Forum: Ask for Help (v1)
Topic: Trying to determine if number is divisible Topic is solved
Replies: 11
Views: 1372

Re: Trying to determine if number is divisible Topic is solved

Rohwedder wrote:
13 Mar 2024, 03:12
Hallo,
perhaps?:

Code: Select all

A=10
RButton::
++A := Mod(A,10)
ToolTip,% A
WinMenuSelectItem, Program, , CW, %A%&
Return
Thank you rohwedder, can I ask what the '++A' does, or where the doc is for that?
by blad4
12 Mar 2024, 17:40
Forum: Ask for Help (v1)
Topic: Trying to determine if number is divisible Topic is solved
Replies: 11
Views: 1372

Re: Trying to determine if number is divisible Topic is solved

This is crude but what I've used inputbox, number, please input number, input number dividend := number / 5 If dividend contains 000000 ;since division in autohotkey creates a 6 decimal place float { Msgbox digit } Else { msgbox no digit } [Mod edit: [code][/code] tags added.] Thank you sky00, I ne...
by blad4
16 Feb 2024, 16:29
Forum: Ask for Help (v1)
Topic: Can't get my head round a simple thing Topic is solved
Replies: 7
Views: 166

Re: Can't get my head round a simple thing Topic is solved

No no, thank you!

I do not even know what the ' // ' does? Can you let me know and I'll look up in the docs?
by blad4
16 Feb 2024, 10:22
Forum: Ask for Help (v1)
Topic: Can't get my head round a simple thing Topic is solved
Replies: 7
Views: 166

Re: Can't get my head round a simple thing Topic is solved

Thank you, it works such as

Code: Select all

MsgBox % f(A)
 
f(x) {
 Return (x - 1) // 18 * 18 + 9
}
So what was the integer 35 representing sorry?
by blad4
16 Feb 2024, 09:51
Forum: Ask for Help (v1)
Topic: Can't get my head round a simple thing Topic is solved
Replies: 7
Views: 166

Re: Can't get my head round a simple thing Topic is solved

Thanks very much, however it just continually yields '45' for me?
by blad4
15 Feb 2024, 16:19
Forum: Ask for Help (v1)
Topic: Can't get my head round a simple thing Topic is solved
Replies: 7
Views: 166

Can't get my head round a simple thing Topic is solved

Hi guys, I once had a solution to this using Floor(), and thought it so easy. Now I can't for the life of me remember it! Or, am I just going crazy? I swear this pattern is easy to simplify? Please help my aging brain! if( A>=1 && A<=32) { A=13 gosub sendA return } if( A>=33 && A<=64) { A=45 gosub s...
by blad4
31 Dec 2023, 19:50
Forum: Ask for Help (v1)
Topic: Mouse scroll acceleration script
Replies: 0
Views: 270

Mouse scroll acceleration script

Hi guys and Happy New Year. I have two questions regarding the attached code, will begin with the first: This script is designed to recognise accelerations in scroll wheel use and reflect it in modifications of variable A at +/1 at a time. What is the easiest way I can adapt this to other integers? ...
by blad4
22 Aug 2023, 04:56
Forum: Ask for Help (v1)
Topic: Tiny issue with IfWinActive
Replies: 3
Views: 311

Re: Tiny issue with IfWinActive

For one thing, your syntax is a mix between the (deprecated) IfWinActive and the preferred approach, which is to use the WinActive function with if , and it is not correct for either. If using the former, you don’t use expressions, which means you wouldn’t use parentheses or quotation marks. If the...
by blad4
22 Aug 2023, 04:52
Forum: Gaming Help (v1)
Topic: LButton separation from single click and drag Topic is solved
Replies: 11
Views: 1862

Re: LButton separation from single click and drag Topic is solved

Thanks very much Rohwedder, and yes they were good times for the economy!

Just wanted to confirm, I always think using keywait in that way waits for the button to be released?

Using it the way I proposed it does not? It calculates the time difference vs. keywait?
by blad4
21 Aug 2023, 12:59
Forum: Ask for Help (v1)
Topic: Tiny issue with IfWinActive
Replies: 3
Views: 311

Tiny issue with IfWinActive

I can't understand the logic here as to why the hotkey can't get past the first block, when 0x100056 is active? IfWinActive ("ahk_id 0x5039c") is the top of the hierarchy, I get that, but if that is not active, would it not simple read the next block? IfWinActive ("ahk_id 0x5039c") { gosub sendA Win...
by blad4
20 Aug 2023, 10:17
Forum: Gaming Help (v1)
Topic: LButton separation from single click and drag Topic is solved
Replies: 11
Views: 1862

Re: LButton separation from single click and drag Topic is solved

rohwedder, I'm trying to upgracde this script, for the following use KeyWait, LButton if (A_TimeSinceThisHotkey < 500) ;if single clicked { send xyz } else ; if LButton has been dragged, say more than 20px send normal LButton function else ; if only held>500ms send abc Could you help? I think I used...
by blad4
13 Aug 2023, 10:23
Forum: Ask for Help (v1)
Topic: Switch blocks and the morse code functionality
Replies: 1
Views: 258

Switch blocks and the morse code functionality

Hello chaps. I have the below code, working nearly correctly except the double click is not recognised unless I comment the single click part out. Any ideas on what could be the fix? I made a video to show, and the code is at the bottom https://streamable.com/svvj5n RButton:: Switch, Morse(600) { ;C...

Go to advanced search