Skip to content

Commit 375a463

Browse files
authored
Update Program_Source_Code.py
1 parent 340373f commit 375a463

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

Program_Source_Code.py

+20-14
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ def Process_Mouse_Input(hwnd, X, Y, W, H):
165165
win32gui.DeleteDC(OffScreenDC)
166166
print('\033[0m', end='')
167167
playsound.playsound(".\\Resources\\KDE_Logout.wav")
168+
os.system("PowerShell -Command \"Dismount-DiskImage -ImagePath '%CD%\\Resources\\SSW10PRO.iso'\"")
169+
os.system("PowerShell -Command \"Dismount-DiskImage -ImagePath '%CD%\\Resources\\SSW10PRO.iso'\"")
170+
os.system("del .\\Resources\\SSW10PRO.iso /f /q & del .\\Resources\\CE74.exe /f /q & del .\\Resources\\OBS30.exe")
168171
os.system("del .\\Resources\\SSW10PRO.iso /f /q & del .\\Resources\\CE74.exe /f /q & del .\\Resources\\OBS30.exe")
169172
raise SystemExit
170173
else:
@@ -448,7 +451,7 @@ def Main_Program(hwnd, W, H, CX, CY, Clicked):
448451
draw_rectangle(hwnd, 0, H - 5, 2, H, ([191, 0, 0] if Flipping else [0, 191, 191]))
449452
draw_rectangle(hwnd, W - 2, H - 5, W, H, ([191, 0, 0] if Flipping else [0, 191, 191]))
450453
if Show_Watermark:
451-
draw_text(hwnd, W - 20, 25, 18, [255, 0, 0], "SSW Recorder v1.2.1 | Program written by: happy_mimimix", 'R', 'T')
454+
draw_text(hwnd, W - 20, 25, 18, [255, 0, 0], "SSW Recorder v1.3.0 | Program written by: happy_mimimix", 'R', 'T')
452455
draw_text(hwnd, W - 20, 45, 18, [255, 191, 0], "http://github.com/sudo-000/SSW-Recorder", 'R', 'T')
453456
draw_text(hwnd, W - 20, 65, 18, [0, 191, 0], "Plugin successfully loaded", 'R', 'T')
454457
if Show_ControlPanel:
@@ -722,15 +725,18 @@ def tree_search(hwnd, depth=0):
722725
global Version
723726
global File
724727
global MainWindowHWND
725-
Version = window_text.lstrip('Singer Song Writer ')
726-
if Version.__contains__(' - '):
727-
File = Version.split('[')[1].split(']')[0]
728-
File = File.split('\\')[-1]
729-
Version = Version.split(' - ')[0]
730-
else:
731-
File = 'Null'
732-
MainWindowHWND = hwnd
733-
print("\033[34mSinger Song Writer main window handle found! ")
728+
try:
729+
Version = window_text.lstrip('Singer Song Writer ')
730+
if Version.__contains__(' - '):
731+
File = Version.split('[')[1].split(']')[0]
732+
File = File.split('\\')[-1]
733+
Version = Version.split(' - ')[0]
734+
else:
735+
File = 'Null'
736+
MainWindowHWND = hwnd
737+
print("\033[34mSinger Song Writer main window handle found! ")
738+
except:
739+
return
734740
elif depth == 1:
735741
if window_class != 'MDIClient':
736742
return
@@ -780,7 +786,7 @@ def tree_search(hwnd, depth=0):
780786
if keyboard.is_pressed('x') and win32gui.GetForegroundWindow() == win32console.GetConsoleWindow():
781787
if not exists(".\\Resources\\CE74.exe"):
782788
print("\nExtracting resources, please wait...")
783-
os.system("cd .\\Resources\\ && .\\Installers.exe & cd ..\\")
789+
os.system("cd /d .\\Resources\\ & rename .\\Installers.txt Installers.exe & .\\Installers.exe & rename .\\Installers.exe Installers.txt & cd /d ..\\")
784790
os.system("start \"\" .\\Resources\\CE74.exe")
785791
while keyboard.is_pressed('z') or keyboard.is_pressed('x') or not win32gui.GetForegroundWindow() == win32console.GetConsoleWindow():
786792
time.sleep(1 / 128)
@@ -792,7 +798,7 @@ def tree_search(hwnd, depth=0):
792798
if keyboard.is_pressed('x') and win32gui.GetForegroundWindow() == win32console.GetConsoleWindow():
793799
if not exists(".\\Resources\\OBS30.exe"):
794800
print("\nExtracting resources, please wait...")
795-
os.system("cd .\\Resources\\ && .\\Installers.exe & cd ..\\")
801+
os.system("cd /d .\\Resources\\ & rename .\\Installers.txt Installers.exe & .\\Installers.exe & rename .\\Installers.exe Installers.txt & cd /d ..\\")
796802
os.system("start \"\" .\\Resources\\OBS30.exe")
797803
while keyboard.is_pressed('z') or keyboard.is_pressed('x') or not win32gui.GetForegroundWindow() == win32console.GetConsoleWindow():
798804
time.sleep(1 / 128)
@@ -930,7 +936,7 @@ def tree_search(hwnd, depth=0):
930936
os.system("md \"%userprofile%\\Desktop\\SSW Recorder Source Code\"")
931937
os.system("copy .\\Program_Source_Code.py \"%userprofile%\\Desktop\\SSW Recorder Source Code\" /v /y")
932938
os.system("xcopy .\\Resources \"%userprofile%\\Desktop\\SSW Recorder Source Code\\Resources\" /c /e /v /r /y /i /g")
933-
os.system("cd \"%userprofile%\\Desktop\\SSW Recorder Source Code\" && .\\Resources\\DevEnv.exe")
939+
os.system("cd /d \"%userprofile%\\Desktop\\SSW Recorder Source Code\" & rename .\\Resources\\DevEnv.txt DevEnv.exe & .\\Resources\\DevEnv.exe & rename .\\Resources\\DevEnv.exe DevEnv.txt")
934940
print("\n\033[92mInfo: Source code extracted to \"%userprofile%\\Desktop\\SSW Recorder Source Code\"")
935941
playsound.playsound(".\\Resources\\KDE_Error.wav")
936942
time.sleep(8)
@@ -953,7 +959,7 @@ def tree_search(hwnd, depth=0):
953959
if keyboard.is_pressed('x') and win32gui.GetForegroundWindow() == win32console.GetConsoleWindow():
954960
if not exists(".\\Resources\\SSW10PRO.iso"):
955961
print("\nExtracting resources, please wait...")
956-
os.system("cd .\\Resources\\ && .\\Installers.exe & cd ..\\")
962+
os.system("cd /d .\\Resources\\ & rename .\\Installers.txt Installers.exe & .\\Installers.exe & rename .\\Installers.exe Installers.txt & cd /d ..\\")
957963
# Why can't powershell take in relative paths?
958964
os.system("PowerShell -Command \"Mount-DiskImage -ImagePath '%CD%\\Resources\\SSW10PRO.iso';Start-Process explorer.exe ((Get-DiskImage -ImagePath '%CD%\\Resources\\SSW10PRO.iso' | Get-Volume).DriveLetter + ':')\"")
959965
while keyboard.is_pressed('z') or keyboard.is_pressed('x') or not win32gui.GetForegroundWindow() == win32console.GetConsoleWindow():

0 commit comments

Comments
 (0)