• BAT Files

    From Dan Ceppa@1:393/9005.30 to mark lewis on Monday, August 30, 2004 21:34:25
    This is kinda related to here...

    How do you use a BAT file to be able to load a program and then
    do something else?

    IOW, I've got a bat file that loads Switcher. However, the
    bat file won't do anything else until I uninstall Switcher.
    Only then does it run the other commands/programs I want
    to run. (Whcih is too late!)


    --- OMX/Blue Wave/DOS v2.30
    * Origin: Soundly on the Fault Line (1:393/9005.30)
  • From mark lewis@1:3634/12 to Dan Ceppa on Tuesday, August 31, 2004 12:04:14
    This is kinda related to here...

    just barely ;)

    How do you use a BAT file to be able to load a
    program and then do something else?

    that depends on the OS being run...

    generally speaking, you'd use some sort of "start" command or utility to fire up the additional items... however, this means that the OS must be multitasking
    already...

    IOW, I've got a bat file that loads Switcher. However, the
    bat file won't do anything else until I uninstall Switcher.
    Only then does it run the other commands/programs I want
    to run. (Whcih is too late!)

    if switcher is the "multitasker", then i don't know that you can do what you are wanting... are you wanting the other items to be started from within switcher or in addition to switcher? if in addition to, then the OS is already multitasking and switcher isn't needed, is it? or am i misunderstanding switcher?

    an example:

    @echo off
    dothis
    dothat
    start something
    start somethingelse
    start thecar


    in the above, dothis will run and the bat will wait till it finishes... then it
    will run dothat and wait for it to finish... the other three will all be fired up at the same time to run seperately...

    )\/(ark


    * Origin: (1:3634/12)
  • From Dan Ceppa@1:393/9005.30 to mark lewis on Wednesday, September 01, 2004 13:27:05
    On 31 Aug 04 07:04:14, mark lewis got back to Dan Ceppa
    Re: BAT Files

    How do you use a BAT file to be able to load a
    program and then do something else?

    that depends on the OS being run...

    It's in DOS under WIN98

    generally speaking, you'd use some sort of "start" command or utility
    to fire up the additional items... however, this means that the OS
    must be multitasking already...

    The program I'm loading works as a TSR. Once it's loaded, I
    can run regular programs from the DOS prompt.


    IOW, I've got a bat file that loads Switcher. However, the
    bat file won't do anything else until I uninstall Switcher.
    Only then does it run the other commands/programs I want
    to run. (Which is too late!)

    if switcher is the "multitasker", then i don't know that you can do
    what you are wanting... are you wanting the other items to be started
    from within switcher or in addition to switcher? if in addition to,
    then the OS is already multitasking and switcher isn't needed, is it?
    or am i misunderstanding switcher?

    Switcher does like it sounds. I can run a program and freeze it
    on the page I'm in. It then allows me to open a separate DOS
    section and run another program. I can do that 7 or 8 times,
    leaving any of the porgrams on the place I left it. It's great
    for cut and paste in DOS mode.



    ... QWK? I don't need no stinkin' QWK packet!
    --- OMX/Blue Wave/DOS v2.30
    * Origin: Soundly on the Fault Line (1:393/9005.30)
  • From mark lewis@1:3634/12 to Dan Ceppa on Wednesday, September 01, 2004 15:20:12
    How do you use a BAT file to be able to load a
    program and then do something else?

    that depends on the OS being run...

    It's in DOS under WIN98

    'k...

    generally speaking, you'd use some sort of "start"
    command or utility to fire up the additional items...
    however, this means that the OS must be multitasking
    already...

    The program I'm loading works as a TSR. Once it's
    loaded, I can run regular programs from the DOS prompt.

    you can't open more than one windowed DOS prompt and run whatever? i do it here
    all the time and cut and paste to/from them with ease...

    IOW, I've got a bat file that loads Switcher. However, the
    bat file won't do anything else until I uninstall Switcher.
    Only then does it run the other commands/programs I want
    to run. (Which is too late!)

    if switcher is the "multitasker", then i don't know that
    you can do what you are wanting... are you wanting the
    other items to be started from within switcher or in
    addition to switcher? if in addition to, then the OS is
    already multitasking and switcher isn't needed, is it?
    or am i misunderstanding switcher?

    Switcher does like it sounds. I can run a program and freeze
    it on the page I'm in. It then allows me to open a separate
    DOS section and run another program. I can do that 7 or 8
    times, leaving any of the porgrams on the place I left it.
    It's great for cut and paste in DOS mode.

    i honestly don't see how you can do what you are trying to do unless switcher has some sort of autoexec capability to fire up the other programs you want to run... then again, i fail to see a need for switcher in the first place since you are running in DOS tasks under Win98... the machine i'm currently on has a dozen or more DOS windows open as well as i don't know how many windows programs... as i need a DOS window, i just open another one...

    )\/(ark


    * Origin: (1:3634/12)
  • From Dan Ceppa@1:393/9005.30 to mark lewis on Wednesday, September 01, 2004 19:58:56
    On 01 Sep 04 10:20:12, mark lewis got back to Dan Ceppa
    Re: BAT Files

    Switcher does like it sounds. I can run a program and freeze
    it on the page I'm in. It then allows me to open a separate
    DOS section and run another program. I can do that 7 or 8
    times, leaving any of the porgrams on the place I left it.
    It's great for cut and paste in DOS mode.

    i honestly don't see how you can do what you are trying to do unless switcher has some sort of autoexec capability to fire up the other programs you want to run... then again, i fail to see a need for
    switcher in the first place since you are running in DOS tasks under Win98... the machine i'm currently on has a dozen or more DOS windows
    open as well as i don't know how many windows programs... as i need a
    DOS window, i just open another one...

    But I don't want to! (Whine!)

    I got Switcher long before I got WIN95. I found it a very easy
    way way to cut and paste between open DOS "Windows". I was able
    to do that on a 286 system.

    Yes, I can do that via WIN, but there are far less needed
    keystrokes in my current setup.

    As it is, I'll live with the fact that I can't chain Switcher
    on the startup call to it.


    --- OMX/Blue Wave/DOS v2.30
    * Origin: Soundly on the Fault Line (1:393/9005.30)
  • From Jon Watson@1:134/703 to Mark Lewis on Wednesday, September 01, 2004 16:36:00
    Hi mark,
    I think that's the point...he's asking about how to do this in a BAT file so
    I assume he's not going to be there to open new windows as he needs them.

    I always thought that the 'call' command in batch files was the way to go.
    I'm not sure, but I thought that if you just named a program or bat file from within a bat file, then the calling bat file would terminate and the system wouldn't return to it after running whatever program was called. I thought that the "call progam_name" would cause the system to execute that program, then return to the calling bat file and execute the remainder of the
    commands.

    I don't know if that helps, Dan, but it might...

    In a message to Dan Ceppa you wrote:

    i honestly don't see how you can do what you are trying to do unless switcher has some sort of autoexec capability to fire up the other programs you want
    to run... then again, i fail to see a need for switcher in the first
    place since you are running in DOS tasks under Win98... the machine
    i'm currently
    on has a dozen or more DOS windows open as well as i don't know how
    many windows programs... as i need a DOS window, i just open another one...

    -Jon
    MFWIC, The HeatSink BBS
    Calgary, Alberta, Canada, eh?!

    * SeM. 2.26 * Bizarreness is the essence of the exotic.
    --- SemPoint
    * Origin: telnet://TheHeatsinkBBS.ca -=Calgary,AB,Canada =- (1:134/703)
  • From mark lewis@1:3634/12 to Dan Ceppa on Thursday, September 02, 2004 00:54:40
    Switcher does like it sounds. I can run a program and freeze
    it on the page I'm in. It then allows me to open a separate
    DOS section and run another program. I can do that 7 or 8
    times, leaving any of the porgrams on the place I left it.
    It's great for cut and paste in DOS mode.

    i honestly don't see how you can do what you are trying to do unless
    switcher has some sort of autoexec capability to fire up the other
    programs you want to run... then again, i fail to see a need for
    switcher in the first place since you are running in DOS tasks under
    Win98... the machine i'm currently on has a dozen or more DOS windows
    open as well as i don't know how many windows programs... as i need a
    DOS window, i just open another one...

    But I don't want to! (Whine!)

    hehehe...

    I got Switcher long before I got WIN95. I found it a very
    easy way way to cut and paste between open DOS "Windows".
    I was able to do that on a 286 system.

    understood...

    Yes, I can do that via WIN, but there are far less needed
    keystrokes in my current setup.

    what keystrokes? i click and drag to hilite and then either hit enter or click again... then switch to whatever task, native win or dos, and depending will either click the paste button in a dos task or hit CTRL-V in a win task... copy'n'paste to both environs... FWIW: i do the same, but easier on OS/2, too... there, its just a matter of button dragging and then double clicking no matter the native task... IIRC, that even goes into the win3x that runs on OS/2, too OB-)

    As it is, I'll live with the fact that I can't chain Switcher
    on the startup call to it.

    alrighty... sorry 'bout that...

    )\/(ark


    * Origin: (1:3634/12)
  • From mark lewis@1:3634/12 to Jon Watson on Thursday, September 02, 2004 01:01:02
    I think that's the point...he's asking about how to do
    this in a BAT file so I assume he's not going to be
    there to open new windows as he needs them.

    nah... seems to be just a desire to automate the opening of things when he triggers the first one...

    I always thought that the 'call' command in batch files
    was the way to go. I'm not sure, but I thought that if
    you just named a program or bat file from within a bat
    file, then the calling bat file would terminate and the
    system wouldn't return to it after running whatever
    program was called. I thought that the "call
    progam_name" would cause the system to execute that
    program, then return to the calling bat file and
    execute the remainder of the commands.

    that's close... real close...

    you "call a.bat" if you want to return from a.bat to current.bat... that's the only time you call in a .bat... if you don't call a.bat, it won't return from a.bat to current.bat

    test it out!

    === snip a.bat ===
    @echo off
    echo this is a.bat
    === snip ===

    === snip current.bat ===
    @echo off
    echo this is current.bat
    call a.bat
    echo back from a.bat
    echo.
    echo this is current.bat
    a.bat
    echo back from a.bat
    === snip ===

    you'll notice there is only one call to a.bat... the second one is a direct executeion... the output should be as follows...

    this is current.bat
    this is a.bat
    back from a.bat

    this is current.bat
    this is a.bat

    ;)

    )\/(ark


    * Origin: (1:3634/12)
  • From Dan Ceppa@1:393/9005.30 to Jon Watson on Thursday, September 02, 2004 14:05:35
    On 01 Sep 04 11:36:00, Jon Watson got back to Mark Lewis
    Re: BAT Files

    I think that's the point...he's asking about how to do this in a BAT
    file so I assume he's not going to be there to open new windows as he needs them.
    I always thought that the 'call' command in batch files was the way to
    go. I'm not sure, but I thought that if you just named a program or
    bat file from within a bat file, then the calling bat file would terminate and the system wouldn't return to it after running whatever program was called. I thought that the "call progam_name" would cause
    the system to execute that program, then return to the calling bat
    file and execute the remainder of the commands.

    I don't know if that helps, Dan, but it might...

    I tried adding [call sw.bat] and it almost worked! I got
    a Nesting Error. I think there needs to be a command after
    that...


    --- OMX/Blue Wave/DOS v2.30
    * Origin: Soundly on the Fault Line (1:393/9005.30)
  • From Dan Ceppa@1:393/9005.30 to mark lewis on Thursday, September 02, 2004 14:07:53
    On 01 Sep 04 19:54:40, mark lewis got back to Dan Ceppa
    Re: BAT Files

    Yes, I can do that via WIN, but there are far less needed
    keystrokes in my current setup.

    what keystrokes? i click and drag to hilite and then either hit enter
    or click again... then switch to whatever task, native win or dos, and depending will either click the paste button in a dos task or hit
    CTRL-V in a win task... copy'n'paste to both environs... FWIW: i do
    the same, but easier on OS/2, too... there, its just a matter of
    button dragging and then double clicking no matter the native task...

    I can do it via WIN, but with SWITCHER, it is still easier between
    DOS programs.

    IIRC, that even goes into the win3x that runs on OS/2, too OB-)
    As it is, I'll live with the fact that I can't chain Switcher
    on the startup call to it.

    alrighty... sorry 'bout that...

    I'll still try doing it, though! The CALL command seems to have
    posibilities.


    --- OMX/Blue Wave/DOS v2.30
    * Origin: Soundly on the Fault Line (1:393/9005.30)
  • From mark lewis@1:3634/12 to Dan Ceppa on Friday, September 03, 2004 12:42:00
    I tried adding [call sw.bat] and it almost worked! I got
    a Nesting Error. I think there needs to be a command after
    that...

    gotta watch for certain things when calling .bats... the main one is that you don't get into a "call loop"...


    ie: a calls b
    b calls c
    c calls a
    round'n'round we go till we nest out or run out of memory

    )\/(ark


    * Origin: (1:3634/12)
  • From Dan Ceppa@1:393/9005.30 to mark lewis on Saturday, September 04, 2004 11:44:36
    On 03 Sep 04 07:42:00, mark lewis got back to Dan Ceppa
    Re: BAT Files

    gotta watch for certain things when calling .bats... the main one is
    that you don't get into a "call loop"...

    ie: a calls b
    b calls c
    c calls a
    round'n'round we go till we nest out or run out of memory

    I've don't that in dBXL!



    ... It's time, now, to play, "Name that Disease!" --Don Pardo
    --- OMX/Blue Wave/DOS v2.30
    * Origin: Soundly on the Fault Line (1:393/9005.30)