Simulated key strokes - the number of times

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links or images until they have at least 4 posts.
greatxmouse
Member
Posts: 29
Joined: Wed Jul 29, 2020 5:45 pm

Simulated key strokes - the number of times

Post by greatxmouse »

XMBC Version: 2.19.2
Windows Version: bootcamp Windows8.1
Mouse Information (brand/model): logitec M720
Relevant Computer Information (CPU, RAM etc): i7, 32G - Macbook Pro2015
Did the problem occur after an upgrade of XMBC? (If so, from what version?): no
Did the problem occur after a Windows update/upgrade? (If so, from what version?): no
How long have you used XMBC?: 5 days
What language and keyboard layout do you use in Windows?: English

Clear description of the problem - try and include as much information as possible, including what button and mappings you are having problems with (if applicable).:

Hi, I am trying to make an arrow {down} 16 times but when I simply input, they cannot be included in a line. Is there any grammar to command it?

User avatar
phil
Site Admin
Posts: 6543
Joined: Sun Apr 06, 2003 11:12 pm

Re: Simulated key strokes - the number of times

Post by phil »

Sorry what do you mean by "they can not be included in a line"?
I don't have a problem putting 16 {DOWN} tags in the simkey input field (and it works - at least in notepad!)

Regards,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

greatxmouse
Member
Posts: 29
Joined: Wed Jul 29, 2020 5:45 pm

Re: Simulated key strokes - the number of times

Post by greatxmouse »

Hi Phil,

Thanks for your quick feedback. I meant the line to write the code - please refer to the attachment
3333333.png
.
You do not have the required permissions to view the files attached to this post.

greatxmouse
Member
Posts: 29
Joined: Wed Jul 29, 2020 5:45 pm

Re: Simulated key strokes - the number of times

Post by greatxmouse »

Hi Phil,

Thanks for your quick feedback. I meant the line to write the code - please refer to the attachment.

greatxmouse
Member
Posts: 29
Joined: Wed Jul 29, 2020 5:45 pm

Re: Simulated key strokes - the number of times

Post by greatxmouse »

What I meant is when I tried to put {down} 16 times, only 9 or 10 times were only allowed. I don't know how do so in notepad...

User avatar
phil
Site Admin
Posts: 6543
Joined: Sun Apr 06, 2003 11:12 pm

Re: Simulated key strokes - the number of times

Post by phil »

I'm afraid you actually have to type {DOWN} 16 times...
{RMB}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RIGHT}

There is currently no way to add a number of repeats in the tag - not a bad idea but its not currently possible.
There is NO limit on the length of the text as far as I can remember. The above works fine for me - and by notepad, I mean I TESTED it in notepad - the cursor moved down 16 lines!
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

greatxmouse
Member
Posts: 29
Joined: Wed Jul 29, 2020 5:45 pm

Re: Simulated key strokes - the number of times

Post by greatxmouse »

Hi Phil, Appreciate your quick kind response. Please see the attachment. I don't know why but that's the maximum I can input. I don't know what deters it - I tried to enlarge the window but I couldn't...
You do not have the required permissions to view the files attached to this post.

User avatar
phil
Site Admin
Posts: 6543
Joined: Sun Apr 06, 2003 11:12 pm

Re: Simulated key strokes - the number of times

Post by phil »

The size of the window is irrelevant. The text "scrolls" off the end (actually off the start) in the text box but you can continue entering text - it may not be visible (off the start) but it is all there.

You can clearly see in YOUR screen shot that that has happened - it has accepted all the text, its just not all visible (the begining bit is not shown - but it is there). If when editing, you user the cursor keys or home/end key you will see the text - this is standard windows behaviour for text that exceeds the size of the single line text box!??!

Am I missing something obvious here?
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

greatxmouse
Member
Posts: 29
Joined: Wed Jul 29, 2020 5:45 pm

Re: Simulated key strokes - the number of times

Post by greatxmouse »

Thank you, Phil. Yes, it can be written as you describe. Thanks again for your detailed description.

Now I have another issue that is weird. The DOWN only works 4 times, not 16 times... I don't know why...

One doubt is a conflict with AHK. Can you explain the relationship bet. AHK and X-mouse?

greatxmouse
Member
Posts: 29
Joined: Wed Jul 29, 2020 5:45 pm

Re: Simulated key strokes - the number of times

Post by greatxmouse »

Thank you, Phil. Yes, it can be written as you describe. Thanks again for your detailed description.

