Comments (4)
I could add something similar before this line of code to check for the YgoMaster.exe
process and launch it if it doesn't exist. I'll look at doing that for the next update.
YgoMaster/YgoMasterClient/Program.cs
Line 54 in 7b5e3ec
from ygomaster.
OK, thanks :)
from ygomaster.
It would be more convenient if YgoMasterClient.exe would start YgoMaster.exe automatically if it's not already running.
I wrote this batch script for that:
@echo off C: cd\Program Files (x86)\Steam\SteamApps\common\Yu-Gi-Oh! Master Duel\Build tasklist /fi "imagename eq YgoMaster.exe" |find ":" > nul if not errorlevel 1 start "YGO Master" /B YgoMaster.exe tasklist /fi "imagename eq YgoMasterClient.exe" |find ":" > nul if not errorlevel 1 start "YGO Master Client" /B YgoMasterClient.exe
Same scenario, my friends and I struggling of opening 2 executables to run the Offline YGO, I wrote also mine 2 weeks ago that can launch both executables, and when closed the other one will close also. because my friends are just asking me since they lack of knowledge in this kind of topic, we will gladly appreciate for implementing it on your next update
@echo off
mode con: cols=97 lines=21
echo Offline Yu-Gi-Oh! Master Duel Game Launcher
timeout 3 >nul
cls
echo Checks if the Offline Server Console is already running.
tasklist /nh /fi "imagename eq YgoMaster.exe" | find /i "YgoMaster.exe" >nul
if not errorlevel 1 cls && echo It seems that the Offline Yu-Gi-Oh! Master Duel is improperly closed in it's last session. && timeout 2 >nul && cls && echo The Offline Server Console is running! && timeout 2 >nul && goto RestartIt
timeout 1 >nul
cls
echo Checks if the Offline Server Console is already running..
tasklist /nh /fi "imagename eq YgoMaster.exe" | find /i "YgoMaster.exe" >nul
if not errorlevel 1 cls && echo It seems that the Offline Yu-Gi-Oh! Master Duel is improperly closed in it's last session. && timeout 2 >nul && cls && echo The Offline Server Console is running! && timeout 2 >nul && goto RestartIt
timeout 1 >nul
cls
goto ItsNotRunning
:ItsNotRunning
cls
echo Nope!
timeout 2 >nul
cls
goto LaunchIt
:LaunchIt
cls
echo The Offline Yu-Gi-Oh! Master Duel is gonna start.
timeout 1 >nul
cls
echo The Offline Yu-Gi-Oh! Master Duel is gonna start..
timeout 1 >nul
cls
echo Launching the Offline Server Console.
start /min YgoMaster.exe
timeout 1 >nul
cls
echo Launching Offline Yu-Gi-Oh! Master Duel.
start YgoMasterClient.exe
timeout 1 >nul
cls
goto Waiting
:Waiting
cls
echo Gonna wait for Offline Yu-Gi-Oh! Master Duel to be launched properly before monitoring it.
timeout 1 >nul
tasklist /nh /fi "imagename eq masterduel.exe" | find /i "masterduel.exe" >nul
if not errorlevel 1 goto WatchIt
cls
echo Gonna wait for Offline Yu-Gi-Oh! Master Duel to be launched properly before monitoring it..
timeout 1 >nul
tasklist /nh /fi "imagename eq masterduel.exe" | find /i "masterduel.exe" >nul
if not errorlevel 1 goto WatchIt
cls
echo Gonna wait for Offline Yu-Gi-Oh! Master Duel to be launched properly before monitoring it...
timeout 1 >nul
tasklist /nh /fi "imagename eq masterduel.exe" | find /i "masterduel.exe" >nul
if not errorlevel 1 goto WatchIt
cls
goto Waiting
:WatchIt
cls
echo Monitoring Offline Yu-Gi-Oh! Master Duel if it's being closed by the user.
tasklist /nh /fi "imagename eq masterduel.exe" | find /i "masterduel.exe" >nul
if errorlevel 1 cls && echo It seems that Offline Yu-Gi-Oh! Master Duel is being closed by the user && timeout 2 >nul && goto KillIt
timeout 1 >nul
cls
echo Monitoring Offline Yu-Gi-Oh! Master Duel if it's being closed by the user..
tasklist /nh /fi "imagename eq masterduel.exe" | find /i "masterduel.exe" >nul
if errorlevel 1 cls && echo It seems that Offline Yu-Gi-Oh! Master Duel is being closed by the user && timeout 2 >nul && goto KillIt
timeout 1 >nul
cls
echo Monitoring Offline Yu-Gi-Oh! Master Duel if it's being closed by the user...
tasklist /nh /fi "imagename eq masterduel.exe" | find /i "masterduel.exe" >nul
if errorlevel 1 cls && echo It seems that Offline Yu-Gi-Oh! Master Duel is being closed by the user && timeout 2 >nul && goto KillIt
timeout 1 >nul
cls
if not errorlevel 1 goto WatchIt
:KillIt
cls
echo Terminating the Offline Server Console.
timeout 1 >nul
cls
echo Terminating the Offline Server Console..
timeout 1 >nul
taskkill /im YgoMaster.exe /f >nul
tasklist /nh /fi "imagename eq YgoMaster.exe" | find /i "YgoMaster.exe" >nul
cls
if errorlevel 1 echo The Offline Server Console is properly terminated! && timeout 2 >nul && goto Termination
if not errorlevel 1 echo The Offline Server Console is still running! && timeout 2 >nul && goto KillIt
:RestartIt
cls
echo Restarting the Offline Server Console.
timeout 1 >nul
cls
echo Restarting the Offline Server Console..
timeout 1 >nul
cls
taskkill /im YgoMaster.exe /f >nul
tasklist /nh /fi "imagename eq YgoMaster.exe" | find /i "YgoMaster.exe" >nul
cls
if errorlevel 1 echo The Offline Server Console is properly restarted! && timeout 2 >nul && cls && echo Restarting the Launcher. && timeout 1 >nul && cls && echo Restarting the Launcher.. && timeout 1 >nul && cls && goto LaunchIt
if not errorlevel 1 echo The Offline Server Console is still running! && timeout 2 >nul && goto RestartIt
:Termination
cls
echo The Game Launcher is going to end.
timeout 1 >nul
cls
echo The Game Launcher is going to end..
timeout 1 >nul
cls
exit
from ygomaster.
Added in v1.5 (commit fe9aa11). It will auto run YgoMaster.exe when you run YgoMasterClient.exe. Currently this isn't done as a sub process so YgoMaster wont auto close when YgoMasterClient closes. I might eventually change this logic, but for now it stays as is.
from ygomaster.
Related Issues (20)
- How to add datamined cards? HOT 1
- New Solo Mode Update HOT 1
- linking to konami HOT 1
- Anyone else having an issue with Impermanence freezing up the game? HOT 4
- Select random deck on duel HOT 2
- Latest missing-cards.txt HOT 2
- Controller Help HOT 1
- Auto update as the live game HOT 2
- play with a friend through hamachi HOT 1
- Chinese language HOT 1
- [Request] Best of three duels HOT 1
- Update CardList HOT 3
- Is it possibile to DIY cards? HOT 1
- can't select go first or second HOT 4
- matserduel deck edit endpoint. HOT 1
- The steam file location HOT 1
- Can't launch after Nov 9 update on live game HOT 18
- All cards are banned when disabling banlist HOT 8
- error message at "press start" screen HOT 4
- Carddata error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ygomaster.