Alpha Video Training
Results 1 to 9 of 9

Thread: A5.Load() Parameters

  1. #1
    Member
    Real Name
    Andy Sigrist
    Join Date
    May 2000
    Location
    Vancouver, BC, Canada
    Posts
    130

    Default A5.Load() Parameters

    Hello,
    I am trying to load an Alpha Anywhere workspace and automatically open the specific form "Quotes".

    Basic command: A5.LOAD(C layoutName [, C Style [, C windowname [, P Arguments]]])

    The way I am trying to use it: A5.LOAD("C:\Database\QuoteTrackingSystem.adb", "", "Quotes",,)

    The workspace will open, but it does not open the specified form.

    I assume that "Windowname" refers to a form that I can specify to open. If so, what is the correct syntax?

    What are the "Style" and "Arguments" parameters? I do not see them explained in the help file?

    Appreciate any help on this

  2. #2
    Member
    Real Name
    Jon P Moody
    Join Date
    Nov 2016
    Posts
    185

    Default Re: A5.Load() Parameters

    Andy,

    I know 2 easy ways to open a form when starting an alpha workspace...

    File->Workspace Properties->Startup... tick 'When this Workspace is opened, open a startup Form' and select the required form

    or

    Create a batch file called 'autoexec' and add this line
    Code:
    :Form.view("form name")

  3. #3
    Member
    Real Name
    Andy Sigrist
    Join Date
    May 2000
    Location
    Vancouver, BC, Canada
    Posts
    130

    Default Re: A5.Load() Parameters

    Jon,

    Yes, I have been using the workspace properties for years to define the startup form. In the current situation, I have three applications that are called from a small application that is a main menu. When switching from the main menu application, I want to in one specific application be able to automatically select one of three startup forms depending on which menu button the user selected.

    I did try the :Form.view possibility in Autoexec, but that does not open the form.

    So, back to the drawing board. The A5.Load() function still appears to be the best choice, assuming that the parameter "windowname" refers to a form and that I can get help to confirm the correct syntax for this function.

    Appreciate any help.

  4. #4
    Member
    Real Name
    Jon P Moody
    Join Date
    Nov 2016
    Posts
    185

    Default Re: A5.Load() Parameters

    Andy,

    I think you may have to change the workspace so it has no default form/script to run when it opens, then your syntax looks OK except for the 2 commas on the end

  5. #5
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,628

    Default Re: A5.Load() Parameters

    Interesting issue.

    I don't use this function, but I did work an example that combined opening another workspace/database and opening a form.

    It was done by using the first 2 arguments in the a5.load()

    1. fully qualified name of the target workspace/database.

    2. where the second argument is "normal". Appears to be critical

    I picked this up from looking at action scripting for opening a form and the options tab for window style.

    Then use the workspace/database properties in the target system to designate the form to open.

    I'd be surprised if the window name is the form to open.

    Sounds more likely it's something else.

    But I haven't been wrong since the last time and won't be wrong again until the next time....
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  6. #6
    Member
    Real Name
    Andy Sigrist
    Join Date
    May 2000
    Location
    Vancouver, BC, Canada
    Posts
    130

    Default Re: A5.Load() Parameters

    Thanks for the suggestion. Still looking for help.

    In your example, you still use the workspace/database properties in the target system to designate the form to open.

    What I am looking for is to designate the form to open through a function or X-Basic code. Is there any way to do so, rather than defining it in the database properties?

  7. #7
    Member
    Real Name
    Andy Sigrist
    Join Date
    May 2000
    Location
    Vancouver, BC, Canada
    Posts
    130

    Default Re: A5.Load() Parameters

    I think I just solved it. I can select the form to load in the Autoexec script, provided I pass the form name to the application with an Addin variable. Have not finished implementing it, but I think it will work for me.

  8. #8
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,628

    Default Re: A5.Load() Parameters

    Quote Originally Posted by Sigrist View Post
    I think I just solved it. I can select the form to load in the Autoexec script, provided I pass the form name to the application with an Addin variable. Have not finished implementing it, but I think it will work for me.
    Andy

    I hear you about opening a form based on some criteria.

    Your original quote stated that you want a specific form "Quotes"

    While I played with the options to designate an opening form, that's another boulder in the road.

    Multiple ways to skin that poor cat.

    So now I'll go another way. You stated multiple A5 apps.

    Why go through the opening and closing of an A5 database when other options can move from one app to another without the overhead of a database opening and closing?
    Last edited by Al Buchholz; 11-16-2019 at 09:42 PM.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  9. #9
    Member
    Real Name
    Andy Sigrist
    Join Date
    May 2000
    Location
    Vancouver, BC, Canada
    Posts
    130

    Default Re: A5.Load() Parameters

    Al,

    I have to correct my terminology. Users will start A5 only once to get to a workspace "Main Menu", but access from there multiple workspaces. In addition, in some workspaces I want to automatically open one of several specific forms (in some cases "Quotes" as an example) depending on the button that the user pressed in the main menu. I tested it based on my previous comments and it works. Thank you so much for your help and suggestions.

Similar Threads

  1. Replies: 2
    Last Post: 03-29-2019, 11:27 AM
  2. Synchronize data requires pre-load, but pre-load throws errors.
    By westridge in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 01-15-2015, 12:03 PM
  3. Parameters
    By ELQRBMO44056 in forum QReportBuilder
    Replies: 4
    Last Post: 02-06-2011, 05:27 PM
  4. too few parameters
    By jin_Bat in forum Alpha Five Version 10 - Desktop Applications
    Replies: 4
    Last Post: 09-28-2010, 02:54 PM
  5. too many parameters
    By Schulzie in forum Alpha Five Version 4
    Replies: 6
    Last Post: 10-03-2000, 01:44 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
  •