Any way to prevent FK from executing other macros?

Discussion, questions and support.
User avatar
Oblomov
Posts: 166
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Jan 31st, ’20, 18:53

I have a command that has the following code

Code: Select all

StringReplace, Clipboard, Clipboard, `r, `r`n, All
Send, % Clipboard
Where it pastes some text with enters. However after it executes successfully, it also does some automated action I have in the 'Shortcuts' list, not really sure which one of them it is yet. Is there perhaps any way to not have the command content execute anything additionally?

Tried restarting but also don't have any additional automation software present.

1 out of 7 times this also happens with the following piece of code, where after executing, it executes some long command which really messes up my working space

Code: Select all

Send, ^{a down}{a up}
Send, ^{c down}{c up}{20}
Send, "
Clipboard= %Clipboard%
Send, ^v
Send, "{20}
Send, ^{a down}{a up}{20}
Send, ^c{Right}
User avatar
Tom
Posts: 551
Joined: Nov 24th, ’15, 23:39

Post by Tom » Jan 31st, ’20, 20:26

It is impossible to say without seeing your settings.
You can send your Settings files to our support mail with the steps to reproduce your issue and we will try to help.
User avatar
Oblomov
Posts: 166
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Feb 1st, ’20, 21:04

Tom wrote:
Jan 31st, ’20, 20:26
It is impossible to say without seeing your settings.
You can send your Settings files to our support mail with the steps to reproduce your issue and we will try to help.
Thanks, will do 👍
User avatar
Oblomov
Posts: 166
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Oct 6th, ’21, 19:00

Not sure if it's best to start a new thread, but it's essentially the same issue, so... yeah.

A lot of my commands continue to bug out and wreck havoc... it's a systematic issue, where I'm not exactly sure whether the delays alone help. For example for commands that often bug out, when I add significant delays like 'sleep 200', etc. (for example after 'Send, ^x'), they still sometimes end up bugging out, now and again...

For example this command:

Code: Select all

Sleep 25
Send, {LShift down}{Home}{LShift up}
Sleep 50
Send, ^x
Clipwait
Sleep 150
Send, {Backspace}
Sleep 25
Send, ^s

MouseMove, 1740, 21
Send, {LButton}
MouseMove, 1321, 549

;MouseMove, 715, 1065
;Send, {LButton}{400}
Send, ^t
;Send, {100}
Send, ^v
Send, {Enter}
Sleep 500
MouseGetPos, xpos, ypos

MouseMove, 1492, 162
Send, {LButton}

MouseMove, xpos, ypos
It bugs out like 1 out of 8-10 times, where I get the following Windows error, in regards to 'Speech Recognition':
https://filestore.community.support.mic ... pload=true

So yeah... I'm just wondering how I can stop this from happening, am I doing something wrong in my command creation? Do I need to have just very high delays? Would really appreciate help on this, as this has honestly been kind of driving me nuts over what has now been years...

Maybe I'm executing the commands too fast sometimes + my .fdb has become too big?
User avatar
Marko
Posts: 1398
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Oct 8th, ’21, 16:54

You need to carefully test commands like this. For example, if the destination window is not in focus you could get unwanted results.
I suggest you to test it line by line (comment other lines) to see at which point it breaks.

As said, it is maybe needed to force the window focus by using WinActivate at the beginning of the script
https://www.autohotkey.com/docs/command ... tivate.htm

Code: Select all

WinActivate, ahk_class Chrome_WidgetWin_1
or check if the window is focused before proceeding by using
https://www.autohotkey.com/docs/commands/WinActive.htm

Code: Select all

if not WinActive("ahk_class Chrome_WidgetWin_1")
   return
User avatar
Oblomov
Posts: 166
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Oct 11th, ’21, 17:04

Marko wrote:
Oct 8th, ’21, 16:54
You need to carefully test commands like this. For example, if the destination window is not in focus you could get unwanted results.
I suggest you to test it line by line (comment other lines) to see at which point it breaks.

As said, it is maybe needed to force the window focus by using WinActivate at the beginning of the script
https://www.autohotkey.com/docs/command ... tivate.htm

Code: Select all

WinActivate, ahk_class Chrome_WidgetWin_1
or check if the window is focused before proceeding by using
https://www.autohotkey.com/docs/commands/WinActive.htm

Code: Select all

if not WinActive("ahk_class Chrome_WidgetWin_1")
   return
I see... definitely going to utilize that 'if' a lot more from now on.

So if anything, I can rule out my .fdb getting rather large?
User avatar
Marko
Posts: 1398
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Oct 11th, ’21, 18:56

Large database should not be the issue. What is your FastKeys loading time?
User avatar
Oblomov
Posts: 166
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Oct 11th, ’21, 20:24

Marko wrote:
Oct 11th, ’21, 18:56
Large database should not be the issue. What is your FastKeys loading time?
That's really good to hear, and I genuinely hope it is so... since FK has really become the linchpin of pretty much all my PC usage

Through a stopwatch, I got 44 seconds from 'Apply' to the 'completion' of the magenta bar... got me a 'test' .fdb for any new commands I want to create and then move over, since otherwise it would be impossible

Loading takes about 30 seconds, e.g. if you exit, and then start FK again...

But yeah, I'd say that I've come to appreciate these little 'gaps', as it gives me an opportunity to grab some tea or do a bit of exercise or something... or look outside the window maybe
User avatar
Marko
Posts: 1398
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Oct 12th, ’21, 05:15

This is really a big file. ;)
Do you really use all the commands? Maybe consider creating another fdb settings file with only the essential commands. Use File/Save As... to create another file and then remove the commands you only rarely use. You can always open a large file (File/Open) when you would need all.
User avatar
Oblomov
Posts: 166
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Oct 12th, ’21, 17:56

Marko wrote:
Oct 12th, ’21, 05:15
This is really a big file. ;)
Do you really use all the commands? Maybe consider creating another fdb settings file with only the essential commands. Use File/Save As... to create another file and then remove the commands you only rarely use. You can always open a large file (File/Open) when you would need all.
I definitely can't say that I use all of them, all the time, but I'd say it's more period/activity dependent.
I may for example not use a certain command (or a set of commands) for a month or so, but then need it/wish that I had it later on... and thus, I usually do.
Switching between different .fdbs would thus kind of break the 'flow' for me I feel... I'll probably start noting my thoughts about this, as in by what criteria I can divide the commands, so that I won't at some point have to go through like 5 or more .fdbs, to check whether I have X command present...
On average, I also probably do like 2-10 edits on a daily basis... but luckily it's been getting 'quieter' and 'quieter' in that regard.



Overall, it has seemingly been some years now, of pretty to relatively active FK addition (I'd say I'm overall getting close to 3k commands, all in all, including the text expansions). But in my perhaps somewhat delusional mind... as long as I keep on using FK in the way that I do, that quite significant time investment, will really pay off big in the long run...

Having a strict naming convention and over 30 meta pages on FK (inside of a noting software such as OneNote), has also, certainly been very crucial, to supporting this seemingly massive 'structure'... looking back at it now, it's almost hard to not get a little teary-eyed, on the journey and the attachment that I have come to have with this software.



"Through thick and thin, FK commands beget I on a whim.
And though gradations with uncertainties, are ofttimes bit too much,
There's evidently wisdom, in this notion of a thought-out clutch."
Post Reply