Alpha Video Training
Results 1 to 9 of 9

Thread: External program

  1. #1
    Member
    Real Name
    Paul Hudson
    Join Date
    Nov 2002
    Posts
    221

    Default External program

    Hi folks
    I have a small Visual Basic utility to enable me to switch the default printer back to printer A after printing to printer B. The program is called SDP.EXE.
    I have inserted a line into my script thus:

    {EXEC "C:(backslash)ALPHA4V3(backslash)SDP.EXE Epson",0,0}

    The word "Epson" is a parameter which I am trying to pass to SDP.EXE.

    This does not work when the script is run. SDP.EXE starts, but the parameter is not passed.

    If I initiate my SDP.EXE program from a DOS command prompt, complete with the parameter, it works fine, but not from within Alpha Four.

    Am I missing something here?

    Paul

  2. #2
    Joe Goodson
    Guest

    Default RE: External program

    Paul,

    I learned a trick a few years back. It may work for you.

    (1) Make a batch file in dos to run your exe file (eg. whatever.bat)
    (2) Use bat2exec.com to convert whatever.bat to whatever.com.
    (3) Rename whatever.com to whatever.exe.
    (4) Reference whatever.exe in your alpha script. (Whatever.exe has no parameters.)

    If you don't have bat2exec.com, I will email it to you.

    Joe

  3. #3
    Member
    Real Name
    Paul Hudson
    Join Date
    Nov 2002
    Posts
    221

    Default RE: External program

    Hi Joe

    Interesting. I found the prog on the net (it's old, isn't it!).
    Although I created a workaround for the original problem, it's always good to know of another possible road to take.

    (It seems Bat2Exec was also the name of a virus a few years ago. It was so called because the virus writer used the Bat2Exec program to "compile" his trojan batch file in an attempt to hide its origin.)

    Regards
    Paul

  4. #4
    Joe Goodson
    Guest

    Default RE: External program

    Will wonders never cease?

    Yes, it's old. Mine is dated 1/15/93. Congratulations on solving the problem otherwise.

    Joe

  5. #5
    Howard Elkes
    Guest

    Default RE: External program

    Joe:

    I'd be very interested in getting a copy of the bat2exe.com program.

    Is it possible for you to send me a copy of it, or tell me exactly where to find it on the net?

    Thanks,

    Howard R. Elkes - hrelkes@aol.com

  6. #6
    Joe Goodson
    Guest

    Default RE: External program

    Will do.

    Joe

  7. #7
    Member
    Real Name
    Jimmie Shatsar
    Join Date
    Jul 2000
    Posts
    10

    Default RE: External program

    Howard,

    I found a zip file for BAT2EXEC on the web at this site: http://members.cox.net/dos/batch02.htm#batcompile which also has a "Lite" version. The site indicates that they was updated in 2000.

    Hope this helps.

    Jim

  8. #8
    John Lloyd
    Guest

    Default RE: External program

    Paul,

    The Alpha4 manual states that you must assign your executable, along with the parameter, to a script variable, I.E. {SET,%RunMyProgram,"C:\myprogram.exe Epsonxx"}
    then {EXEC %RunMyProgram,0,0}.

    The only other way to pass parameters is to use the Parameter Database. (extensive information available in the online A4 manual for that).

    John

  9. #9
    John Lloyd
    Guest

    Default RE: External program

    Paul,

    The Alpha4 manual states that you must assign your executable, along with the parameter, to a script variable, I.E. {SET,%RunMyProgram,"C:\myprogram.exe Epsonxx"}
    then {EXEC %RunMyProgram,0,0}.

    The only other way to pass parameters is to use the Parameter Database. (extensive information available in the online A4 manual for that).

    John

Similar Threads

  1. running external program
    By lkatz1 in forum Alpha Five Version 5
    Replies: 4
    Last Post: 08-25-2004, 05:36 AM
  2. Calling external program
    By Maciej Neyman in forum Alpha Five Version 5
    Replies: 5
    Last Post: 06-24-2004, 03:41 AM
  3. Executing an external program with args.
    By Larry Treachler in forum Alpha Five Version 5
    Replies: 8
    Last Post: 10-14-2003, 12:46 PM
  4. Running external program
    By George Corder in forum Alpha Five Version 5
    Replies: 3
    Last Post: 06-04-2003, 04:30 PM
  5. Executing an external program
    By Rodger Bailey in forum Alpha Five Version 4
    Replies: 4
    Last Post: 06-09-2000, 12:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •