Problem Delay script

Announcements, questions
Post Reply
NickyG
Posts: 5
Joined: 24 Nov 2018, 13:10

Problem Delay script

Post by NickyG » 24 Nov 2018, 13:41

I'll explain my problem

In practice I should do:

1. I need to remap a second keyboard to be joined to the main one.

2. The software with which I need to use the keyboard has already preset some commands but with a function a bit anomalous. I'll explain.
in practice the CTRL + 1/2/3/4 / a / b / c / d / e commands are preassigned ...
only that as I understand it, the function is activated with a small delay say 100ms (now I'm trying to tell me from the manufacturer of the software which delay there is) ...

I basically have to press CTRL to wait for a small amount of time and press the 1/2/3 button whatever it is ...

how can I tell HIDMACROS
press the numpad1 key on the "keyboard2"
this keynumber 1 must start an example key sequence
CTRL (delay 100ms) and then press num1
so in the software the associated function will start.

I hope it is not a difficult thing to do and that I have explained myself

if you can write me the code of a single line then I will repeat all the lines I need ...

thank you very much

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Problem Delay script

Post by admin » 26 Nov 2018, 09:44

Petr Medek
LUAmacros author

NickyG
Posts: 5
Joined: 24 Nov 2018, 13:10

Re: Problem Delay script

Post by NickyG » 26 Nov 2018, 11:05

nothing I just can not make it work ...
but does the guide refer to the script for HIDMACROS.exe?
or to LUAMACROS?
Attachments
111111111111.jpg
111111111111.jpg (56.09 KiB) Viewed 6060 times

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Problem Delay script

Post by admin » 28 Nov 2018, 09:02

The guide is for luamacros as your question is in part of forum for luamacros.
In hidmacros you can't do such a thing
Petr Medek
LUAmacros author

NickyG
Posts: 5
Joined: 24 Nov 2018, 13:10

Re: Problem Delay script

Post by NickyG » 29 Nov 2018, 15:45

admin wrote:
28 Nov 2018, 09:02
The guide is for luamacros as your question is in part of forum for luamacros.
In hidmacros you can't do such a thing

Hello,
I tried to follow the guide indicated but I just can not make it work ...

could you write me the code ???

I need it like this:

(secondary keyboard setting)

lmc_device_set_name ('RadioBOSS', '1CEEC8C4')
lmc_print_devices ()

then when I press the numpad1 key
must do this macro function

CRTL (^)
delay 750
pressing the button (numpad1)

then I will answer all the keys needed ...

thank you


ps: how do I start LUAMACROS at boot minimized in the right bar (near the windows clock) ???

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Problem Delay script

Post by admin » 30 Nov 2018, 09:00

Sorry, you need some technical and scripting knowledge to use luamacros. You have all the information you need in that link.
Petr Medek
LUAmacros author

NickyG
Posts: 5
Joined: 24 Nov 2018, 13:10

Re: Problem Delay script

Post by NickyG » 30 Nov 2018, 09:35

Ok, I always hope you help me.
I managed to make the numpad1-9 keys work with this code.

1. how do I differentiate the number 1 on the numpad and the number 1 on the keys on the top left?

2. I can not then assign the keys A, B, C, D, E, F, G, H, I, ....., how should I write the code string ??
lmc_send_keys ('^ {A}');
DOES NOT WORK.

3. How can I start the script created in lumamacros when the PC is switched on? I put it in the startup folder opens but does not start, I always have to start it manually.
is it possible to start it automatically and minimized ??

------------------------------------------


lmc_device_set_name('keyboard2','1CEEC8C4')
lmc_print_devices()

lmc_set_handler('keyboard2',
function(button,direction)
if (direction == 1) then return end
if (button == 13)then

elseif (button == 97) then
lmc_send_keys('^', 700)
lmc_send_keys('^{NUM1}')

end
end
)

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Problem Delay script

Post by admin » 03 Dec 2018, 17:31

For 3) use command line parameter -r and see viewtopic.php?f=12&t=270
Petr Medek
LUAmacros author

NickyG
Posts: 5
Joined: 24 Nov 2018, 13:10

Re: Problem Delay script

Post by NickyG » 04 Dec 2018, 12:28

admin wrote:
03 Dec 2018, 17:31
For 3) use command line parameter -r and see viewtopic.php?f=12&t=270
thanks, I solved.

One thing how can I make this string of code work, I can not understand ??

lmc_get_window_title()

1. I would like to operate the commands set below only with a specific software

2. Is it possible in some way to make the keyboard and its macro commands work for a specific software regardless of whether the software is in focus or not?

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Problem Delay script

Post by admin » 05 Dec 2018, 20:43

Code: Select all

print(lmc_get_window_title())
Assign to variable, do some ifs, just scripting.

ad 1&2) no, not possible. Maybe if lua can somehow get list of running apllications (processes) you could write some logic to script. But no direct support in luamacros
Petr Medek
LUAmacros author

Post Reply