A
A
a16a2017-04-24 06:51:21
C++ / C#
a16a, 2017-04-24 06:51:21

How to run another script?

Hello.
There is a script, it works properly, it has an if condition.

if (name == "Dell"){
}

if (name == "Core"){
}

I need that if the condition "Dell" is met, then run the script (let's call it "1"). if the Core condition worked, then run the script "2"
How can this be done?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
akass, 2017-04-24
@a16a

if (name == "Dell"){
RunScript1();
}

else if (name == "Core"){
RunScript2();
}

Or
switch(name)
{
case "Core": RunScript2(); break;
case "Dell": RunScript1(); break;
}

A
Alexander, 2017-04-24
@AlexNineteen

if (name == "Dell"){
    if (name == "Core"){
    }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question