Page 1 of 1

Insert Another Item Macro?

Posted: Feb 23rd, ’17, 03:30
by lehmakommionu
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!

Re: Insert Another Item Macro?

Posted: Feb 23rd, ’17, 15:50
by Marko
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?

Re: Insert Another Item Macro?

Posted: Feb 26th, ’17, 22:18
by Marko
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

Re: Insert Another Item Macro?

Posted: Feb 27th, ’17, 01:37
by lehmakommionu

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?

Re: Insert Another Item Macro?

Posted: Feb 27th, ’17, 12:22
by Marko
ok, there is a small bug which prevents this to work in all cases. We will correct it in the next release.

Re: Insert Another Item Macro?

Posted: Feb 27th, ’17, 15:39
by lehmakommionu
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.