Hi,
ich hab da nen script in dem ich per gui auswählen kann wie viele weitere scripte gestartet werden solln, max sind 12 scripte.
so habe auch ein Pause und exit button. wenn ich auf pause drücke solln alle scripte bis auf das hauptscript beendet werden klappt auch ganz gut bis auf 1 script das komische ist das es immer das gleiche script ist was nicht beendet wird. Rechstschreibfehler hab ich schon überprüft aber nigs gefunden vllt könnt ihr mir helfen.
egal ob 4-Client-PT.exe oder 4-Client.exe diese werden nicht beendet
fals ihr ne bessere möglichkeit habt die processe zu beenden dann bin ich offen dafür
Spoiler anzeigen
Func _Pause()
SoundPlay(@ScriptDir & "\data\paused.wav",0)
$PID1 = ProcessExists("1-Client-PT.exe")
$PID2 = ProcessExists("2-Client-PT.exe")
$PID3 = ProcessExists("3-Client-PT.exe")
$PID4 = ProcessExists("4-Client-PT.exe")
$PID5 = ProcessExists("5-Client-PT.exe")
$PID6 = ProcessExists("6-Client-PT.exe")
$PID7 = ProcessExists("7-Client-PT.exe")
$PID8 = ProcessExists("8-Client-PT.exe")
$PID9 = ProcessExists("9-Client-PT.exe")
$PID10 = ProcessExists("10-Client-PT.exe")
$PID11 = ProcessExists("11-Client-PT.exe")
$PID12 = ProcessExists("12-Client-PT.exe")
$PID13 = ProcessExists("1-Client.exe")
$PID14 = ProcessExists("2-Client.exe")
$PID15 = ProcessExists("3-Client.exe")
$PID16 = ProcessExists("4-Client.exe")
$PID17 = ProcessExists("5-Client.exe")
$PID18 = ProcessExists("6-Client.exe")
$PID19 = ProcessExists("7-Client.exe")
$PID20 = ProcessExists("8-Client.exe")
$PID21 = ProcessExists("9-Client.exe")
$PID22 = ProcessExists("10-Client.exe")
$PID23 = ProcessExists("11-Client.exe")
$PID24 = ProcessExists("12-Client.exe")
If $PID1 Or $PID2 Or $PID3 Or $PID4 Or $PID5 Or $PID6 Or $PID7 Or $PID8 Or $PID9 Or $PID10 Or $PID11 Or $PID12 Or $PID13 Or $PID14 Or $PID15 Or $PID16 Or $PID17 Or $PID18 Or $PID19 Or $PID20 Or $PID21 Or $PID22 Or $PID23 Or $PID24 Then
ProcessClose($PID1)
ProcessClose($PID2)
ProcessClose($PID3)
ProcessClose($PID4)
ProcessClose($PID5)
ProcessClose($PID6)
ProcessClose($PID7)
ProcessClose($PID8)
ProcessClose($PID9)
ProcessClose($PID10)
ProcessClose($PID11)
ProcessClose($PID12)
ProcessClose($PID13)
ProcessClose($PID14)
ProcessClose($PID15)
ProcessClose($PID16)
ProcessClose($PID17)
ProcessClose($PID18)
ProcessClose($PID19)
ProcessClose($PID20)
ProcessClose($PID21)
ProcessClose($PID22)
ProcessClose($PID23)
ProcessClose($PID24)
ToolTip('Script is "Paused". END to close Script',0,0)
EndIf
EndFunc