laidback01 Posted February 12, 2008 Share Posted February 12, 2008 (edited) Okay, not looking for code per se, but I need to know how to do a couple things. You see the machine I code on uses resolution 1600x1200, and the machine(s) where the exe's run have various resolutions. I didn't take that into account on my MouseClickDrag statements... The coordinates are hardcoded. So.. here's what I want to know: 1) How do I determine the location of my window relative to the desktop - I'm sure there's a function for that, but I didn't find it. In this case, my window is another application that I call from RanWait statement, not the autoit script itself. 2) Is there a way to just move the mouse to the title bar of current active window without finding out 1)? that's really all I need to know as the scripts work fine... it's just that on other PCs, the mouse is just moving, but never clicking the right areas to drag, so I can't see the 8 instances of the program I'm working with. thanks, Jack Edited February 12, 2008 by laidback01 Link to comment Share on other sites More sharing options...
Achilles Posted February 12, 2008 Share Posted February 12, 2008 Okay, not looking for code per se, but I need to know how to do a couple things. You see the machine I code on uses resolution 1600x1200, and the machine(s) where the exe's run have various resolutions. I didn't take that into account on my MouseClickDrag statements... The coordinates are hardcoded. So.. here's what I want to know:1) How do I determine the location of my window relative to the desktop - I'm sure there's a function for that, but I didn't find it. In this case, my window is another application that I call from RanWait statement, not the autoit script itself.2) Is there a way to just move the mouse to the title bar of current active window without finding out 1)?that's really all I need to know as the scripts work fine... it's just that on other PCs, the mouse is just moving, but never clicking the right areas to drag, so I can't see the 8 instances of the program I'm working with.thanks,Jack1.@DesktopWidth@DesktopHeight2. WinGetPos() and then move the mouse as necessary... My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
laidback01 Posted February 12, 2008 Author Share Posted February 12, 2008 Looks more like WinMove is what I'm trying to do.. thanks for the reply though. Link to comment Share on other sites More sharing options...
Valuater Posted February 12, 2008 Share Posted February 12, 2008 Like this... ; 2) Is there a way to just move the mouse to the title bar of current active window without finding out 1)? Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client Run("notepad.exe") WinWaitActive("") MouseMove( 1,1) 8) Link to comment Share on other sites More sharing options...
laidback01 Posted February 12, 2008 Author Share Posted February 12, 2008 (edited) My solution ended up as this: for $i = 0 to 7 Run($application) WinWaitActive("Meditech Health Care Information System") $handle[$i][0] = WinGetHandle("Meditech Health Care Information System") if Mod(10+$i,2) = 0 then WinMove($handle[$i][0],"",$i*100,0) Else WinMove($handle[$i][0],"",-100+$i*100,300) EndIf Next thanks for you help! Edited February 12, 2008 by laidback01 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