Jump to content
Sign in to follow this  
jgear

WinMove, WinActivate, WinSetState - not working certain windows

Recommended Posts

jgear

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

Share this post


Link to post
Share on other sites
jdelaney

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.

Share this post


Link to post
Share on other sites
hg2051

Same problem.Maybe the last version of AutoIt? (yesterday it was working)

Share this post


Link to post
Share on other sites
Jos

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
hg2051

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.

Share this post


Link to post
Share on other sites
Jos

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Muzaiyan

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?

Share this post


Link to post
Share on other sites
Jos

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.