How to prioritize code from 2 separate script files?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
milkygirl90
Posts: 565
Joined: 10 Nov 2020, 21:22

How to prioritize code from 2 separate script files?

Post by milkygirl90 » 08 Sep 2021, 03:48

file 1 - to be prioritized in these 2 groups

Code: Select all

#If WinActive("ahk_group SaveDialogs") || WinActive("ahk_group MyBrowsers")  
::;dl::
SendInput %Drive%:\Downloads{Enter}
return
file 2 - for text expansion

Code: Select all

 ::dl::download 
I find the execution very finicky. In the save dialog, sometimes when typing ;dl, it will appear as

Code: Select all

;download
instead of

Code: Select all

c:\downloads
how do I resolve this?

User avatar
milkygirl90
Posts: 565
Joined: 10 Nov 2020, 21:22

Re: How to prioritize code from 2 separate script files?

Post by milkygirl90 » 16 Sep 2021, 02:51

Any advice please? Thank you.

Rohwedder
Posts: 7625
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: How to prioritize code from 2 separate script files?

Post by Rohwedder » 16 Sep 2021, 03:23

Hallo,
add

Code: Select all

:XB0:;dl::Return
to file 2

Just a hint:

Code: Select all

::;dl::
SendInput %Drive%:\Downloads{Enter}
return
can abbreviate to

Code: Select all

:X:;dl::SendInput %Drive%:\Downloads{Enter}

User avatar
milkygirl90
Posts: 565
Joined: 10 Nov 2020, 21:22

Re: How to prioritize code from 2 separate script files?

Post by milkygirl90 » 16 Sep 2021, 05:25

works nicely, thanks!

Post Reply

Return to “Ask for Help (v1)”