athrvvvv / AppOpener

Python library to open/close applications in windows.
https://appopener.readthedocs.io/en/latest/
MIT License
18 stars 7 forks source link

About AppNotFound except #17

Closed Dannybobo closed 1 year ago

Dannybobo commented 1 year ago

Hi, here is my code try: open("netflix", throw_error=True) except AppNotFound as e: wb.open_new_tab('https://www.netflix.com/tw/')

I think, when netflix app is not open, it will raise some exception like AppNotFound, but it didn't work, if I write the wrong code to use this function, please show me the right way, thanks.

athrvvvv commented 1 year ago

Actually there is no thing as AppNotFound in AppOpener till now.

Try this:

from AppOpener import open

try:
    open("netflix", throw_error=True)
except:
    wb.open_new_tab('https://www.netflix.com/tw/')