Jump to content

WinMove() or WinSetState() will not work


Recommended Posts

I'm currently working on a script that automates a lot of mouse movements within a program. This means for the program to work right on every computer I have decided to simply have the script resize the window before running the mouse movements. Problem is, the window doesn't respond to WinMove() or WinSetState(). I've tested the script on Notepad and had no problems.

Is there an alternate way to do this for stubborn windows such as the one I'm working with? Just to answer some questions -- The window is able to be manually resized, minimized, maximized, and restored. It IS a resizeable window.

Any help appretiated -- Thanks!

(Note: I'm not the most familiar with Autoit, or scripting in general -- In other words, treat me like I'm new to it. Lol)

Link to comment
Share on other sites

I'm currently working on a script that automates a lot of mouse movements within a program. This means for the program to work right on every computer I have decided to simply have the script resize the window before running the mouse movements. Problem is, the window doesn't respond to WinMove() or WinSetState(). I've tested the script on Notepad and had no problems.

Is there an alternate way to do this for stubborn windows such as the one I'm working with? Just to answer some questions -- The window is able to be manually resized, minimized, maximized, and restored. It IS a resizeable window.

Any help appretiated -- Thanks!

(Note: I'm not the most familiar with Autoit, or scripting in general -- In other words, treat me like I'm new to it. Lol)

I think you need to show the code you used to resize the window before we can make an sensible suggestions.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

WinActivate ( "Notepad" ,"" )
WinWaitActive ( "Notepad" ,"" )
$active = WinGetTitle("[active]")
WinSetState ($active,"", @SW_RESTORE )

This is the code that worked on Notepad, and not the program my code is intended for.

I currently have a simular issue, please see topic to see if any of the current post can help. I am still pending resolution for moving Internet Explorer windows. WinMove Topic

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...