Forum Discussion

Oferv's avatar
Oferv
Super Contributor
13 years ago

Is it possible to set window's size and position the moment it's loading?

Hi,



I'm loading an explorer window and i was wondering if it Is possible to set window's size and position the moment it's loading?

The opened window is a plugins folder,plugins which i need to drag and drop on specifc location in the AUT and the explorer window is opening on the top of the application and hide the application and therefore i can't drag and drop the plugins onto the right location for them to be installed.so,i need the window to open next to where i want to drag and drop the plugins.

is it possible?



Thanks

1 Reply

  • AlexeyK's avatar
    AlexeyK
    SmartBear Alumni (Retired)

    Ofer,


    Use the Position action after the Explorer window is opened:




    ' Obtain the Explorer window

    Set wnd = Sys.Process("Explorer").Window("ExploreWClass", "My Computer", 1)

     

    wnd.Activate  ' Activate the window if needed

     

    ' Change the window size and position

    Call wnd.Position(300, 200, 600, 400)