** Changed in: sikuli
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/644982

Title:
  [request] implement an Application class

Status in Sikuli:
  Fix Released

Bug description:
  Implement an Application class App with the following features

  myApp = App("application name/path to executable")
  creates a new App object with the following

  --- attributes
  appPath - path to the executable
  appWindows - a list containing window titles 

  --- methods
  appOpen()
   - starts a new instance of App and calls switch()
  appSwitch()
   - makes the current active window of the app instance the frontmost, if not 
running calls open() before
  appClose()
   - closes the app with all its windows and destroys the App object
      --- appSwitch() and appClose(): these methods can have a parameter, which 
represents a window title, 
      in which cases the operation is targeted at the specific window, 
      added to appWindows if success, closing a window deletes it from 
appWindows
      --- appOpen() and appSwitch() return the window title of the frontmost 
window, False in case of an error
  appGetWindow(window title)
   - returns specific information about that window (position, size, minimized, 
hidden, visible, ....). without a parm, it takes the frontmost. may return 
False. 
  appGetWindowRegion(window title)
   - convenience function: make window frontmost and return a Region object 
representing the outer bounds of the window. may return False
  appSetWindowRegion(region) 
  - tries to move/resize the frontmost window, may return False

  With this implementation, the user is responsible to identify
  additional windows of an app using switchApp(window title). Only the
  frontmost app window should be known inside automatically. No tracking
  of opening/closing app windows by the App object itself.

  the challenge:
  be able to differentiate between instances of the same application.

  based on the idea of Lance Jensen (https://launchpad.net/~lance-ti)
  in question https://answers.launchpad.net/sikuli/+question/126270
  --- Enhancement App Object:
  In my mind making an app object would be very helpful and make Silkui easier 
to use and more reliable. An app should have an executiblePath, a name handle, 
a default size varibles. It should have .start()/run() to start the program, 
.switch() to toggle it between forground or background, .size() to set to 
default size with no arguments or to a dimension if arguments are passed, and 
getCenter(). With this type of structure then I think sikuli scripts could be 
more transportable. As it is, time optimizations cost reliability and 
transportability which affects the scaling of your software.



_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to