
-----------------------------------
rollerdude
Wed May 23, 2007 12:10 pm

simulated input
-----------------------------------
is it possible to create a program kinda like the windows on-screen keyboard (where you click the keys to enter letters into the selected program)...???

any insight would be nice... thnx

-----------------------------------
Albrecd
Wed May 23, 2007 12:20 pm

Re: simulated input
-----------------------------------
Yep,
Just draw the keyboard and use Mouse.Where to determine which button is clicked (then add whatever character to a string).
To display the text, you should use Font.Draw instead of put so it doesn't affect your graphics.

-----------------------------------
rollerdude
Wed May 23, 2007 12:25 pm

Re: simulated input
-----------------------------------
i can draw the keyboard, but what i meant was, like open a program like... google, for example, and get the output of it go in the search (or whatever i select)

-----------------------------------
Cervantes
Tue May 29, 2007 3:51 pm

RE:simulated input
-----------------------------------
A program like Google? You mean, open www.google.ca in an internet browser? Well, unless you can configure your internet browser to read it's input from a text (or binary) file, you're out of luck. There's no way to make a Turing program that can highjack another program you have running and start giving it new inputs input.  Where's the security in that?

What you can do, however, is open a new instance of the internet browser, using Sys.Exec.


Sys.Exec("C:\Program Files\Mozilla Firefox\firefox.exe http://www.google.ca/search?q=Django+Reinhart")
You might have to do something for escaping spaces in the path, or you might want to change the path or launch a different program entirely.

You will also have to do some basic string manipulation to get the search query to work correctly. It's just replacing spaces with pluses.

-----------------------------------
rollerdude
Wed May 30, 2007 1:06 pm

Re: simulated input
-----------------------------------
so you mean that is abosolutley no way of making a program like the windows on-screen keyboard?

-----------------------------------
Cervantes
Wed May 30, 2007 6:42 pm

RE:simulated input
-----------------------------------
You can make a keyboard, but the input will go to your Turing program, and no where else.
