lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> How to use LUA to manipulate window controls in windows OS? Controls like input boxes in various applications to focus on them first then paste text into them.

You can use winapi to find the window you want and send it some text
(http://stevedonovan.github.io/winapi/api.html#Manipulating_Windows),
but I'm not sure if it's granular enough to send the text to a
particular text box (unless it already has focus). You can also use
LuaJIT/FFI to get access to specific windows API functions that allow
finer granularity.

In terms of GUI automation, there are tools like AutoIt and it looks
to have some Lua integration
(https://www.autoitscript.com/forum/topic/196533-lua-scripts/).

Paul.

On Sat, Dec 12, 2020 at 12:29 PM Tanvir Muktadir <fowluser@gmail.com> wrote:
>
> Hello,
>  How to use LUA to manipulate window controls in windows OS? Controls like input boxes in various applications to focus on them first then paste text into them.
>
> I'm trying to autotype username/passwords in various applications. But directly pasting on activated windows just doesn't do anything on those programs. First I have to select the specific input field then paste the text.
>
> I don't want to tab all the way to the fields because it can be unreliable as my PC is a potato.