Now I have another issue that is weird. The DOWN only works 4 times, not 16 times... I don't know why...

One doubt is a conflict with AHK. Can you explain the relationship bet. AHK and X-mouse?

User avatar
phil
Site Admin
Posts: 6543
Joined: Sun Apr 06, 2003 11:12 pm

Re: Simulated key strokes - the number of times

Post by phil »

First try it in a text editor like work/notepad.notepad++
Make lots of blank lines (>16) then put the cursor at the top and press the button - see if it moves 16 lines down in there.
If it does - then XMBC IS sending 16 down keys.

You may find that the keys are sent too quickly and thus not always recognized. You can adjust the global delay between keys in the advanced settings tab - try that and see if it helps.

XMBC uses MS's SendInput API. AHK also uses that API to send keys. But I don't think that's relevant - I doubt its any problem between AHK and XMBC. More likely th speed issue (XMBC sending too quickly).
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

greatxmouse
Member
Posts: 29
Joined: Wed Jul 29, 2020 5:45 pm

Re: Simulated key strokes - the number of times

Post by greatxmouse »

Thank you , Phil. I will try and definitely let all know here few days later. Meanwhile, how can an editor interact with XMBC and where can I set the advanced setting for the delay? Is it workable with the command {WAITMS100}?

Thanks in advance.

User avatar
phil
Site Admin
Posts: 6543
Joined: Sun Apr 06, 2003 11:12 pm

Re: Simulated key strokes - the number of times

Post by phil »

1. XMBC sends the keys to the editor and the cursor moves - nothing more than that - but it proves the keys are being sent correctly.
2. The Advanced settings tab (as I said) has an option "Delay between simulated keystrokes" where you can specify the number. This is global and applies between EVERY key sent in sim keys everywhere. Try increasing it a bit (try 10, 15, 20 etc and see if it makes any difference).
3. Yes you could put {WAITMS:100} but you would have to do it between EACH {down} and 100 is probably too much (not sure just guessing). Hence the suggestion to increase the delay globally (in advanced settings tab) slightly and see if it helps.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

greatxmouse
Member
Posts: 29
Joined: Wed Jul 29, 2020 5:45 pm

Re: Simulated key strokes - the number of times

Post by greatxmouse »

phil wrote:
Mon Aug 10, 2020 12:53 am
1. XMBC sends the keys to the editor and the cursor moves - nothing more than that - but it proves the keys are being sent correctly.
2. The Advanced settings tab (as I said) has an option "Delay between simulated keystrokes" where you can specify the number. This is global and applies between EVERY key sent in sim keys everywhere. Try increasing it a bit (try 10, 15, 20 etc and see if it makes any difference).
Hi Phil,
When you say the editor, do you mean the file xmbcs? Which file should I open in the editor?

I found out I must be doing something wrong with the chord and simulated action. I just simply put {CTRL}A{CTRL}C{CTRL}V, but the first ctrl+a only worked like when I did the 16 times down, the first {RMB} only worked. Please refer to the attachment. Please help me :cry:
You do not have the required permissions to view the files attached to this post.

User avatar
phil
Site Admin
Posts: 6543
Joined: Sun Apr 06, 2003 11:12 pm

Re: Simulated key strokes - the number of times

Post by phil »

greatxmouse wrote:
Tue Aug 11, 2020 9:11 am
Hi Phil,
When you say the editor, do you mean the file xmbcs? Which file should I open in the editor?
No I don't mean editing a file - I simply mean use NOTEPAD or similar to TEST the key sequence is working as expected.
If you tell it to press 16 down keys, then if you are in a text editor you will EASILY see the cursor move down 16 lines when you press the button. That means XMBC is working AND sending all 16 keys.

I don't know how else to say this to make it clearer!
greatxmouse wrote:
Tue Aug 11, 2020 9:11 am
I found out I must be doing something wrong with the chord and simulated action. I just simply put {CTRL}A{CTRL}C{CTRL}V, but the first ctrl+a only worked like when I did the 16 times down, the first {RMB} only worked. Please refer to the attachment. Please help me :cry:
I just tried that here - and it works - very quickly...
It selects ALL, copies to the clipboard and then pastes (replacing the selected text with the selected text) so you end up with the same content, not selected. That makes it a bit difficult to see it working but it is (for me) on a chord exactly as you typed.

So again, I'm not sure what to suggest.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

Post Reply