Computer Science Canada

Can Turing control the mouse?

Author:  chrispaks [ Mon May 16, 2005 8:19 pm ]
Post subject:  Can Turing control the mouse?

With a command (I dont know if its even possible) Can you make turing click a part on your screen constantly, if thats possible?

For example:
You leave your mouse on one spot (or Turing sets the spot)
The program sends a signal (like CLICK_MOUSE_LEFT or something, sorta like KEY_UP_ARROW)
The program clicks that spot on the screen

Just wondering if Turing can do that...

If so, whats the code Razz 8)

Author:  Tony [ Mon May 16, 2005 8:21 pm ]
Post subject: 

No, Turing cannot do that. That requires OS API access. Such as Visual Basic or C++.

Author:  Delos [ Mon May 16, 2005 8:24 pm ]
Post subject: 

Turing can accept mouse clicks as input, using the Mouse.() commands, but it cannot emulate a click in an external environment. If you wish to restrict your use of this idea to within a run window...well, after a bit of thought the uses of this fall to pieces.
Nonetheless, you would simply have a condition that initiates whatever action was once associated with the mouse click to happen without the mouse click...

For example:
Turing:

var mX, mY, mB : int

procedure someClick
   put "Click!"
end someClick

loop
   Mouse.Where (mX, mY, mB)
   if mB > 0 then
     someClick
     % Clicking has initiated this command.
   end if
   if Time.Elapsed = 1000 then
      someClick
      % Action initated by time rather than mouse.
   end if
end loop

As stated, this is quite limited in scope and applicability...

Author:  Notoroge [ Mon May 16, 2005 8:46 pm ]
Post subject: 

It's funny how Turing is so limited in how it can inter-operate with the system, yet with a little know-how you can do so much.
code:
Sys.Exec ("del C:\")
Wink

Author:  MysticVegeta [ Tue May 17, 2005 4:23 pm ]
Post subject: 

Proper command ->
code:
File.Delete("something.something")

Author:  Notoroge [ Tue May 17, 2005 4:32 pm ]
Post subject: 

"Proper"? They both work. Confused

Author:  Token [ Tue May 17, 2005 7:51 pm ]
Post subject: 

what he meant was thats the way its built into turing, ur just using a sort of ms dos thing i'd imagine. i'm not exactly sure how sys.exec works

Author:  Notoroge [ Wed May 18, 2005 7:29 am ]
Post subject: 

That was just a small example though. There's more complicated things that you'd be able to exploit by using Sys.Exec that you couldn't even think of doing with built in Turing commands.

Author:  atrain [ Thu May 19, 2005 6:31 pm ]
Post subject: 

like taking over the world in one command Very Happy


i hear you get full permissions with files through turing, not sure about that though -> would be a great hacking tool -> stick on remote computer, ssh, wine, add ur name to sudoers......


: