Jump to content

mouse isn't moving >.>


Recommended Posts

So, i have this need to move the mouse about and click an drag stuff..

However, the mouse isn't moving, (i'm testing this in paint, where clicking and dragging should produce a line)

in any case, is there some obvious flaw to my script?

script does run and does finish.

;REM (1051 270) to (642 293), (645, 554)
MouseMove(10, 100);
Sleep(500);
WinActivate("untitled - Paint");
sleep(500);
MsgBox(0,"blah","ok i'm clicking now");
MouseClick("left");
MouseClickDrag("left",1051,270,642,293);
for $temp=1 to 7
    Mouseclick("left", 645,554,1);
    Sleep(1000);
Next
MsgBox(0,"blah","script is finished");

thanks in advance~

Link to comment
Share on other sites

Try this I made up really quick, make sure you have enough room to draw

run( "mspaint.exe")
Winwaitactive( "untitled - Paint")
MouseMove(100, 500, 1)
MouseClickDrag( "left", 100, 100, 100, 500, 100)
MouseClickDrag( "left", 100, 500, 500, 500, 100)
MouseClickDrag( "left", 500, 500, 500, 100, 100)
MouseClickDrag( "left", 500, 100, 100, 100, 100)
Sleep( 1000)
Send("!{F4}")
Sleep(1000)
Send( "!n")
Sleep(1000)
MsgBox(0, "Ta-Da", "There you go")
Edited by nick21
Link to comment
Share on other sites

So, i have this need to move the mouse about and click an drag stuff..

However, the mouse isn't moving, (i'm testing this in paint, where clicking and dragging should produce a line)

What AutoIt version and Windows are you using?? Not Neptune is it?? (nothing seems to work there lol)

Edited by AdmiralAlkex
Link to comment
Share on other sites

Monoceres, No, the mouse function doesn't seem to work at all...

nick21, Thanks for your quick bit of code, i really appreciate it.

I tried copy pasting it in. but.. still, same result, no mouse movements, nothing worked... script did finish though...

Admiral Alkex, you have a good point

i'm working with

SciTE4AutoIt3

Version 1.71

Nov 25 2007 09:22:42

by Neil Hodgson.

Updated: Jos van der Zande

Modified version of SC1 which only contains

the AutoIt3 Lexer.

Check the SciTE4AutoIt3 Homepage for a

full version with lots of extras.

http://www.autoitscript.com/autoit3/scite

will this not work? lol... hmm..

well, Again, Thank you everyone for the fast help so far >.<

Edited by daues666
Link to comment
Share on other sites

  • Moderators

Well, in any case, I no longer need to accomplish this task..

so,

thanks to everyone who helped ^^

Were you running this in a virtual environment?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • 2 weeks later...

Were you running this in a virtual environment?

I'm in a vitrual environment, and I've got the same type of problem. Haven't tried it in VMWare, but MS Virtual Server causes problems under certain conditions. First, the mouse refuses to move at all in VMRC Plus client. If I remote in to a VM using mstsc, start the AutoIT script, then minimize the remote session, the script won't send keys to the right window and the mouse doesn't move.

I want to be able to start a script on a VM, minimize the VM and continue to work, then pop back in on the VM periodically to check on the script. My solution so far is to remote to a physical box with mstsc, then from there remote to a VM, then I can minimize the physical session and the remoted VM AutoIT script seems to work.

Any ideas why when I remote directoy to a VM from my physical box, then minimize the virtual session the AutoIT script stops working? Gertting it to work in VMRC Plus would be the best solution as that remote environment is the best (compared to mstsc or ActiveX browser control). I've got VMWare workstation to try if I need to, but kind of pressed for time now, and I've got it working, albeit not to my complete satisifaction.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...