- Aug
- 30
- 0
I have five btm scripts in my Startup directory to manage when certain applications, like Windows Task Manager and my file manager, start up. I use Message Boxes to put their starts on hold to allow the rest of Windows to settle down before they start. I just prefer doing it like that over having one big jumbled-up start-up.
Most of the scripts include aliases in front of the msgbox command, and they work fine 99% of the time. But, occasionally I get an error that one of the aliases doesn't exist. The error is random between which script it happens to and on which line it happens. I source a separate alias/functions file in my tcstart.btm file, and apparently the aliases haven’t "loaded" by the time the unlucky script is executed during the start-up.
I put delays in two of the scripts this was happening to regularly, but now it's also happening to another one. Is there a proper way to test for when my separate alias/functions file is loaded before a script is allowed to proceed beyond that point the test into the substantive stuff?
I don't want to have to test for the existence of every alias before I execute it, and using delays is a sorry work-around which may still not work even though I've staggered the delay times. I thought about putting a "test" alias at the end of my a/f file and just test if it exists, but I can't create a suitable test environment to test the test in.
Thanks –
Newbie
Most of the scripts include aliases in front of the msgbox command, and they work fine 99% of the time. But, occasionally I get an error that one of the aliases doesn't exist. The error is random between which script it happens to and on which line it happens. I source a separate alias/functions file in my tcstart.btm file, and apparently the aliases haven’t "loaded" by the time the unlucky script is executed during the start-up.
I put delays in two of the scripts this was happening to regularly, but now it's also happening to another one. Is there a proper way to test for when my separate alias/functions file is loaded before a script is allowed to proceed beyond that point the test into the substantive stuff?
I don't want to have to test for the existence of every alias before I execute it, and using delays is a sorry work-around which may still not work even though I've staggered the delay times. I thought about putting a "test" alias at the end of my a/f file and just test if it exists, but I can't create a suitable test environment to test the test in.
Thanks –
Newbie