Asked — Edited
Resolved Resolved by thetechguru!

Is There A Way To Check If A Script Is Currently Running

I'm almost done with my project of a robot capable to find its way accros my apt to its docking station!

Now I however would need to know if it is possible to condition a behavior to a currently running script such as this :

if($scriptisrunning=1) action else...

thanks


ARC Pro

Upgrade to ARC Pro

ARC Pro is more than a tool; it's a creative playground for robot enthusiasts, where you can turn your wildest ideas into reality.

#1  

Answering from my phone without ARC open, so there very well may be a better way or built in function, but you could have each script you want to monitor set a variable at startup and change or clear that variable at stop, then the script that is checking to see if it us running just needs to check the contents of the variable.

Alan

#3  

Set and clear the variable is a great idea! thanks @thetechguru

@JustinRatliff, what is Alan's method?

Thanks,

Here is a video of my robot finding its way across my apt! Finally did it.

youtu.be/6r69ONP8yQQ

#4  

I am Alan, so he was agreeing with me :)

Great to see the navigation worked. Now I just need to convince my wife that glyphs and qr codes are decorative :)

Alan

#5  

@elfege - Alan's method is what you said was a great idea and thanked him for.
Alan = thetechguru

That made me smile though, like "Alan's method" was the name something specific...I guess it is now! Hench forth, it's "Alan's method"! :)

@thetechguru - you have the title of your first robot book, he he :)

#6  

Well... I changed of wife since the first time we talked. Was easier than trying to convince her!