Jump to content

Recommended Posts

I'm having a problem using winmove with WordPerfect X5.

WordPerfect X5 is on top and is the active window. I run the following code

Opt("ExpandVarStrings", 1)
$WinTitle  = WinGetTitle("[active]")
$Err = WinMove ($WinTitle, "", 10, 10)
MsgBox (0, 'Move', "$WinTitle$ $Err$")

The WordPerfect window does NOT move and the msgbox shows:

$WinTitle= "WordPerfect X5 - Document 1"

$Err = 0, which means:  "Failure: 0 if the window is not found."


Any other program I've tried works fine. I then tried the following:

Opt("ExpandVarStrings", 1)
$WinTitle  = WinGetTitle("[active]")
$WinHandle = WinGetHandle( $WinTitle)
MsgBox (0, 'Handle', "$WinTitle$ $WinHandle$")

Again the msgbox showed $WinTitle= "WordPerfect X5 - Document 1"

$WinHandle = 0

So I now assume that WordPerfect does NOT respond to the standard windows commands. Any suggestions of a work-around, or am I missing something?



Edited by major4579
modified code segments
Link to post
Share on other sites

Try putting 


at the top, and see if that has any effect.

Snips & Scripts

My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ


Link to post
Share on other sites
  • 2 weeks later...

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Viszna
      Why does Windows 10 "AutoIt Window Info" give the wrong window position?
      WinMove() moves the window to a different point than parameters? -look script

      The test script moves the notepad.exe window to 0, 0, the real window coordinates are 8, 0
      Modified script add WinGetPos() and MouseMove() and MouseGetPos()
      #include <ScreenCapture.au3> Local $iPID = Run("notepad.exe", "") WinWait("[CLASS:Notepad]", "", 10); Wait 10 seconds for the Notepad window to appear. WinMove ("[CLASS:Notepad]", "", 0, 0, 600, 400) WinActivate("[CLASS:Notepad]") Send("WinMove ('[CLASS:Notepad]', "", 0, 0, 600, 400){ENTER}") Send("@DesktopWidth: " & @DesktopWidth & "{ENTER}") Send("@DesktopHeight: " & @DesktopHeight & "{ENTER}") Send("@DesktopDepth: " & @DesktopDepth & "{ENTER}") Send("@OSArch: " & @OSArch & "{ENTER}") Send("@OSBuild: " & @OSBuild & "{ENTER}") Send("@OSServicePack: " & @OSServicePack & "{ENTER}") Send("@OSType: " & @OSType & "{ENTER}") Send("@OSVersion: " & @OSVersion & "{ENTER}") Send(WinGetPos("[CLASS:Notepad]") & "{ENTER}") Send("X: " & WinGetPos("[CLASS:Notepad]")[0] & "{ENTER}") Send("Y: " & WinGetPos("[CLASS:Notepad]")[1] & "{ENTER}") Send("Width: " & WinGetPos("[CLASS:Notepad]")[2] & "{ENTER}") Send("Height: " & WinGetPos("[CLASS:Notepad]")[3] & "{ENTER}") MouseMove(0,400) Send("MouseMove(0,400){ENTER}") Send("MouseGetPos() X: " & MouseGetPos()[0] & "Y: " & MouseGetPos()[1]) Sleep(100) _ScreenCapture_Capture('C:\temp\screen.bmp',0,0,800,600) MsgBox(0,"Info","Save screen to C:\temp\screen.bmp" & @CRLF & "Click OK to view the bitmap") Run("explorer.exe C:\temp\screen.bmp") Is ALWAYS such a difference 8px (in every Windows 7, 8, Server)?
    • By keelaji
      first of all i searched in the forum but i didn't found any solution to my problem.
      I am using windows 10.
      I made a script that is supposed to change the title to the active window, resize it to the smallest size possible (should be around 800 x 600) and move to (0, 0).
      I can change the title but i fail to do the other 2 tasks.
      i use wingettitle [active] copied from the F1 help tool (and this works), i i put the title in a variable and than i use
      winsettitle ($variable, "one") (this works too)
      winmove ("one", 0, 0, 800, 600) (doesn't do anything)
      i also tried
      local $x = winget ( "one")
      msgbox (0, "", $x) (i get a completely white box so i suppose winget can't have any data about my window ??)
      any suggestion ?
    • By WoodGrain
      Hi guys,
      I'm trying to move and resize a program call CPUID HWMonitor (http://www.cpuid.com/softwares/hwmonitor.html) but WinMove() doesn't work. Can someone tell me how to get this to work for this program? I've successfully moved other programs using WinMove(), and I've used WinGetTitle ("[ACTIVE]") to confirm the title is correct. WinActivate("CPUID HWMonitor") does work.
      If I run the following code nothing happens, doesn't move or resize, but AutoIt doesn't complain about the code either:
      WinMove("CPUID HWMonitor", 0, 0, 475, 715) The class changes every time the program opens (and I've nevery had a lot of success with classes tbh, bit hit and miss for me).
      Thanks all!
    • By Leo1906
      Hey guys, I could need your help aggain ..
      Is there a way to clip GUIs together (child GUIs - in one script). So if I use WinMove with speed set to one of those GUIs, the others follow at the same speed like they where one block?
      I can't think of an option to do this in pure Autoit. Creating an adlib for each GUI won't help I'm afraid, because adlibs are paused on GUI-move?
      And using this type of function didn't help either: 

      I can't imagine any other way of achieving multiple GUI moves at once using Autoit, because Autoit waits for the WinMove command to finish ..
      Any thoughts? Maybe a build in windows function for clipping GUIs together?
      Thanks for your help
    • By theak
      Trying to find a quick way to convert 30k+ WordPerfect files into Word.
      Will probably run it locally from an admin machine or server so user permissions won't affect it.
      My idea was just to open the file, select all, copy, open new word doc, paste, file, save....
      What would be the best way to go about scripting something in this way?
  • Create New...