2022-11-11, add donate and help buttong.
parent
4d22d86089
commit
b263c19fd2
|
@ -67,7 +67,7 @@ ssl._create_default_https_context = ssl._create_unverified_context
|
|||
#附註1:沒有寫的很好,很多地方應該可以模組化。
|
||||
#附註2:
|
||||
|
||||
CONST_APP_VERSION = u"MaxBot (2022.11.10)"
|
||||
CONST_APP_VERSION = u"MaxBot (2022.11.11)"
|
||||
|
||||
CONST_FROM_TOP_TO_BOTTOM = u"from top to bottom"
|
||||
CONST_FROM_BOTTOM_TO_TOP = u"from bottom to top"
|
||||
|
@ -579,10 +579,9 @@ def load_config_from_local(driver):
|
|||
firefox_service = Service(chromedriver_path)
|
||||
driver = webdriver.Firefox(service=firefox_service)
|
||||
|
||||
|
||||
time.sleep(1.0)
|
||||
#print("try to close opened tabs.")
|
||||
'''
|
||||
time.sleep(1.0)
|
||||
for i in range(1):
|
||||
close_browser_tabs(driver)
|
||||
'''
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"tixcraft": {"pass_1_seat_remaining": true, "area_auto_select": {"mode": "from top to bottom", "enable": true, "area_keyword_1": "", "area_keyword_2": "", "area_keyword": ""}, "auto_reload_coming_soon_page": true, "date_auto_select": {"enable": true, "date_keyword": "", "mode": "from top to bottom"}, "pass_date_is_sold_out": false}, "homepage1": "https://kktix.com", "homepage2": "https://tixcraft.com", "debug": false, "facebook_account": "", "browser1": "chrome", "browser2": "firefox", "kktix": {"auto_guess_options": true, "auto_fill_ticket_price": "$1,500", "answer_dictionary": "", "area_keyword": "", "auto_press_next_step_button": true, "auto_fill_ticket_number": true, "area_mode": "random", "date_keyword": ""}, "ticket_number": 2, "homepage": "https://kktix.com", "browser": "chrome"}
|
||||
{"tixcraft": {"pass_1_seat_remaining": true, "area_auto_select": {"mode": "from top to bottom", "enable": true, "area_keyword_1": "", "area_keyword_2": "", "area_keyword": "", "area_keyword_3": "", "area_keyword_4": ""}, "auto_reload_coming_soon_page": true, "date_auto_select": {"enable": true, "date_keyword": "", "mode": "from top to bottom"}, "pass_date_is_sold_out": false}, "homepage1": "https://kktix.com", "homepage2": "https://tixcraft.com", "debug": false, "facebook_account": "", "browser1": "chrome", "browser2": "firefox", "kktix": {"auto_guess_options": true, "auto_fill_ticket_price": "$1,500", "answer_dictionary": "", "area_keyword": "", "auto_press_next_step_button": true, "auto_fill_ticket_number": true, "area_mode": "random", "date_keyword": ""}, "ticket_number": 2, "homepage": "https://tixcraft.com", "browser": "chrome"}
|
30
settings.py
30
settings.py
|
@ -19,7 +19,7 @@ import sys
|
|||
import platform
|
||||
import json
|
||||
|
||||
CONST_APP_VERSION = u"MaxBot (2022.11.10)"
|
||||
CONST_APP_VERSION = u"MaxBot (2022.11.11)"
|
||||
|
||||
CONST_FROM_TOP_TO_BOTTOM = u"from top to bottom"
|
||||
CONST_FROM_BOTTOM_TO_TOP = u"from bottom to top"
|
||||
|
@ -214,6 +214,16 @@ def btn_run_clicked():
|
|||
def btn_exit_clicked():
|
||||
root.destroy()
|
||||
|
||||
def btn_donate_clicked():
|
||||
import webbrowser
|
||||
donate_url = 'https://max-everyday.com/about/#donate'
|
||||
webbrowser.open(donate_url)
|
||||
|
||||
def btn_help_clicked():
|
||||
import webbrowser
|
||||
help_url = 'https://max-everyday.com/2018/03/tixcraft-bot/'
|
||||
webbrowser.open(help_url)
|
||||
|
||||
def callbackHomepageOnChange(event):
|
||||
showHideBlocks()
|
||||
|
||||
|
@ -960,15 +970,21 @@ def MainMenu(root):
|
|||
|
||||
frame_action = Frame(root)
|
||||
|
||||
btn_run = ttk.Button(frame_action, text="Run", command=btn_run_clicked)
|
||||
btn_run = ttk.Button(frame_action, text="Run", command=btn_run_clicked, width=5)
|
||||
btn_run.grid(column=0, row=0)
|
||||
|
||||
btn_save = ttk.Button(frame_action, text="Save", command=btn_save_clicked)
|
||||
btn_save = ttk.Button(frame_action, text="Save", command=btn_save_clicked, width=5)
|
||||
btn_save.grid(column=1, row=0)
|
||||
|
||||
btn_exit = ttk.Button(frame_action, text="Exit", command=btn_exit_clicked)
|
||||
btn_exit = ttk.Button(frame_action, text="Exit", command=btn_exit_clicked, width=5)
|
||||
btn_exit.grid(column=2, row=0)
|
||||
|
||||
btn_donate = ttk.Button(frame_action, text="Donate", command=btn_donate_clicked, width=5)
|
||||
btn_donate.grid(column=3, row=0)
|
||||
|
||||
btn_help = ttk.Button(frame_action, text="?", command=btn_help_clicked, width=4)
|
||||
btn_help.grid(column=4, row=0)
|
||||
|
||||
frame_action.grid(column=0, row=row_count, sticky = W, padx=UI_PADDING_X)
|
||||
|
||||
showHideBlocks(all_layout_visible=True)
|
||||
|
@ -995,13 +1011,15 @@ def main():
|
|||
|
||||
GUI_SIZE_WIDTH = 420
|
||||
GUI_SIZE_HEIGHT = 498
|
||||
|
||||
GUI_SIZE_MACOS = str(GUI_SIZE_WIDTH) + 'x' + str(GUI_SIZE_HEIGHT)
|
||||
GUI_SIZE_WINDOWS=str(GUI_SIZE_WIDTH-60) + 'x' + str(GUI_SIZE_HEIGHT-20)
|
||||
GUI_SIZE_WINDOWS=str(GUI_SIZE_WIDTH-60) + 'x' + str(GUI_SIZE_HEIGHT-40)
|
||||
|
||||
GUI_SIZE =GUI_SIZE_MACOS
|
||||
import platform
|
||||
if platform.system() == 'Windows':
|
||||
GUI_SIZE =GUI_SIZE_WINDOWS
|
||||
GUI_SIZE = GUI_SIZE_WINDOWS
|
||||
|
||||
root.geometry(GUI_SIZE)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue