Jump to content

Have 2 While 1 Loops going at the same time


Recommended Posts

Is it possible to have two While 1 (loops) going at the same time looking for $MSG? I am trying to have my tray menu ping a IP address every so often using Sleep() while still being able to click on other TrayMenuItems. Because of the way my script is coded I am not nor (do I think) I can use the OnEventMode.

Thanks for any help provided.

GoogleDude

Link to comment
Share on other sites

Damn. Thats why I thought. The only way I just thought of (Maybe, Im about to try it) is to have one of the While Loops running in a different compiled script/processes. I just hope that I can have a $var be read from across 2 different scripts if I make them a Global.

Thanks for the help.

GoogleDude

Edited by GoogleDude
Link to comment
Share on other sites

Can $vars be read from across 2 scripts if they are compiled or compiled? If so how can I call a uncompiled script? I know how to RUN() a process but not a #include script.

Il have my main traymenu just call the other script where the other script simply pings an IP and sets a $var based on weather or not the ping was good or not, then have my main tray manu do somthing if the $var is true otherwise the main tray menu will just loop while the other script also loops a ping().

Make sense?

GoogleDude

Edited by GoogleDude
Link to comment
Share on other sites

The tray menu cannot be updated while its open even if you could share variables across scripts. If you only need the tray to be updated each time you click on the tray icon, then you can do this with one script.

Edited by weaponx
Link to comment
Share on other sites

Well since I cant share $vars across scripts I guess I will just use the windows registry to write the ping status from one script and read the reg entry from the main script to determine what should be done.

I think this should be a sudo work around that should work.

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...