is there script that may simulate all user's action:
a) keyboard press, letters as well special win keys like alt+enter
b) mouse moving [pointer moving accross the screen] and click and double
click

the idea is to have recorded [i'll rather say programaticaly "constructed"]
all keyboard and mouse activities and than making "replay"

i suppose to have some control data file like:
<mouse_to> x1,y1
<wait> 1 second
<mouse_click>
<mouse_drag_to> x2,y2
<mouse_click>
etc...
script is reading that control file and performing action [moving mouse]
accros the screen.

this could allow me to controll some other win program, exactly as user
sitting in front of display.

is it possible? is there some script or com object or whatever?

Re: mouse control by Ulf

Ulf
Tue Nov 02 13:16:45 CST 2004

gabor salai wrote:
> is there script that may simulate all user's action:

I don't think so ... but maybe you can create one. ;-)

> a) keyboard press, letters as well special win keys like alt+enter

This is easy ... just use the SendKeys method of the Wscript.Shell object.

> b) mouse moving [pointer moving accross the screen] and click and
> double click

This is not easy ... in fact I think it is impossible without using windows
api's (which is not possible via a script).

> the idea is to have recorded [i'll rather say programaticaly
> "constructed"] all keyboard and mouse activities and than making
> "replay"

I'm sure there are tons of existing non-scripting solutions for this problem
(macro recorder, etc.). Why don't use one of them?

Ulf



Re: mouse control by gabor

gabor
Tue Nov 02 13:48:53 CST 2004

"Ulf Dornheck Busscher" <ulfdb@web.de> wrote in message
news:ODXIAgQwEHA.2192@TK2MSFTNGP14.phx.gbl...
> gabor salai wrote:
> > is there script that may simulate all user's action:
>
> I don't think so ... but maybe you can create one. ;-)
>
> > a) keyboard press, letters as well special win keys like alt+enter
>
> This is easy ... just use the SendKeys method of the Wscript.Shell object.
>
> > b) mouse moving [pointer moving accross the screen] and click and
> > double click
>
> This is not easy ... in fact I think it is impossible without using
windows
> api's (which is not possible via a script).
>
> > the idea is to have recorded [i'll rather say programaticaly
> > "constructed"] all keyboard and mouse activities and than making
> > "replay"
>
> I'm sure there are tons of existing non-scripting solutions for this
problem
> (macro recorder, etc.). Why don't use one of them?
>

thanks for response.
i know for "sendkeys" method, but it isn't sufficient for my problem.
hoped there is some kind of "sendmouse" method, similar to "sendkeys".

we have some apps that are frontend to database, they are without "macro"
capability, and the only way to enter/edit data is by direct user's
interaction [kbd/mouse].

that is the reason why i thought to "automatise" user's activity, and
programaticaly create "control file" to pass some data from external
database to this.






Re: mouse control by Ulf

Ulf
Tue Nov 02 14:09:43 CST 2004

Hi Gabor,

gabor salai wrote:
> "Ulf Dornheck Busscher" <ulfdb@web.de> wrote in message
> news:ODXIAgQwEHA.2192@TK2MSFTNGP14.phx.gbl...
>> gabor salai wrote:

> i know for "sendkeys" method, but it isn't sufficient for my problem.
> hoped there is some kind of "sendmouse" method, similar to "sendkeys".

Exept the missing "sendmouse" capabilities ... why is the sendkeys method
not sufficient?

> we have some apps that are frontend to database, they are without
> "macro" capability, and the only way to enter/edit data is by direct
> user's interaction [kbd/mouse].

NoNo ... sorry ... you get me wrong. There are many 3rd party tools for
tasks like that. The app itself don't need any "macro" capabilities.

Regards,

Ulf



Re: mouse control by gabor

gabor
Tue Nov 02 15:05:37 CST 2004

"Ulf Dornheck Busscher" <ulfdb@web.de> wrote in message
news:uWlDBfRwEHA.2600@TK2MSFTNGP09.phx.gbl...
> Hi Gabor,
>
> gabor salai wrote:
> > "Ulf Dornheck Busscher" <ulfdb@web.de> wrote in message
> > news:ODXIAgQwEHA.2192@TK2MSFTNGP14.phx.gbl...
> >> gabor salai wrote:
>
> > i know for "sendkeys" method, but it isn't sufficient for my problem.
> > hoped there is some kind of "sendmouse" method, similar to "sendkeys".
>
> Exept the missing "sendmouse" capabilities ... why is the sendkeys method
> not sufficient?

very simply!
these apps don't support "alt+key" neither "tab" focus changing
consinstently.


> > we have some apps that are frontend to database, they are without
> > "macro" capability, and the only way to enter/edit data is by direct
> > user's interaction [kbd/mouse].
>
> NoNo ... sorry ... you get me wrong. There are many 3rd party tools for
> tasks like that. The app itself don't need any "macro" capabilities.
>

well, if there are 3rd party tools support "sendmouse" [if i may express
myself like that] it is what i am looking for!





Re: mouse control by Torgeir

Torgeir
Tue Nov 02 15:17:10 CST 2004

gabor salai wrote:

> well, if there are 3rd party tools support "sendmouse" [if i may express
> myself like that] it is what i am looking for!
Hi

AutoIt/AutoItX (free) supports this.

It has a much better Appactivate/Sendkeys handling as well.

More about AutoIt/AutoItX here:
http://groups.google.com/groups?selm=OuXrBqBuEHA.3188%40TK2MSFTNGP15.phx.gbl


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

Re: mouse control by gabor

gabor
Tue Nov 02 16:32:01 CST 2004

"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:enaZtFSwEHA.2908@tk2msftngp13.phx.gbl...
> gabor salai wrote:
>
> > well, if there are 3rd party tools support "sendmouse" [if i may express
> > myself like that] it is what i am looking for!
> Hi
>
> AutoIt/AutoItX (free) supports this.
>
> It has a much better Appactivate/Sendkeys handling as well.
>
> More about AutoIt/AutoItX here:
>
http://groups.google.com/groups?selm=OuXrBqBuEHA.3188%40TK2MSFTNGP15.phx.gbl
>

pow("thanks",100)

[i suppose you will understand what is the return value of expression above]