← Back to team overview

sikuli-driver team mailing list archive

[Bug 1221048] [NEW] [request] get the window title of frontmost/focused window

 

Public bug reported:

Hello, in my script, I want to check a specified window is opened or not.
Unfortunately, there would be several applications opening and their titles may be very similar.
Like:
Application 1's title: (variable user name) - Purkinje|Dossier - Dashboard
Application 2's title: (variable user name) - Purkinje|Dossier
Application 3's title: Purkinje|Dossier Registration

So it's not able to distinguish them by using screenshots, especially
the Application 2.


I know:

switchApp(application)
Switch to the specified application.
Parameters: application – the name of an application (case-insensitive) or (part of) a window title (Windows/Linux). 

I am wondering that can I use Sikuli to get a specified application's window title and print it out?
For example, if there is a notepad opened and its window title is "Untitled - Notepad", can I get it by using something switchApp(application) used?

I also noticed https://answers.launchpad.net/sikuli/+question/204514 but
Region.text() is still in an experimental state.

Something using CPython can do that.
However, I don't want to install too many things so that I don't want to use CPython.

Excuse me, is there a way to use Sikuli to get a window title please?
Thank you.

** Affects: sikuli
     Importance: Medium
     Assignee: RaiMan (raimund-hocke)
         Status: In Progress

** Changed in: sikuli
       Status: New => In Progress

** Changed in: sikuli
   Importance: Undecided => Medium

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
    Milestone: None => 1.1.0

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

Title:
  [request] get the window title of frontmost/focused window

Status in Sikuli:
  In Progress

Bug description:
  Hello, in my script, I want to check a specified window is opened or not.
  Unfortunately, there would be several applications opening and their titles may be very similar.
  Like:
  Application 1's title: (variable user name) - Purkinje|Dossier - Dashboard
  Application 2's title: (variable user name) - Purkinje|Dossier
  Application 3's title: Purkinje|Dossier Registration

  So it's not able to distinguish them by using screenshots, especially
  the Application 2.

  
  I know:

  switchApp(application)
  Switch to the specified application.
  Parameters: application – the name of an application (case-insensitive) or (part of) a window title (Windows/Linux). 

  I am wondering that can I use Sikuli to get a specified application's window title and print it out?
  For example, if there is a notepad opened and its window title is "Untitled - Notepad", can I get it by using something switchApp(application) used?

  I also noticed https://answers.launchpad.net/sikuli/+question/204514
  but Region.text() is still in an experimental state.

  Something using CPython can do that.
  However, I don't want to install too many things so that I don't want to use CPython.

  Excuse me, is there a way to use Sikuli to get a window title please?
  Thank you.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1221048/+subscriptions


Follow ups

References