-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauto.py
More file actions
27 lines (19 loc) · 665 Bytes
/
auto.py
File metadata and controls
27 lines (19 loc) · 665 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import webbrowser
import os
# This will open new browser if possible or
# open a new tab with specified url.
# Enter one or more urls below to open them.
# I mostly use stackoverflow and google :)
class browser:
url = "http://stackoverflow.com"
urlSecond = "https://www.google.com"
webbrowser.open_new(url)
webbrowser.open_new(urlSecond)
# This opens an .exe file, you need to enter
# a ful path to program dir.
# Enter full path to your program dir to
# automatically open it.
# Python will convert forward-slashed to backslashes on Windows.
def start_prog():
filepath = "C:/Full/path/to_program/program.exe"
os.startfile(filepath)