Alpha Video Training
Results 1 to 3 of 3

Thread: script loop quits running in application

  1. #1
    Member
    Real Name
    Robert Okrzynski
    Join Date
    May 2000
    Posts
    109

    Default script loop quits running in application

    I have a script that runs a loop and it works fine when running from the database file, however when I run it after opening the batabase in my application, the loop quits after the second record.

    Here is the script:

    MCO270NEW{ENTER}
    {read %records, 2,67,6}
    B{RGHT:23}{CTLHOME}C
    {ENTER}{SCREENOFF}
    {:A}
    {LFT:#}{DN}C{ENTER}
    {LOOP :A, %records}
    {F10}{screenon}
    V

  2. #2
    Member
    Real Name
    Robert Okrzynski
    Join Date
    May 2000
    Posts
    109

    Default Re: script loop quits running in application

    My original message should have included a trigger script within the loop.

    What I am doing is downloading data from a mainframe. I need to give each record a unique identification number. Increment records only works when new records are added (keyed into a dbf) so I created a database called reclotno that only contains one record that is incremented each time the exit trigger script plays.

    MCO270NEW{ENTER}
    {read %records, 2,67,6}
    B{RGHT:23}{CTLHOME}C
    {ENTER}{SCREENOFF}
    {:A}
    exit trigger script macroplays here
    {if no>0, {{cancel}}.
    {{trigkeys {{f10}c
    {screenoff}{write 13, 30, "assigning lot number"}
    {f10}
    mcoreclotno{enter}
    be{f10:2}{up}{altd}
    muppassword{enter}{f10}n{f10}
    mco270new{enter}
    biaf{%recno}{enter}c
    {fieldgoto "no", %goto_err}
    {enter:2}{{f10}
    }}
    }}

    {LFT:3}{DN}C{ENTER}
    {LOOP :A, %records}
    {F10}{screenon}
    V

    Please not that this works when running 270new.dbf from database file but fails when 270new.dbf is originally started and is running in an application.

    Con anyone suggest a what needs to be done to get this to work in an application

  3. #3
    Member
    Real Name
    TJ Baker
    Join Date
    Sep 2005
    Posts
    41

    Default Re: script loop quits running in application

    Have you tried enabling debug in the script to step through, looking for where it goes amok?

Similar Threads

  1. Stop endless loop script
    By Mike Wilson in forum Alpha Five Version 7
    Replies: 5
    Last Post: 06-10-2006, 05:35 PM
  2. please me running script is not working
    By janlyn_heart in forum Alpha Five Version 6
    Replies: 1
    Last Post: 02-27-2006, 10:03 AM
  3. Slow running application
    By matrix1978 in forum Alpha Five Version 7
    Replies: 1
    Last Post: 01-01-2006, 11:28 AM
  4. running another application from xbasic button
    By eeetee in forum Alpha Five Version 5
    Replies: 3
    Last Post: 06-29-2003, 03:28 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
  •