Computer Science Canada simulated input |
Author: | rollerdude [ Wed May 23, 2007 12:10 pm ] |
Post subject: | 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 |
Author: | Albrecd [ Wed May 23, 2007 12:20 pm ] |
Post subject: | 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. |
Author: | rollerdude [ Wed May 23, 2007 12:25 pm ] |
Post subject: | 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) |
Author: | Cervantes [ Tue May 29, 2007 3:51 pm ] | ||
Post subject: | 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.
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. |
Author: | rollerdude [ Wed May 30, 2007 1:06 pm ] |
Post subject: | Re: simulated input |
so you mean that is abosolutley no way of making a program like the windows on-screen keyboard? |
Author: | Cervantes [ Wed May 30, 2007 6:42 pm ] |
Post subject: | RE:simulated input |
You can make a keyboard, but the input will go to your Turing program, and no where else. |