Skip to main content
Hollo1001
Participant
December 22, 2014
Answered

Execute command only at the first time?

  • December 22, 2014
  • 2 replies
  • 290 views

English:

Hi would like to take an application a particular command only at the first time run so he is no longer running for the 2nd time ! How to do that ? thanks Hollo1001

German:

Hallo möchte bei einer anwendung einen bestimmten befehl nur beim ersten mal ausführen so das er beim 2. mal nicht mehr ausgeführt wird! Wie macht man das? MFG Hollo1001

This topic has been closed for replies.
Correct answer kglad

use a boolean:

var alreadyExecuted:Boolean;

if(!alreadyExecuted){

alreadyExecuted=true;

// rest of once only code

}

2 replies

Hollo1001
Hollo1001Author
Participant
December 23, 2014

thank you :-)

kglad
Community Expert
Community Expert
December 23, 2014

you're welcome.

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
December 23, 2014

use a boolean:

var alreadyExecuted:Boolean;

if(!alreadyExecuted){

alreadyExecuted=true;

// rest of once only code

}