Insert Another Item Macro?

Discussion, questions and support.
Post Reply
lehmakommionu
Posts: 34
Joined: Aug 2nd, ’14, 20:50

Post by lehmakommionu » Feb 23rd, ’17, 03:30

Hi,

Could I have a little help with Insert Another Item Macro? The only way this seems to work is if the shortcut Type is set to Send and the command has only the %INSERT_...%. How come it doesn't equal to shortcut Type set to Command and command field with Send %INSERT_...% in it so it could be used together with other commands? Am I missing something?

Also, some of the inserted items work, some of them don't, but that is already another matter.

Thanks!
User avatar
Marko
Posts: 1726
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Feb 23rd, ’17, 15:50

Insert Another Item macro is intended to work in Send mode only, the macro should be disabled in Command mode.

Could you send me an example which doesn't work for you?
User avatar
Marko
Posts: 1726
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Feb 26th, ’17, 22:18

There is a way to use "Insert Another Item" in a Command mode by using gosub command:

The alternative to
Type: Send

Code: Select all

%INSERT_kr%
is
Type: Command

Code: Select all

gosub kr
lehmakommionu
Posts: 34
Joined: Aug 2nd, ’14, 20:50

Post by lehmakommionu » Feb 27th, ’17, 01:37

Code: Select all

gosub kr
is giving me an error:
Error: Target label does not exist.
Specifically: kr
...
---> Gosub, kr
...

while

Code: Select all

gosub kr
;%INSERT_kr%
is working just fine. I guess it's interfering with something else because

Code: Select all

Gosub DOWN
works perfectly, for example. Anyways this is one little nifty trick, so I don't have to use the #include anymore. Thanks.

One unrelated question, if I may? Is there a A_ThisHotkey alternative for the Fastkeys description field so the script could use it as input?
User avatar
Marko
Posts: 1726
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Feb 27th, ’17, 12:22

ok, there is a small bug which prevents this to work in all cases. We will correct it in the next release.
lehmakommionu
Posts: 34
Joined: Aug 2nd, ’14, 20:50

Post by lehmakommionu » Feb 27th, ’17, 15:39

Good to know. Thanks, Marko!

Another issue I found regarding the gosub. I hope you don't mind posting it here and not making another topic.

The Start Menu Auto Run always executes the subroutine when saving or applying changes in FastKeys.

You can try this Auto Run Command for example:

Code: Select all

#IfWinActive ahk_class Chrome_WidgetWin_1
#Z::GoSub, TEST

TEST:
MsgBox, TEST
return
This should only trigger the TEST message if in the Chrome the Win-Z is pressed which is correct per AutoHotKey.
Post Reply