Computer Science Canada

keys being forced to run

Author:  deathscith [ Thu Jun 05, 2008 11:03 am ]
Post subject:  keys being forced to run

alright, i know with turing you can make your program know when keys are pushed with the Input.KeyDown (chars) command, but can you make keys be forced down, like make a program push ctrl+shift+esc and open the task manager. so like push
var chars : array char of boolean
loop
Input.KeyDown (chars)
if chars (KEY_UP_ARROW) then
<code here for answer>
end if
end loop

Author:  jeffgreco13 [ Thu Jun 05, 2008 11:18 am ]
Post subject:  Re: keys being forced to run

So you mean you want to run code that will simulate the keys being pressed right?

Well depending on what you want to do, like in your example you said you wanted to run the task manager by pressing control+alt+delete. You could just run a system command in turing that brings that up. Tell me exactly what you plan on doing and I'll be of more assistance.

Check this out

User 'taskmgr' as your command to bring up the Task Manager.

Author:  Tony [ Thu Jun 05, 2008 11:22 am ]
Post subject:  RE:keys being forced to run

You cannot send keystrokes to the system, that requires Win32 API access. Though as it was pointed out, you could send commands to the command prompt.


: