Jump to content
Kintar

Problem with MouseMove on defined application

Recommended Posts

Kintar

MouseMove didn't work after i succesfully activate my window.

Global $sWinTitle = ":: E-Trade PriceList Importer 1.9.0", $hWin
$hWin = WinGetHandle($sWinTitle, "")
WinActivate ($hWin)
MouseMove (424, 84, 0)

Window of my program succesfully activated, but mousemove didn't move the mouse. If (in another samples) active window is another window, mousemove work properly.

What can it be?!

Edited by Kintar

Share this post


Link to post
Share on other sites
Steveiwonder

Your code works fine for me. I dont see any issues.

Trying adding WinWaitWactive() if your trying to move the cursor based on the active window.

Global $sWinTitle = "Folder", $hWin
$hWin = WinGetHandle($sWinTitle, "")
WinActivate ($hWin)
WinWaitActive($hWin)
MouseMove (424, 84, 0)

They call me MrRegExpMan

Share this post


Link to post
Share on other sites
Kintar

Yeah, on any another application it's work fine.

But for my application it's do nothing. I'm asking - what can it be?

:mellow:

Edited by Kintar

Share this post


Link to post
Share on other sites
andrei0x309

Your application runs in full screen mode ? Cause it might have other resolution set in that case you must use different code .

Try using

$WndPos=WinGetPos("[Class:WindowClass]")
to get the right position . and use $x = $WinGetPos[0] + $number and $y = $WinGetPos[0] + $number then mousemove($x,$y,$speed) Edited by Azraelsub7

Share this post


Link to post
Share on other sites
Kintar

My application didn't run in fullscreen mode. And MouseMove didn't move the mouse without any dependence on coordinates. (

And any autoit directive, except directives, that switch windows (like MsgBox), didn't work while my application is active.

Edited by Kintar

Share this post


Link to post
Share on other sites
div222

I do have the same problem. If a specific application is active, the mousemove doesn't work anymore. As soon as that application is not active anymore, the mousemove works again. If it matters for anything, the application is running under the NETWORK SERVICE user. When the application runs under a different user (the currently logged on user, for instance), mouse move works again. Is there any workaround for this problem?

Share this post


Link to post
Share on other sites
somdcomputerguy

Some applications block any kind of automated input.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
mpr90

I had exactly the same problem. I realized that the app I was trying to control was running with elevated privileges, and after running the auto it script from an Administrator command prompt, everything worked as expected.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.