Alpha DevCon 2018
Results 1 to 2 of 2

Thread: H E L P ! Reading Dos Files in a box

  1. #1
    abe kravetz
    Guest

    Default H E L P ! Reading Dos Files in a box

    Does anyone have a little routine to read the files from a directory and make it into a box and when the user press enter it selects that file.

    Thank you

    Abe

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: H E L P ! Reading Dos Files in a box

    Why DOS? Alpha does it in windows. It's called ui_get_file() as in:

    Result String = ui_get_file( Title, File Type String [, Default Filename [, Exist/Not Exist Code]])
    Description:
    Displays the File Open dialog box to obtain a filename and path. The filename
    you specify is returned as a Result String. The Result String will be empty (“”) if
    the Cancel button is selected.

    252 Alpha Five Xbasic Reference Manual
    You specify the title of the dialog box with the Title parameter.
    The File Type String can contain one or more file types which will be available
    in the file type drop-down list. The Open File box will display only those files
    whose filename extensions match the selected type. The file type is specified by
    writing the file type description followed by the extension template: (*.AAA),
    where A represents one of the extension characters. For example, to show only
    table files, the File Type String would be “Tables(*.DBF)”. To include multiple
    file types, separate each description and template with the “|” separator. For
    example: “Text(*.TXT)|Excel(*.XLS)”.
    The optional Default Filename is the filename that appears in the File Name box
    when the dialog box first appears.
    The Exist/Not Exist Code is a one character string that can specify whether the
    selected filename must already exist (“X”) or must not exist (“N”).
    Example:
    'This script opens the specified table and copies it to a new file.
    '-----------------------------------------------------------------
    table_to_copy = ui_get_file("Open Table to Copy", "Table(*.DBF)",©
    "","X")
    IF table_to_copy = "" THEN
    END
    END IF
    tbl = table.open(table_to_copy, FILE_RW_EXCLUSIVE)
    new_table_name = ui_get_file("Name the new table","Table(*.DBF)",©
    "","N")
    IF new_table_name = "" THEN
    tbl.close()
    END
    END IF
    tbl.duplicate(new_table_name, 0)
    tbl.close()

Similar Threads

  1. Interesting Reading
    By Marc King - A5solutions in forum Alpha Five Version 5
    Replies: 4
    Last Post: 12-31-2003, 02:37 PM
  2. reading dBase files
    By davidhp in forum Alpha Five Version 4
    Replies: 3
    Last Post: 05-25-2002, 04:55 AM
  3. Reading barcodes...
    By Steven Devaney in forum Alpha Five Version 4
    Replies: 5
    Last Post: 02-19-2001, 04:30 AM
  4. Reading Image files .pcx .bmp
    By chasbo in forum Alpha Four Version 6 and Prior
    Replies: 0
    Last Post: 01-11-2001, 09:18 AM
  5. reading from scanner
    By bobsk in forum Alpha Five Version 4
    Replies: 5
    Last Post: 05-05-2000, 04:29 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
  •