Simulating input events

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Simulating input events

Esteban A. Maringolo-3
Hi,

¿How can I simulate a mouse click at some point of the screen (even
on not Dolphin windows)?

Always from within Dolphin.

Best regards.

--
Esteban.


Reply | Threaded
Open this post in threaded view
|

Re: Simulating input events

Andy Bower-3
Esteban,

> ¿How can I simulate a mouse click at some point of the screen (even
> on not Dolphin windows)?
>
> Always from within Dolphin.

Well one way to do it (which we use in some of our test cases) is to
use an ActiveX API called AutoIt.

http://www.hiddensoft.com/AutoIt/

The ActiveX version of this is called AutoItX, and you can use
Dolphin's ActiveX Component Wizard to generate the interfaces for it.
I can't remember why now but we found the AutoIt version 2 to be
preferable to the version 3.

Aside: For UK Dolphiners, I recently used this to win a couple of IPOD
Minis for my kids from the Walker's Crisps "Win an POD" competition. I
set Dolphin going overnight scripting a web browser to request free
entry keys by email and then submitting these as mobile text messages.
:-)

Best regards,

--
Andy Bower
Dolphin Support
www.object-arts.com


Reply | Threaded
Open this post in threaded view
|

Re: Simulating input events

Chris Uppal-3
Andy,

> I set Dolphin going overnight scripting a web browser to request free
> entry keys by email and then submitting these as mobile text messages.

I hope you have a cheap SMS supplier ;-)

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Simulating input events

Esteban A. Maringolo-3
In reply to this post by Andy Bower-3
Andy Bower escribió:
> Esteban,

>>¿How can I simulate a mouse click at some point of the screen (even
>> on not Dolphin windows)?

>>Always from within Dolphin.

> Well one way to do it (which we use in some of our test cases) is to
> use an ActiveX API called AutoIt.
>
> http://www.hiddensoft.com/AutoIt/

> The ActiveX version of this is called AutoItX, and you can use
> Dolphin's ActiveX Component Wizard to generate the interfaces for it.
> I can't remember why now but we found the AutoIt version 2 to be
> preferable to the version 3.

It seems to be pretty complete and useful, particulary for
unit/feature testing.

But what I need is just a simple solution, to use to port the "poor
man's VNC" to the Dolphin version of Seaside.
<http://lists.squeakfoundation.org/pipermail/seaside/2005-November/006098.html>

I'm rendering the screen by now, but no commands can be sent.

> Aside: For UK Dolphiners, I recently used this to win a couple of IPOD
> Minis for my kids from the Walker's Crisps "Win an POD" competition. I
> set Dolphin going overnight scripting a web browser to request free
> entry keys by email and then submitting these as mobile text messages.
> :-)

5 years ago I had an account suspension in the argentinean eBay
subsidiary for doing something similar with Perl scripts and manual
response/request craft :-/

Can no UK residents win that IPODs? :-P

Best regards.

---
Esteban.


Reply | Threaded
Open this post in threaded view
|

Re: Simulating input events

Chris Uppal-3
Esteban,

> But what I need is just a simple solution, to use to port the "poor
> man's VNC" to the Dolphin version of Seaside.

Just curious, what is the advantage of "poor man's VNC" over real VNC (or one
of it's many derivatives) ?

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Simulating input events

Esteban A. Maringolo-3
Chris Uppal escribió:
> Esteban,

>>But what I need is just a simple solution, to use to port the "poor
>>man's VNC" to the Dolphin version of Seaside.

> Just curious, what is the advantage of "poor man's VNC" over real VNC (or one
> of it's many derivatives) ?

Well... to begin with, it isn't VNC :-)

It's just an asynchronous series of
screenshot-command-screenshot-command...

It (1) captures a screenshot of the server screen, (2)send it to the
webpage, the webpage shows it with an area map, (3)when the image is
clicked in the browser sends a request to the http server, (4)
server translates the coords to pixels, (5) executes the event
(simulated), and then goes to 1 again.

When doing that steps, plus continuations, plus a few other things,
you can ran out of Gdiplus handles :-P

In Squeak this is easier to achieve, because the whole "environment"
is a big morph, so capturing the picture of that morph is enough,
plus the squeak version pauses the UI process in each loop.

However, it's a toy, not really useful having a real VNC server
installed..

Best regards,

--
Esteban.


Reply | Threaded
Open this post in threaded view
|

Re: Simulating input events

Chris Uppal-3
Esteban,

> However, it's a toy, not really useful having a real VNC server
> installed..

Maybe you could replace that page (I assume it's a Seaside-generated page) with
a page containing the VNC Java applet client ?

    -- chris