Alpha Video Training
Results 1 to 5 of 5

Thread: Calling an Outside Program

  1. #1
    Member
    Real Name
    Jim Seidel
    Join Date
    May 2004
    Posts
    124

    Default Calling an Outside Program

    Does anyone know how to call an outside program using x-basic? Specifically, I want to call a "batch file" from either action script or x-basically directly.

    Thanks in advance.

    jim

  2. #2
    Alpha Software Employee Lenny Forziati's Avatar
    Real Name
    Lenny Forziati
    Join Date
    Nov 2001
    Location
    Alpha Software
    Posts
    4,695

    Default RE: Calling an Outside Program

    sys_open(), sys_shell() or sys_shell_wait() should do what you need, depending on the exact behavior you're looking for.

    -Lenny

  3. #3
    Member
    Real Name
    Jim Seidel
    Join Date
    May 2004
    Posts
    124

    Default RE: Calling an Outside Program

    Outstanding! Now is there an xBasic command for initiating the event upon A5 startup, or must the scripts be executed via an even (i.e. button push)

  4. #4
    Member Bob Houle's Avatar
    Real Name
    Bob Houle
    Join Date
    Apr 2000
    Location
    Vancouver Island, Canada
    Posts
    332

    Default RE: Calling an Outside Program

    From the help file:

    Create a global script called Autoexec. You may want to create a global script (click on the Code tab of the Control Panel and click the New button) called Autoexec to perform "start up" tasks for your application. The autoexec script is automatically executed when Alpha Five starts up. For example, you might want to open several forms when the application is started, or prompt for a user name and password, or set the value in some variable etc.

    --Bob

  5. #5
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,298

    Default RE: Calling an Outside Program

    an autoxec script runs when a database is opened.

    if a5 is started via a shortcut that also loads a database, then the 'autoexec' will run, giving you, in effect, a script that runs when a5 is started.

    if you want to be sure that the script runs only once, no matter how many times a particular database is opened, then you could do this.

    dim a as p
    a = addin.variables()
    if eval_valid("flagMyScriptHasRun") = .f. then
    script_play("scriptname")
    a.flagMyscripthasrun = .t.
    end if

Similar Threads

  1. CAlling Up Records.
    By Brandon Burtnik in forum Alpha Five Version 5
    Replies: 3
    Last Post: 09-09-2005, 12:42 PM
  2. Calling a 2nd Form
    By Henning Bach in forum Alpha Five Version 5
    Replies: 4
    Last Post: 02-04-2005, 06:45 AM
  3. Calling external program
    By Maciej Neyman in forum Alpha Five Version 5
    Replies: 5
    Last Post: 06-24-2004, 03:41 AM
  4. Calling one operation from within another?
    By Themis Skiathitis in forum Alpha Five Version 4
    Replies: 1
    Last Post: 10-04-2001, 06:36 AM
  5. Calling another APP
    By Thomas Henkel in forum Alpha Five Version 4
    Replies: 10
    Last Post: 09-13-2000, 09:26 AM

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
  •