Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 simulated input
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rollerdude




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
Albrecd




PostPosted: 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.
rollerdude




PostPosted: 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)
Cervantes




PostPosted: 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.
rollerdude




PostPosted: 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?
Cervantes




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: