-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpideyPC_starting_script.bat
More file actions
60 lines (40 loc) · 1.69 KB
/
SpideyPC_starting_script.bat
File metadata and controls
60 lines (40 loc) · 1.69 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@echo off
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::: Configs
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Please set nircmd path properly
set nircmd_path=C:\Speedrun\__Utilities\nircmd-x64\nircmdc.exe
set sleep_time=5 & :: Default: 5 seconds
set "set_volume=true" & :: Default: true
set volume=0.10 & :: Default: 0.10
set "set_position=true" & :: Default: true
:: These values will be ignored if "CenterAppWindow = true" in dgVoodoo.conf
set position_x=320 & :: Default: 320
set position_y=30 & :: Default: 30
:: These values are only needed because the nircmd command to set the window position also needs
:: two values for width and height.
:: The settings in dgVoodoo.conf will be used for the resolution
set window_width=1280 & :: Default: 1280
set window_height=960 & :: Default: 960
set "keep_window_open=false" & :: Default: false
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::: Script
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
for /f "tokens=6" %%f in ('powershell Start-Process SpideyPC.exe -passthru') do (
set ppid=%%f
)
timeout /T %sleep_time% /nobreak
echo pid=%ppid%
if "%set_volume%" == "true" (
echo Volume = %volume%
%nircmd_path% setappvolume /%ppid% %volume%
)
if "%set_position%" == "true" (
echo Setting window position:
echo x = %position_x%
echo y = %position_y%
%nircmd_path% win setsize process /%ppid% %position_x% %position_y% %window_width% %window_height%
)
if "%keep_window_open%" == "true" (
%PAUSE
)