Simulate input/Keyboard: Difference between revisions
→{{header|Perl}}
BrianFennell (talk | contribs) |
BrianFennell (talk | contribs) |
||
Line 330:
=={{header|Perl}}==
Perl on linux can do this for PseudoTerminals (ptys) and Terminals (ttys) using [http://www.kernel.org/doc/man-pages/online/pages/man4/tty_ioctl.4.html IOCTL TIOCSTI]. The same can be done with C or any other language that can use IOCTL either natively or via [http://en.wikipedia.org/wiki/Foreign_function_interface FFI] such as [http://en.wikipedia.org/wiki/Java_Native_Interface JNI] or [http://en.wikipedia.org/wiki/Java_Native_Access JNA].
Target may be externally created, but process must be able to open tty/pty for writing.
Line 345 ⟶ 343:
print "DONE\n";</lang>
Perl on X11 can do this using the SendKeys function from [http://search.cpan.org/%7ectrondlp/X11-GUITest-0.25/GUITest.pm X11::GUITest] ▼
Perl on Windows can do this using the SendKeys function from [http://search.cpan.org/%7ekarasik/Win32-GuiTest-1.58/lib/Win32/GuiTest.pm Win32::GUITest]▼
▲Perl on X11 can do this using the SendKeys function from [http://search.cpan.org/%7ectrondlp/X11-GUITest
▲Perl on Windows can do this using the SendKeys function from [http://search.cpan.org/%7ekarasik/Win32-GuiTest
Target may be externally created.
|