F
fitwell
Hi, R.L., hope you catch this msg <g>.
There is one other task that I think AI would be suited for, but I
don't know where to begin to start coding it up. You gave us a backup
program that we'd not been able to find in the available freewares.
LittleBackerUpper is such a great program that I know asking about
this concern is best idea.
I have a multi-launching bat file to launch one or more of my
instances for my Agent newsreader. Having a set launcher just was no
good as I don't open them all, or combination thereof, with any
regularity or consistency. I needed to be able to do this but could
never get the batch coding right. A lot of help in the ng proved that
there seemed to be nothing suitable or easy to use in freeware.
Ultimately, it was all coded for me by a wonderfully generous person,
Todd Vargo.
After working with AI and the script helper, I realize why I can never
get ahead with bat writing, there just aren't enough resources out
there to help. If you want to wade 3 hours for every snippet of code
you manage to unearth online, sure, but it's just not a practical
direction to go for anything beyond the basics. Although basics work
quite well in many cases.
But I think I could get somewhere with AI. But I don't know where to
begin to start with the GUI angle.
But meanwhile, here's the bat that works exceptionally well. I
substituted some standard Windows programs so that anyone trying it
out can see the purpose of a multi-launching bat. So a multi-launcher
is one of those things that does need creating as a windows app, I
feel.
Here's the bat:
***************************************
:: Was PizzaMenu.bat, posted in newsgroup alt.msdos.batch
:: Written by Todd Vargo in Windows 98 on Sep 23, 2003
:: Modified by Todd Vargo on Sep 25, 2003 for personalized usage
echo off
if GOTO:==%1 %1%2 (Subroutine Handler)
for %%? in (a b c d e f g h i j k l m) do set %%?=_
:menu
cls
echo
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º AGENT INSTANCES TO LAUNCH
º
echo
ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
echo º A. [%a%] - Launch Paint
º
echo º B. [%b%] - Launch Notepad
º
echo º C. [%c%] - Launch WordPad
º
echo º D. [%d%] - Launch calculator
º
echo º E. [%e%] - (empty)
º
echo º F. [%f%] - (empty)
º
echo º G. [%g%] - (empty)
º
echo º H. [%h%] - (empty)
º
echo º I. [%i%] - (empty)
º
echo º J. [%j%] - (empty)
º
echo º K. [%k%] - (empty)
º
echo º L. [%l%] - (empty)
º
echo º M. [%m%] - (empty)
º
echo º
º
echo º Q. QUIT - changed your mind? Just Quit.
º
echo º
º
echo º X. Start launch process.
º
echo
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo. If you change your mind about a selection, press the key
echo. again to toggle it off.
echo.
CHOICE /C:ABCDEFGHIJKLMQX /N " Choose your option(s), then press X. Or
press Q to quit.: "
IF ERRORLEVEL 15 GOTO continue
IF ERRORLEVEL 14 if not errorlevel 15 GOTO cleanup
IF ERRORLEVEL 13 if not errorlevel 14 call %0 GOTO: toggle M %M%
IF ERRORLEVEL 12 if not errorlevel 13 call %0 GOTO: toggle L %L%
IF ERRORLEVEL 11 if not errorlevel 12 call %0 GOTO: toggle K %K%
IF ERRORLEVEL 10 if not errorlevel 11 call %0 GOTO: toggle J %J%
IF ERRORLEVEL 9 if not errorlevel 10 call %0 GOTO: toggle I %I%
IF ERRORLEVEL 8 if not errorlevel 9 call %0 GOTO: toggle H %H%
IF ERRORLEVEL 7 if not errorlevel 8 call %0 GOTO: toggle G %G%
IF ERRORLEVEL 6 if not errorlevel 7 call %0 GOTO: toggle F %F%
IF ERRORLEVEL 5 if not errorlevel 6 call %0 GOTO: toggle E %E%
IF ERRORLEVEL 4 if not errorlevel 5 call %0 GOTO: toggle D %D%
IF ERRORLEVEL 3 if not errorlevel 4 call %0 GOTO: toggle C %C%
IF ERRORLEVEL 2 if not errorlevel 3 call %0 GOTO: toggle B %B%
IF ERRORLEVEL 1 if not errorlevel 2 call %0 GOTO: toggle A %A%
GOTO menu
:toggle
if _==%4 for %%? in (%3) do set %%?=X
if X==%4 for %%? in (%3) do set %%?=_
GOTO end
:continue
if X==%a% start "C:\Program Files\Accessories\MSPAINT.EXE"
if X==%b% start "C:\WINDOWS\Notepad.exe"
if X==%c% start "C:\Program Files\Accessories\WORDPAD.EXE"
if X==%d% start "C:\WINDOWS\CALC.EXE"
if X==%e% start ""
if X==%f% start ""
if X==%g% start ""
if X==%h% start ""
if X==%i% start ""
if X==%j% start ""
if X==%k% start ""
if X==%l% start ""
if X==%m% start ""
:cleanup
for %%? in (a b c d e f g h i j k l m) do set %%?=%=%
cls
echo.
echo.
echo TASK COMPLETED.
echo.
echo.
:end
::end of batch
***************************************
Now, why AI? Because although this DOS bat works well once you code
it, it's cumbersome. The GUI is ugly and you have to be so careful
when making any changes. I'd prefer to make up a launcher that just
allows you to set the paths to what you want to put in the GUI but
just by dumping in the path and then a title for what you want to
launch adn that's it. No touching the launching code itself.
Anyway, I'm also going to go over and actually post the bat file in
alt.binaries.freeware because of the word wrap above. It'll save
hassles if anyone interested just goes over there and retrieves the
file.
Let me know what you think. I don't know where to start, so any
beginning tip would be helpful.
Thanks!
D
There is one other task that I think AI would be suited for, but I
don't know where to begin to start coding it up. You gave us a backup
program that we'd not been able to find in the available freewares.
LittleBackerUpper is such a great program that I know asking about
this concern is best idea.
I have a multi-launching bat file to launch one or more of my
instances for my Agent newsreader. Having a set launcher just was no
good as I don't open them all, or combination thereof, with any
regularity or consistency. I needed to be able to do this but could
never get the batch coding right. A lot of help in the ng proved that
there seemed to be nothing suitable or easy to use in freeware.
Ultimately, it was all coded for me by a wonderfully generous person,
Todd Vargo.
After working with AI and the script helper, I realize why I can never
get ahead with bat writing, there just aren't enough resources out
there to help. If you want to wade 3 hours for every snippet of code
you manage to unearth online, sure, but it's just not a practical
direction to go for anything beyond the basics. Although basics work
quite well in many cases.
But I think I could get somewhere with AI. But I don't know where to
begin to start with the GUI angle.
But meanwhile, here's the bat that works exceptionally well. I
substituted some standard Windows programs so that anyone trying it
out can see the purpose of a multi-launching bat. So a multi-launcher
is one of those things that does need creating as a windows app, I
feel.
Here's the bat:
***************************************
:: Was PizzaMenu.bat, posted in newsgroup alt.msdos.batch
:: Written by Todd Vargo in Windows 98 on Sep 23, 2003
:: Modified by Todd Vargo on Sep 25, 2003 for personalized usage
echo off
if GOTO:==%1 %1%2 (Subroutine Handler)
for %%? in (a b c d e f g h i j k l m) do set %%?=_
:menu
cls
echo
ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo º AGENT INSTANCES TO LAUNCH
º
echo
ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹
echo º A. [%a%] - Launch Paint
º
echo º B. [%b%] - Launch Notepad
º
echo º C. [%c%] - Launch WordPad
º
echo º D. [%d%] - Launch calculator
º
echo º E. [%e%] - (empty)
º
echo º F. [%f%] - (empty)
º
echo º G. [%g%] - (empty)
º
echo º H. [%h%] - (empty)
º
echo º I. [%i%] - (empty)
º
echo º J. [%j%] - (empty)
º
echo º K. [%k%] - (empty)
º
echo º L. [%l%] - (empty)
º
echo º M. [%m%] - (empty)
º
echo º
º
echo º Q. QUIT - changed your mind? Just Quit.
º
echo º
º
echo º X. Start launch process.
º
echo
ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo. If you change your mind about a selection, press the key
echo. again to toggle it off.
echo.
CHOICE /C:ABCDEFGHIJKLMQX /N " Choose your option(s), then press X. Or
press Q to quit.: "
IF ERRORLEVEL 15 GOTO continue
IF ERRORLEVEL 14 if not errorlevel 15 GOTO cleanup
IF ERRORLEVEL 13 if not errorlevel 14 call %0 GOTO: toggle M %M%
IF ERRORLEVEL 12 if not errorlevel 13 call %0 GOTO: toggle L %L%
IF ERRORLEVEL 11 if not errorlevel 12 call %0 GOTO: toggle K %K%
IF ERRORLEVEL 10 if not errorlevel 11 call %0 GOTO: toggle J %J%
IF ERRORLEVEL 9 if not errorlevel 10 call %0 GOTO: toggle I %I%
IF ERRORLEVEL 8 if not errorlevel 9 call %0 GOTO: toggle H %H%
IF ERRORLEVEL 7 if not errorlevel 8 call %0 GOTO: toggle G %G%
IF ERRORLEVEL 6 if not errorlevel 7 call %0 GOTO: toggle F %F%
IF ERRORLEVEL 5 if not errorlevel 6 call %0 GOTO: toggle E %E%
IF ERRORLEVEL 4 if not errorlevel 5 call %0 GOTO: toggle D %D%
IF ERRORLEVEL 3 if not errorlevel 4 call %0 GOTO: toggle C %C%
IF ERRORLEVEL 2 if not errorlevel 3 call %0 GOTO: toggle B %B%
IF ERRORLEVEL 1 if not errorlevel 2 call %0 GOTO: toggle A %A%
GOTO menu
:toggle
if _==%4 for %%? in (%3) do set %%?=X
if X==%4 for %%? in (%3) do set %%?=_
GOTO end
:continue
if X==%a% start "C:\Program Files\Accessories\MSPAINT.EXE"
if X==%b% start "C:\WINDOWS\Notepad.exe"
if X==%c% start "C:\Program Files\Accessories\WORDPAD.EXE"
if X==%d% start "C:\WINDOWS\CALC.EXE"
if X==%e% start ""
if X==%f% start ""
if X==%g% start ""
if X==%h% start ""
if X==%i% start ""
if X==%j% start ""
if X==%k% start ""
if X==%l% start ""
if X==%m% start ""
:cleanup
for %%? in (a b c d e f g h i j k l m) do set %%?=%=%
cls
echo.
echo.
echo TASK COMPLETED.
echo.
echo.
:end
::end of batch
***************************************
Now, why AI? Because although this DOS bat works well once you code
it, it's cumbersome. The GUI is ugly and you have to be so careful
when making any changes. I'd prefer to make up a launcher that just
allows you to set the paths to what you want to put in the GUI but
just by dumping in the path and then a title for what you want to
launch adn that's it. No touching the launching code itself.
Anyway, I'm also going to go over and actually post the bat file in
alt.binaries.freeware because of the word wrap above. It'll save
hassles if anyone interested just goes over there and retrieves the
file.
Let me know what you think. I don't know where to start, so any
beginning tip would be helpful.
Thanks!
D