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

Username:   Password: 
 RegisterRegister   
 Help with keyboard access
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
andyjndm




PostPosted: Fri Dec 18, 2009 10:43 pm   Post subject: Help with keyboard access

What is it you are trying to achieve?
I'm trying to make Turing press keys, in an auto-talker type manner, such as saying something like "Hello" every 30seconds when I run it.



What is the problem you are having?
I'm not too sure how to make it automatically type.

Describe what you have tried to solve this problem
This is my first step.


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)

Turing:





Please specify what version of Turing you are using
Turing 4.1.1
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sat Dec 19, 2009 1:23 am   Post subject: RE:Help with keyboard access

Are you asking about actually putting key presses into the keyboard buffer (as in keys that another program will read), or is this for something just within your own program?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
apomb




PostPosted: Sat Dec 19, 2009 4:14 pm   Post subject: RE:Help with keyboard access

you could make a loop and output "hello" with a 30 second delay?

seems completely pointless... but possible.
andrew.




PostPosted: Sat Dec 19, 2009 4:29 pm   Post subject: RE:Help with keyboard access

Well if you mean for Turing to output "Hello" every thirty seconds, do something like this:
Turing:
loop
    put "Hello"
    delay (30*1000) % the time is in milliseconds, so you multiply by 1000
end loop


If you want Turing to type in another program, then it's not possible.
andyjndm




PostPosted: Sun Dec 20, 2009 3:59 pm   Post subject: Re: RE:Help with keyboard access

Tony @ Sat Dec 19, 2009 1:23 am wrote:
Are you asking about actually putting key presses into the keyboard buffer (as in keys that another program will read), or is this for something just within your own program?


Actually putting key presses into the keyboard buffer.
The actual goal of this is to be a runescape auto-talker, purely for boredom's sake.
TheGuardian001




PostPosted: Sun Dec 20, 2009 4:13 pm   Post subject: Re: Help with keyboard access

In that case you're using the wrong language. Turing has little to no access to anything outside of itself.
andrew.




PostPosted: Sun Dec 20, 2009 5:01 pm   Post subject: RE:Help with keyboard access

Try Java. It's not too hard to learn. Once you learn the basics, check out the Robot class. You can do this as well as control the mouse with it.
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  [ 7 Posts ]
Jump to:   


Style:  
Search: