0

I was trying to run a program, or even a "txt" from my script, using os.excute, but would there be any method for me to specify the coordinates where the screen will open?

More specifically I want to open a virtual keyboard that I made in C#, but it always comes in the same position, I wanted to execute it and choose its opening position. Code:

local path_virtual_keyboard = 'C:\\Users\\Public\\Documents\\HIKeyboard.exe'
RunProgram(open, path_virtual_keyboard)

OR

local path_virtual_keyboard = 'C:/Users/Public/Documents/HIKeyboard.exe'
os.execute(path_virtual_keyboard)

If anyone can help, I am grateful

Kauan Low
  • 1
  • 1
  • 1
    Does this answer your question? [Set The Window Position of an application via command line](https://stackoverflow.com/questions/7977322/set-the-window-position-of-an-application-via-command-line) – Piglet Feb 11 '21 at 13:47
  • `RunProgram` is not a standard Lua function, so I assume you're running Lua as part of some other software. If so, you'll have to tell us what that is or we won't be able to help you much. – DarkWiiPlayer Feb 11 '21 at 15:03
  • @DarkWiiPlayer, yes, but it has the same function as ```os.execute```, it wouldn't have to be exactly with this code, I just need to execute an ```.exe``` with a specific position. – Kauan Low Feb 11 '21 at 16:30
  • @Piglet, it wasn't really what I was looking for at first, but thanks for the help. – Kauan Low Feb 11 '21 at 16:32
  • I don't understand your comment. the linked question asks exactly the same. how to open an application at a specific position. so if that is not what you were looking for you should ask something else. you cannot specify a position from the Windows command line so you can't do it using Lua alone. hence you need some third party tool as described in the linked answers. – Piglet Feb 11 '21 at 17:08
  • So man, I asked if you would like to do it, think that it would be possible to configure it by the lua itself. – Kauan Low Feb 11 '21 at 17:57

1 Answers1

0

You can configure your C# app to accept arguments, then parse this arguments to your .exe to open where you need.

You can't do this directly from Lua.

flusk
  • 31
  • 3
  • I had thought about it at first, but I couldn't find a way to do it, I tried to throw the parameters on the command line by ```lua```, but I couldn't collect through ```C #```. – Kauan Low Feb 12 '21 at 11:27