DayZ 1.24
Loading...
Searching...
No Matches
DayZTool Class Reference
Inheritance diagram for DayZTool:
[legend]
Collaboration diagram for DayZTool:
[legend]

Private Member Functions

void RunDayZBat (string filepath, bool wait=false)
 
override void Configure ()
 
void DialogOk ()
 

Detailed Description

Definition at line 1 of file DayZTools.c.

Member Function Documentation

◆ Configure()

override void DayZTool::Configure ( )
inlineprivate

Definition at line 35 of file DayZTools.c.

36 {
37 Workbench.ScriptDialog("Mission directory", "", this);
38 }
static proto int ScriptDialog(string caption, string text, Class data)

References Workbench::ScriptDialog().

◆ DialogOk()

void DayZTool::DialogOk ( )
inlineprivate

Definition at line 41 of file DayZTools.c.

42 {
43 }

◆ RunDayZBat()

void DayZTool::RunDayZBat ( string filepath,
bool wait = false )
inlineprivate

Definition at line 3 of file DayZTools.c.

4 {
5 if (filepath.Length() < 2) return;
6
7 filepath.Replace("\\", "/");
8
9 if (filepath[1] != ":")
10 {
11 string cwd;
13 filepath = cwd + "/" + filepath;
14 }
15
16 int index = filepath.IndexOf("/");
17 int last_index = index;
18
19 while (index != -1)
20 {
22 index = filepath.IndexOfFrom(last_index + 1, "/");
23 }
24
25 if (last_index == -1) return;
26
27 string path = filepath.Substring(0, last_index);
28 string bat = filepath.Substring(last_index + 1, filepath.Length() - last_index - 1);
29 /*Print(filepath);
30 Print(path);
31 Print(bat);*/
32 Workbench.RunCmd("cmd /c \"cd " + path + " & call " + bat + "\"", wait);
33 }
static proto native int RunCmd(string command, bool wait=false)
static proto void GetCwd(out string currentDir)

References Workbench::GetCwd(), path, and Workbench::RunCmd().


The documentation for this class was generated from the following file: