Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Can a popup message script be created for a non-existent form and how?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can a popup message script be created for a non-existent form and how?

    Hello All,
    I love to do crazy things and I am probably lost here and is probably very simple. I wish to create a main menu to launch modules which the modules are individual Alpha project folders where you launch program. The menu is pre-populated with various optional modules. If a user did not acquire an optional module, I would like to have a popup message to say something to tell them they do not have the optional module and then they click OK and window closes and it reopens or focuses back on the main menu. This way I can have a generic menu for all my applications that apply to the main menu I create.

    Process
    • User acquires module A module. It installs a main menu with Module A, Module B, Module C, Module D, etc. pre-defined to launch modules if acquired.
    • User clicks on Module A and it looks in Module A's project folder and launches modules A's menu panel and all is okay and they use Module A.
    • User clicks on Module B and it looks for Module B's project folder and it does not exist (Because they didn't acquire it). A scripts pops up a window saying you did not purchase this program and maybe a weblink for program information if possible. (By default an Alpha Anywhere window pops up saying it could not locate the file with path info, etc. and it appears to user as software issue)
    • User clicks on this script generated popup message OK button and they are redirected back to the main menu thereby avoiding any Alpha Anywhere error messages.
    Each module button uses script to call project folder
    • Module A button :a5.load("C:\main directory\Module A\Module A.adb") [Call Module A's menu window] [When Module A's window is closed return to main menu]
    • Module B button :a5.load("C:\main directory\Module B\Module B.adb") [Call Module B's menu window] [When Module B's window is closed return to main menu]
    • Module C button :a5.load("C:\main directory\Module C\Module C.adb") [Call Module C's menu window] [When Module C's window is closed return to main menu]
    • Module D button :a5.load("C:\main directory\Module D\Module D.adb") [Call Module D's menu window] [When Module C's window is closed return to main menu]
    As usual any help is greatly appreciated!

    Thank you!

    #2
    I was able to create a script to suppress the error message after all and keep the main menu loaded. Next is to get a web link in the popup box to figure out. Sorry if I wasted anyone's time reading as I guess I pulled the trigger too early.

    Thanks!!

    Comment


      #3
      Originally posted by datacaster View Post
      I was able to create a script to suppress the error message after all and keep the main menu loaded. Next is to get a web link in the popup box to figure out. Sorry if I wasted anyone's time reading as I guess I pulled the trigger too early.

      Thanks!!
      I was wrong I screwed up and it doesn't really work right!
      If the project folder file is there the message still pops up and trying code examples for error code reporting doesn't work as it says, so I know there is a different way to do this but how?
      Here is what code I tried and I had some other lines, but they are removed like end statement. I'll keep trying, but any thoughts are appreciated!
      This code appears to run the message handle area without end and never goes to handle area with end, so I am confused, but learning!
      I assumed I would set the variable to true and if all is well (No error code) change variable to false, so if message handle area ran it would not display message. I guess good or bad it is read and continues through message handle area.
      I thought if there was an error code it would stop reading code and jump to message handle area upon first error which is missing .adb file and not process the change variable to false. Then maybe I am just confused.

      Code:
      'Pre-Set the value of variable.
      DIM shared bad AS L
      bad = a5_eval_expression("=.T.")
      on error goto message
      'Open database: C:\AlphaFive Software\UXonADesktop\DateTime.adb
      :a5.load("C:\AlphaFive Software\UXonADesktop\DateTime.adb")
      'Change variable bad to false for no message box to display
      DIM shared bad AS L
      bad = a5_eval_expression("=.F.")
      
      
      message:
      'Conditional code follows. Executes only if the condition expression is True.
      IF a5_eval_expression("=Var->bad=.T.",local_variables()) THEN
      'Execute following inline Xbasic code to display message.
      ui_msg_box("Unpurchased Program", "You are trying to access a program that you hve not purchased. Go to http://www.google.com for more information on this program")
      end if

      Comment


        #4
        Originally posted by datacaster View Post

        I was wrong I screwed up and it doesn't really work right!
        If the project folder file is there the message still pops up and trying code examples for error code reporting doesn't work as it says, so I know there is a different way to do this but how?
        Here is what code I tried and I had some other lines, but they are removed like end statement. I'll keep trying, but any thoughts are appreciated!
        This code appears to run the message handle area without end and never goes to handle area with end, so I am confused, but learning!
        I assumed I would set the variable to true and if all is well (No error code) change variable to false, so if message handle area ran it would not display message. I guess good or bad it is read and continues through message handle area.
        I thought if there was an error code it would stop reading code and jump to message handle area upon first error which is missing .adb file and not process the change variable to false. Then maybe I am just confused.

        Code:
        'Pre-Set the value of variable.
        DIM shared bad AS L
        bad = a5_eval_expression("=.T.")
        on error goto message
        'Open database: C:\AlphaFive Software\UXonADesktop\DateTime.adb
        :a5.load("C:\AlphaFive Software\UXonADesktop\DateTime.adb")
        'Change variable bad to false for no message box to display
        DIM shared bad AS L
        bad = a5_eval_expression("=.F.")
        
        
        message:
        'Conditional code follows. Executes only if the condition expression is True.
        IF a5_eval_expression("=Var->bad=.T.",local_variables()) THEN
        'Execute following inline Xbasic code to display message.
        ui_msg_box("Unpurchased Program", "You are trying to access a program that you hve not purchased. Go to http://www.google.com for more information on this program")
        end if
        1. Check for the existence of the directory with A5_IS_PATH_VALID() before you attempt to open the database

        2. use debug(1) to step through the code
        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.
        "Make it as simple as possible, but not simpler."
        Albert Einstein

        http://www.iadn.com/images/media/iadn_member.png

        Comment


          #5
          Originally posted by Al Buchholz View Post

          1. Check for the existence of the directory with A5_IS_PATH_VALID() before you attempt to open the database

          2. use debug(1) to step through the code
          Thanks Al, that was too simple and cut code in half and works great! I just used the path valid statement to build the code.

          Thank you!

          Comment


            #6
            Originally posted by datacaster View Post

            Thanks Al, that was too simple and cut code in half and works great! I just used the path valid statement to build the code.

            Thank you!
            Great!

            And remove the debug(1) before sending it off to the production area...
            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.
            "Make it as simple as possible, but not simpler."
            Albert Einstein

            http://www.iadn.com/images/media/iadn_member.png

            Comment


              #7
              Originally posted by Al Buchholz View Post

              Great!

              And remove the debug(1) before sending it off to the production area...
              Actually I just ran the directory exists command and added the code in the interactive window and went with it since there were no issues.
              Just added an HTML message box to click ok and with a link to take you to the website if the user wants to do so and that works, so my main menu is feasible. Now if I could just develop some applications to have a main menu for!

              Thanks again for the guidance!

              So many helpful people here!

              Thank you!

              Comment

              Working...
              X