

The script doesnt stop and wait if it encounters 'PlayMacro()', also this API-Function has no return value to just attach lua actions to the PlayMacro-function. My current idea is to break that with a coroutine but iam not sure how to continue while no key-input is happening. I also want to break that macro if i hit another button while the macro is running.īUT if i loop the mouse-movement, i cannot trigger another onEvent-function because the script-pointer(?) is still stuck in my loop.

So I'm looking for a possibility in Lua to 'run a loop independent' which does not stop the execution of the rest of my script (to check if a status variable has changed). There is no function for checking if a macro is currently running to just loop and stop the lua-side. The script is running a LGHUB macro while i want to attach mouse movement to that macro while it is running.

Unfortunately the Lua-API is really restricted with debug, io and file not working (source: ) The argument should be the full path and filename and extension for the file.įor example, the argument for a file named test.doc on your desktop would be:Ĭ:\Users\\Desktop\Test.doc where is specific to your PC.I recently picked up Lua while making a macro script for my LG mouse.The Launch Application settings should appear. Click ADD ARGUMENTS. Click Launch WINWORD - it turns blue and displays an EDIT option.NOTE: You can find more information about Launch Application options under the Advanced settings section in the G HUB manual.Ĭ:\Program Files (x86)\Microsoft Office\root\Office16\WINWORD.EXE. Select a current app from the list (for example, WINWORD), or create new Launch Application options to add.Click the plus sign + next to START NOW and then select Launch Application.Under SELECT A TYPE OF MACRO YOU WANT TO CREATE, select NO REPEAT.Give the new macro a name and then press Enter.Open G HUB, and in the left pane, click the Assignments tab.NOTE: If you want to run the app without an argument, you’ll need to create a separate macro, as each launcher that has an argument associated with it is locked into that argument. This article shows you how to create a macro that launches an application and runs an argument (typically a file path) to open a file associated with the app.
