daues666 Posted April 8, 2008 Share Posted April 8, 2008 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 More sharing options...
monoceres Posted April 8, 2008 Share Posted April 8, 2008 (edited) Running fine here, just for making sure, your script do click at a tool in paint? Edited April 8, 2008 by monoceres Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
daues666 Posted April 8, 2008 Author Share Posted April 8, 2008 Yep, i have a tool selected. Is there supposed to be some dll to activate? unplug optical mouse? or.. some window-activating code or something? thanks for the reply, by the way, monoceres Link to comment Share on other sites More sharing options...
monoceres Posted April 8, 2008 Share Posted April 8, 2008 Doesn't the Mouse function work at all? Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
nick21 Posted April 8, 2008 Share Posted April 8, 2008 (edited) 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 April 8, 2008 by nick21 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted April 8, 2008 Share Posted April 8, 2008 (edited) 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 April 8, 2008 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
daues666 Posted April 8, 2008 Author Share Posted April 8, 2008 (edited) 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 pointi'm working with SciTE4AutoIt3 Version 1.71 Nov 25 2007 09:22:42by Neil Hodgson. Updated: Jos van der ZandeModified version of SC1 which only containsthe AutoIt3 Lexer.Check the SciTE4AutoIt3 Homepage for afull version with lots of extras.http://www.autoitscript.com/autoit3/scitewill this not work? lol... hmm..well, Again, Thank you everyone for the fast help so far >.< Edited April 8, 2008 by daues666 Link to comment Share on other sites More sharing options...
daues666 Posted April 9, 2008 Author Share Posted April 9, 2008 Well, in any case, I no longer need to accomplish this task.. so, thanks to everyone who helped ^^ Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted April 9, 2008 Moderators Share Posted April 9, 2008 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 More sharing options...
scottclark Posted April 17, 2008 Share Posted April 17, 2008 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now