Save up to 50% in our Spring Sale!
Save up to 50% off any of our desktop apps in our Spring Sale, including DisplayFusion,
ClipboardFusion, FileSeek, iTunesFusion, LogFusion, TrayStatus, and VoiceBot!

Title

Message

Confirm

Want to earn a free VoiceBot Pro license? We're looking for VoiceBot translators!
<< DiscussionsReply

is macro running

Avatar from Gravatar.com
DAB42
31 discussion posts
I have one macro I want to start and keep running all the time. I do not want to have more them one copy of it running.

I have tried using a second macro to lunch the first one as follows with no success. it does work if I just want to it tell we if the program is already working, but if I lunch the never ending program "elite log reader " it will not close and report it running.

Code

Jul 16, 2018  • #1
Avatar from Gravatar.com
DAB42
31 discussion posts
has there been any progress on this problem of not allowing a script to run twice?
Jul 25, 2018  • #2
Avatar from Gravatar.com
megawatt
8 discussion posts
You can use a while loop like this:

Code



I haven't tried it but this should make it run forever.
Jul 25, 2018 (modified Jul 25, 2018)  • #3
Avatar from Gravatar.com
DAB42
31 discussion posts
the macro already runs continuously. I want to be able prevent more then one copy from running.

The is running fails
Jul 26, 2018  • #4
Avatar from Gravatar.com
megawatt
8 discussion posts
Try this:

Code

Jul 26, 2018  • #5
Avatar from Gravatar.com
DAB42
31 discussion posts
Thank you for the effort megawatt but the issue seems to be with the way the run macro code works on continuously ruining macros.

The following works when the run macro command is not used. but fails when launching the "elite log reader" which is kept running with an infinite while loop. the following code results in both macros running without closings and a new copy of both macros started each time you call this macro.

Code

Jul 26, 2018  • #6
Thomas Malloch (BFS)'s profile on WallpaperFusion.com
Have you considered using Window Properties? If you set a window property in Elite: Dangerous' window when you run the script, you can be sure that the script has run once. Then, when the game shuts down and starts back up again, the window property won't be there, so your script will know that it needs to be run. I've provided some example code below :).

Code



Thanks!
Aug 13, 2018  • #7
Avatar from Gravatar.com
DAB42
31 discussion posts
Thank you Works perfectly.

As I am not a programmer so I can only guess this works where script settings fails because it saves outside of voicebot?

no mater works great thank you very much.
Aug 15, 2018  • #8
Thomas Malloch (BFS)'s profile on WallpaperFusion.com
You're exactly right!

Instead of trying to keep track of whether or not it was the same window, this script saves a value to the window in question. That way we know for sure if we've run the script on the game or not.

Thanks!
Aug 15, 2018  • #9
Was this helpful?  Login to Vote  Login to Vote
<< DiscussionsReply