← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #245998]: Interesting Observation using Try to close window.

 

Question #245998 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/245998

Description changed to:
This is more of an observation than a question. While learning Siluli I
am tryng many things. Today I put in some tearodown code that works to
close out a cmd launch window.  It works fine, but when I run it and the
cmd window is already closed - it will highlight the last window that
was active.  It will not close that window, just highlight it.
Interesting... I would think tha the highlight would not activate since
the region could not be defined.

I am running Win7 Enterprise SP1.

def someDef()
        try:
            wTCRC = App("My Rich Client Launcher").focus()  #This is a cmd window that was used
                                                                                  # to launch the rich client.
            rTCRC = Region(App.focusedWindow()) 
            rTCRC.highlight(2)  #If launcher is already closed the last active window is highlighted. 
            App.close(wTCRC)
        except:
            pass

someDef

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.