simulated input
Author |
Message |
rollerdude
![](http://compsci.ca/v3/uploads/user_avatars/2012907293465dc2862c598.jpg)
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Albrecd
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
rollerdude
![](http://compsci.ca/v3/uploads/user_avatars/2012907293465dc2862c598.jpg)
|
Posted: 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) |
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: 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.
code: |
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. |
|
|
|
|
![](images/spacer.gif) |
rollerdude
![](http://compsci.ca/v3/uploads/user_avatars/2012907293465dc2862c598.jpg)
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
|
|