diff options
author | AL-LCL <alvin@alvinhavel.com> | 2023-05-19 11:06:25 +0200 |
---|---|---|
committer | AL-LCL <alvin@alvinhavel.com> | 2023-05-19 11:06:25 +0200 |
commit | 18a3d3bc354e667bc58385e59745b82b53695139 (patch) | |
tree | fef56722868ae768b16382aae2f3559ec4bbf370 /Utilities/client.py |
Diffstat (limited to 'Utilities/client.py')
-rw-r--r-- | Utilities/client.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Utilities/client.py b/Utilities/client.py new file mode 100644 index 0000000..7b004ad --- /dev/null +++ b/Utilities/client.py @@ -0,0 +1,27 @@ +import webbrowser +import ctypes + + +def show_message(title, text, style): + if style == 1: + style = 16 + elif style == 2: + style = 32 + elif style == 3: + style = 48 + elif style == 4: + style = 64 + else: + style = 0 + ctypes.windll.user32.MessageBoxW(0, text, title, style) + + +def open_browser(data): + urls = data.split(',') + + for url in urls: + if 'http://' in url or 'https://' in url: + pass + else: + url = 'https://' + url + webbrowser.open(url, new=2)
\ No newline at end of file |