ConsoleUser

Copyright (c) 2010-2023 Skaion Corporarion, www.skaion.com

This project was developed in part by numerous sponsorships from the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints of Governmental purposes notwithstanding any copyright notation thereon.

All content reflects those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government or Skaion Corporation.

class WindowsXPWindow.WindowsXPWindow(system, config, app=None)

I am a subclass of <no title> which knows about windows on Windows XP using the Windows Classic theme.

Parameters:

  • system: a <no title> object through which we interact with the window

  • config: a <no title> object for this user

  • app: if present, its a handle to the application controlling this Window

at_bottom()

Return: True iff the verticle scroll bar is at the bottom

at_top()

Return: True iff the verticle scroll bar is at the top

can_scroll()

Return: True iff there is an enabled verticle scrollbar

get_focus()

Switch the system so that this window has focus. This cannot be called until after save_state so the system knows what to look for.

Return: a boolean indicating whether or not this failed

has_focus()

Return: a boolean whether or not this window currently has focus

maximize()

Maximize the first window that we can recognize as being maximizable on the desktop–hopefully it’ll usually be the desired one. Right now we can only recognized maximized ones though, so this takes a leap of faith.

Return: True if the maximize button was clicked, False otherwise

save_state()

Save the current state of this window – assuming it is currently on top. Temporary (hopefully) restriction: the Window must be maximized.

scroll_down(times)

Click the scroll down button some number of times. – TODO there are other ways to scroll, those should also be available

Parameters:

  • times: the number of times to click the down arrow

scroll_up(times)

Click the scroll up button some number of times. – TODO there are other ways to scroll, those should also be available

Parameters:

  • times: the number of times to click the up arrow