mirror of
https://github.com/vxcontrol/lualibs-winapi.git
synced 2026-07-01 13:54:03 -04:00
13 lines
441 B
Lua
13 lines
441 B
Lua
-- this shows how @{Process:wait_for_input_idle} means that there's no need for
|
|
-- a random wait until an application is ready to go.
|
|
-- Note, if we use @{spawn_process} then the window is initially invisible,
|
|
-- and needs to be shown explicitly.
|
|
require 'winapi'
|
|
P = winapi.spawn_process 'notepad'
|
|
P:wait_for_input_idle()
|
|
w = winapi.find_window_match 'Untitled'
|
|
w:show()
|
|
w:set_foreground()
|
|
winapi.send_to_window 'hello dammit'
|
|
|