Skip to content

Commit

Permalink
Alpha 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
justinlin099 committed May 21, 2022
1 parent 4c7e87e commit ef2232a
Show file tree
Hide file tree
Showing 17 changed files with 24,910 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ControlMyMonitor.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ DisplayReadWrite=1
DisplayReadOnly=1
DisplayWriteOnly=1
DisplayManufacturerSpecific=1
WinPos=2C 00 00 00 00 00 00 00 01 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 79 01 00 00 BD 00 00 00 19 07 00 00 B4 03 00 00
WinPos=2C 00 00 00 00 00 00 00 01 00 00 00 00 83 FF FF 00 83 FF FF FF FF FF FF FF FF FF FF CB F8 FF FF B8 00 00 00 6B FE FF FF AF 03 00 00
Columns=96 00 00 00 FA 00 01 00 96 00 02 00 96 00 03 00 96 00 04 00 FA 00 05 00
Sort=0
10 changes: 7 additions & 3 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
from tkinter import *
import ttkbootstrap as ttk
from ttkbootstrap.constants import *
import os
from functools import partial
import os
import subprocess

#隱藏黑窗
CREATE_NO_WINDOW = 0x08000000

#套用樣式
controlPanel = ttk.Window(themename="cyborg")
Expand Down Expand Up @@ -47,7 +51,7 @@ def withdraw_window():
#切換輸入

def selectInput(monitorString , inputValue):
os.system("ControlMyMonitor.exe /SetValue " + monitorString + " 60 "+inputValue)
subprocess.call("ControlMyMonitor.exe /SetValue " + monitorString + " 60 "+inputValue, creationflags=CREATE_NO_WINDOW)
print("ControlMyMonitor.exe /SetValue " + monitorString + " 60 "+inputValue)


Expand All @@ -56,7 +60,7 @@ def selectInput(monitorString , inputValue):
#掃描螢幕

def scanMonitor():
os.system("ControlMyMonitor.exe /smonitors smonitors.txt")
subprocess.call("ControlMyMonitor.exe /smonitors smonitors.txt", creationflags=CREATE_NO_WINDOW)
file = open('smonitors.txt', 'r',encoding="utf-16 le")

MonitorList = file.readlines()
Expand Down
44 changes: 44 additions & 0 deletions Main.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- mode: python ; coding: utf-8 -*-


block_cipher = None


a = Analysis(
['Main.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='Main',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
Loading

0 comments on commit ef2232a

Please sign in to comment.