Error: Duplicate hotkey

Advanced Macro Recorder/Editor.

Moderator: Pulover

SleeplessKnight
Posts: 9
Joined: 04 Dec 2021, 16:30

Error: Duplicate hotkey

Post by SleeplessKnight » 04 Dec 2021, 16:33

Hello. How do I make it so I'm allowed to use the same shortcut for 2 different macros? When trying to export to AHK, the following gives "Error: Duplicate hotkeys":

Code: Select all

[PMC Globals]|None||
[PMC Code v5.4.1]|^s||1|Window,2,Fast,0,1,Input,-1,-1,1|1|Macro1
Context=None|
Groups=Start:1
1|[MsgBox]|hello`n|1|0|MsgBox|0||||1|

[PMC Code v5.4.1]|^s||1|Window,2,Fast,0,1,Input,-1,-1,1|1|Macro2
Context=None|
Groups=Start:1
1|[MsgBox]|hii|1|0|MsgBox|0||||1|
Thing is, AHK supports multiple macros having the same shortcut, it seems only the macro creator has a problem with it.

Thanks in advance.

User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Error: Duplicate hotkey

Post by Pulover » 05 Dec 2021, 07:17

No, AHK does not support duplicate hotkeys either, unless you set directives. PMC supports directives, but not with duplicate hotkeys.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)

SleeplessKnight
Posts: 9
Joined: 04 Dec 2021, 16:30

Re: Error: Duplicate hotkey

Post by SleeplessKnight » 05 Dec 2021, 11:11

Hello. I am probably not understanding well enough, but this seems to work in AHK:

Code: Select all

b::
    msgbox, hi
return

#ifwinactive, menu

b::
    msgbox, hi2
return
so I can not make something like this in PMC ?

User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Error: Duplicate hotkey

Post by Pulover » 05 Dec 2021, 12:02

Yes, currently PMC does not support duplicate hotkeys for different directives. Might be a thing to add for a future release, but it won't work now. The alternative would be writing if statements in the macro itself.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)

Post Reply

Return to “Pulovers Macro Creator”