Hi everyone,
I've found this software to do basically everything that I need but I'm missing two things and I was not able to find the solution by myself:
First how can I assign to one key a command like ctrl + alt + i?
Second is it possible to open a specific web page using a macro? Like youtube etc.
I'm sorry for my english and thank you all in advance for the help!
Open a specific web page and assign two command on one key
-
- Posts: 13
- Joined: 03 May 2019, 01:17
Re: Open a specific web page and assign two command on one key
Hey!
For your First question,
--This presses the Windows Key
lmc_send_input(91, 0, 0)
--This Presses the R key
lmc_send_input(82, 0, 0)
--This releases the R key
lmc_send_input(82, 0, 2)
--This releases the Windows Key
lmc_send_input(91, 0, 2)
The first number in the parenthesis is the key you want to press/release, I don't know what the second number is, just keep it at 0, and the third number is either if you want to press it down(0) or release the key(2). So these lines are to make Lua Macros press Windows+R. To find what number Id is associated with each key, Open the quickstart.lua, run it and press your desired keys. The number will show up in the box below the code. The Windows key is 91.
For your second question, add this to the code above.
--This makes LuaMacros wait before executing the next line
lmc_sleep(50)
--This clears the Run Box
lmc_send_input(46, 0, 0)
lmc_send_input(46, 0, 2)
lmc_sleep(50)
--This puts what ever website you want into the run box.
lmc_send_keys("https://www.youtube.com/")
--I would recommend adding a delay before pressing enter
lmc_sleep(100)
--This presses enter
lmc_send_input(13, 0, 0)
lmc_send_input(13, 0, 2)
Hope this helps!
Brady
For your First question,
--This presses the Windows Key
lmc_send_input(91, 0, 0)
--This Presses the R key
lmc_send_input(82, 0, 0)
--This releases the R key
lmc_send_input(82, 0, 2)
--This releases the Windows Key
lmc_send_input(91, 0, 2)
The first number in the parenthesis is the key you want to press/release, I don't know what the second number is, just keep it at 0, and the third number is either if you want to press it down(0) or release the key(2). So these lines are to make Lua Macros press Windows+R. To find what number Id is associated with each key, Open the quickstart.lua, run it and press your desired keys. The number will show up in the box below the code. The Windows key is 91.
For your second question, add this to the code above.
--This makes LuaMacros wait before executing the next line
lmc_sleep(50)
--This clears the Run Box
lmc_send_input(46, 0, 0)
lmc_send_input(46, 0, 2)
lmc_sleep(50)
--This puts what ever website you want into the run box.
lmc_send_keys("https://www.youtube.com/")
--I would recommend adding a delay before pressing enter
lmc_sleep(100)
--This presses enter
lmc_send_input(13, 0, 0)
lmc_send_input(13, 0, 2)
Hope this helps!
Brady