Jump to content

WinMove, WinActivate, WinSetState - not working certain windows


Recommended Posts

Hi All,

Been trying to figure this out for hours - I seem to be no closer.

Just last night, the WinMove and WinActivate functions were working on the window I am working with right now, but they stopped working. I made no significant changes to the system.

Here is the code which won't work:

WinMove("Windows PowerShell", "", 0, 0, 200, 200, 1)

The WinActivate command also seems to have stopped working, but I am less concerned with that function.

I can see the window in the list when I use WinList.

Any help would be appreciated.

Thanks,

J

Link to comment
Share on other sites

try this

$hwnd = WinGetHandle("[CLASS:ConsoleWindowClass]")
If IsHWnd($hwnd) Then
    WinMove($hwnd, "", 0,0,200,200)
Else
    MsgBox(1,1,"send us the autoit window info tool output")
EndIf
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

  • 2 months later...
  • Developers

Works fine here when simply starting powershell from the startmenu and running the posted line from SciTE which is running under normal User credentials that is member of the Adminstrators group but not in "Run as Admin" mode.

What exactly do you do?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Finally, I think it's because SciTe,or the way it works with the last edition of AutoIt 64 bits, because directly running au3 files with AutoIt is OK.

Are you running SciTE with "Run As Administrator" and Powershell in normal mode?

I tried from SciTE both in Normal mode and it worked fine, so it's imported they both run at the same level.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Direct from the example

WinMove

WinMove() has no effect on minimized windows, but WinMove() works on hidden windows

are you trying to move a minimized window?

The example works fine and isn't a minimised window which is the same as a Hidden window... A minimized Window can't be moved!

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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