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

Automated Network Optimization

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

  • Automated Network Optimization

    Attached is a script I designed to help automate both full optimization and refresh optimization in an application where I DON'T want the user to ever have access to the control panel.

    The principal is simple:
    1. Create two icons - one starts the shadow version and the other starts the network version directly. I have my installation program set up to create the various icons automatically. (I put the shadow version on the Desktop and the full version in the Start/Programs area and titled it " from Network".)
    2. Design a script that runs 'Refresh' only from the shadow database and runs the full optimize only from the network (main) database.
    3. Design the full optimize to send the appropriate keystrokes so the user never has access to the control panel.

    See the notes in the script itself for more details.

    Unfortunately, I haven't actually tried it on a real network yet. So far I've only been able to try it with various drives on my local computer (I have logical drives C: thru G:) and it seems to work just fine. If someone could confirm this on a real network, I would appreciate some confirmation.

    I hope this is a useful as I think it will be.

    Cal

  • #2
    RE: Automated Network Optimization

    I am not quite sure, are you optimizing a hard disk or a data base? Is the control panel the Alpha control panel or the disk optimizing control panel?

    Rick

    Comment


    • #3
      RE: Automated Network Optimization

      A5 has a feature called "Network Optimization". I am trying to automate this for an application I am trying to sell so the user will not have access to the A5 control panel. Network Optimization is a wonderful speed enhancement whenever you are using A5 on a network.

      Comment


      • #4
        RE: Automated Network Optimization

        OK - I give up. The script works every time when run from the control panel's code menu direcly (double click the script name). However, the "sys_send_keys" works sporadically at best when run from a button on a form.

        For now, I'm giving up. If anyone has an answer, please let me know.

        (I'd delete this whole message string if I could!)

        Note: There's an error in the posted script:
        Under the 'full optimization' section, the
        IF a5.get_master_path() = ""
        should actually be 'not equal to'. But, since the script doesn't work as needed, what's the point?

        Comment


        • #5
          RE: Automated Network Optimization

          I've finally got a method that I'm satisfied with for distributing an application, along with the runtime, for use on a network. The goal was to create an application that uses network optimization and make an installation routine on CD that can be sold to, and installed by, anyone who runs a network - even if they know nothing about A5. (They do need to be able to read instructions so it might still be an issue for some.)

          Attached is the latest and greatest version of my Network_optimize script along with a Help file to tell the network installer how to perform the installation. The script follows the same basic logic as described above but with some "user friendly" improvements and a 'correction' to make the "sys_send_keys" work better. Also, it has been tested on the NT network at our office and worked flawlessly for the 5 installations so far. (Plus a few upgrades for application fixes - surprise, surprise!)

          Changes:
          (1) The user no longer choses whether to do a Full Opt. or Refresh. The system determines it based on the current value of A5.get_master_path()
          (2) Messages were added with ui_msg_box() to help non-A5 network admins. understand what is happening.
          (3) The most important change was to modify the sys_send_keys() command. For some reason, the "Alt-F"/"z" keystrokes that work when manually starting optimization won't work consistantly from the sys_send_keys command. I had to experiment until I finally found that the following would work consistantly:
          sys_send_keys( "{%F}{%E}{LEFT}{DOWN}Z" + opt_path + "{ENTER}" )
          ("opt_path" is a variable which stores the full pathname of the network app)

          INSTALLATION METHOD:
          I designed two installation executables using the installer that comes with the 'A5v4 Pro' version and a Windows Help file (attached with the script) to explain the process to a non-A5 person doing the installation. All three files are stored on a distribution CD.
          (1) The first installation program installs the application files to the network drive. The installer only needs to change the drive letter from the default "C:" drive as appropriate. (Unless, of course, it is being installed directly on the network computer where "C:" might be the correct drive letter.)
          (2) The second installation program installs the client files (A5 runtime, shadow directory, and program directory along with some special bitmaps I use) and installs some icons on the Desktop and Programs menu. The use of the icons on the Start/Programs menu is important. See #2a & 3 and/or read the Windows Help file in the attachment for more details.
          (2a) The shortcut icons that are installed are: one icon to start the shadowed database from the Desktop and one icon to start the shadowed database from the Start/Programs menu plus a bunch of icons on the Start/Programs menu to start the network database directly. On the Start/Programs menu there is one icon each for the D: drive, the E: drive, the F: drive, etc. as far as you want to go because there is no way to tell what network drive a person ordering the program will be using. And, if there was, that doesn't mean they might not want to change it in the future.
          (3) The final step in the installation is for the installer to open the Start/Programs menu and select the Optimize icon for the appropriate network drive. Then, assuming they've read the instructions, the application starts (slowly!) and they go to the File Maintenance menu and click the Network Optimize button. From there on, it's automated.

          The only thing missing here is how to build the installation programs themselves but if you have the A5v4 Pro version that becomes quite easy.

          The only 'improvement' that I've considered so far is very minor. It might make more sense to leave the Full Optimize icons on the "Start/Programs" menu by themselves and put the icon that starts the shadowed files on just the "Start" button.

          For those who might be offended by it, I'll apologize now for the long, unbroken lines in the "ui_msg_boxes". I was just too lazy to change them - you can use word wrap to view the whole thing. Or, better yet, copy and paste the message box line to the Interactive script tab to see how it looks.

          Comment


          • #6
            RE: Automated Network Optimization

            In anticipation of those of you who might say, "Why not just copy the shadow files to each user's system?"

            OK, that can be done. But, how do you make sure the correct shortcut icons are installed for starting the application? The Wise installer that came with A5v4 Pro takes care of that automatically even if the user decides to save the program to a different drive or directory. AND, do you really want to trust someone who knows nothing about A5 to create and then copy the correct files?

            Comment


            • #7
              RE: Automated Network Optimization

              Hi Cal,

              Unfortunately, your methodology runs up into an idiosynchracy (bug?) of A5 when you run the optimize. After an Optimize, A5 automatically restarts, however the Master Path is still set to null. In addition, for some reason, it does not seem to execute global user-defined functions. The solution to this is to close A5 and then start up again. Unfortunately, after the code restarts, no additional code in the original script will be executed.

              I have attached code that does several things.
              1. It automatically computes the shadow path
              2. It places the code into an easily called function
              3. After placing a small amount of code into the Autoexec script, it closes A5 after the optimization
              4. It uses a simpler send_keys sequence

              Hope this helps out a bit.

              Regards,

              Ira J. Perlow
              Computer Systems Design & Associates
              csda@mediaone.net
              Regards,

              Ira J. Perlow
              Computer Systems Design


              CSDA A5 Products
              New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
              CSDA Barcode Functions

              CSDA Code Utility
              CSDA Screen Capture


              Comment


              • #8
                RE: Automated Network Optimization

                Cal,

                Of course, with something as complex as this, I had a couple of issues that I have corrected in a revised version.

                They are;
                1. Shadowed folder has same name as original folder, not the original adb file name
                2. Shadowed folder is off the private path, not the exe path (although they are typically the same)
                3. Created shadow folder in case we need to copy additionaly files there (e.g. Icon file, include command file, etc)
                4. I try to hide the control Panel as much as possible by minimizing it.

                It's worked pretty good for me so far.

                Regards,

                Ira J. Perlow
                Computer Systems Design & Associates
                csda@mediaone.net
                Regards,

                Ira J. Perlow
                Computer Systems Design


                CSDA A5 Products
                New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                CSDA Barcode Functions

                CSDA Code Utility
                CSDA Screen Capture


                Comment


                • #9
                  RE: Automated Network Optimization

                  Ira,

                  A few praises:

                  1. I REALLY LIKE the method for forcing a shutdown after a full optimize! This is a definite 'must have'.

                  2. The :controlpanel.hide() in the 'refresh opt.' area make sense. My program, since it is designed for distribution, already had the control panel closed so the need for this wasn't obvious to me.

                  3. The use of UI_YES_NO+UI_QUESTION_SYMBOL format makes sense for posting to the board. I apologize for this oversight on my part. Personally, I still like to use the numbers because I have them memorized and they are much faster to type. (I deal with SQA, or Supplier Quality Assurance, in the auto industry all the time so I use this to remember the numbers 16=S('stop'), 32=Q('question'), and 48=A('attention'). This only leaves 64 which is 'Info'. And, it's not very good but I use 'ocarina' to remember the response code sequence.)

                  4. {%F}{RIGHT}{LEFT} is obvious. I don't know why I didn't try it - just got caught in the rut I guess.

                  5. ANOTHER 'MUST HAVE': The option to copy new files to the shadow directory is a nice touch. I didn't think of that. I planned on having users simply re-install both the "Client" and "Network" installations for significant updates. (ie, those with new files.) After all, I would have to send them an update CD anyway. However, your method eliminates the need for someone to run multiple update installations on each user's computer - I send the update CD, they install the new program to the network and then have each user run a full optimize from the existing "Optimize" button - Slick!

                  And a couple comments: (see note at end)

                  1. There seems to be no reason for the lines:
                  Code:
                        ' Get path of A5 Table (shadowed or master)
                        getpath=iif(:A5.Get_Master_Path()=="",....
                  The "getpath" variable is never used again.

                  2. Similarly "adbnameonly" is never used once it's defined.

                  NOTE: I talked to Ira about these and he said:
                  "These are just artifacts from previous versions. However, some people may want to modify the directories or access files using these variables and these lines act as examples of directory calculations."

                  Comment


                  • #10
                    RE: Automated Network Optimization

                    This looks awesome, and something that is really needed. I have a simple question. Where do you put the bulk of the code? I understand that you put OptimizeNet()on a button's OnPush event, and that you put the next 7 lines in the autoexec script. But where do you put the the rest of the script that starts with OptimizeNet="" ??

                    Does all this go into a function by name of OptimizeNet ?? I have not used functions much so could you step me through this part of it. I would really appreciate it. If this does what it sounds like it does, it is a really nice addition, and I really, really thank you !!!

                    Gary Traub
                    Gary S. Traub, Ph.D.

                    Comment


                    • #11
                      RE: Automated Network Optimization

                      Gary,

                      Go to the code tab of the control panel. Select New, choose Function, enter the name Optimize Net. In the control window delete everthying it puts there. Then cut and paste the entire piece of code into that window from a text editor.

                      That creates a global function usable just about anywhere.

                      I almost always create functions as they are readily usable in many places within an application. Creating, Defining and using Functions will be one of the subjects of my talks at the Alpha Five Developer's Conference in December. And I've got a few other neat functions I'll be showing/discussing there. Hopefully, you'll be able to attend.

                      Regards,

                      Ira J. Perlow
                      Computer Systems Design & Associates
                      csda@mediaone.net
                      Regards,

                      Ira J. Perlow
                      Computer Systems Design


                      CSDA A5 Products
                      New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                      CSDA Barcode Functions

                      CSDA Code Utility
                      CSDA Screen Capture


                      Comment


                      • #12
                        RE: Automated Network Optimization

                        If you install Runtime on a work station, You cannot go to control pannel to do file network optimize.???
                        Am I missing something or do you have to have the full version on the work station to copy the shadow files to the work station?
                        Charlie Crimmel

                        Comment


                        • #13
                          RE: Automated Network Optimization

                          Charlie,

                          Start runtime, open app, close app, reopen app, close app menu.

                          Optimize should be available unless you have an a5.close() in the onexit of the menu form.
                          There can be only one.

                          Comment


                          • #14
                            RE: Automated Network Optimization

                            Charlie,

                            The point here is that I want an app that can be distributed by mail and used by people who don't even know it was programmed with A5. For these people, I don't even want them to know it was programmed in A5 or that the control panel exists. nbsp;I want all these 'behind the scenes' actions to be essentially invisible to them. nbsp;(This also means they are less likely to mess things up!)

                            In other words, this script isn't designed to help A5 programmers. nbsp;It's designed to help the non-A5 users of distributed A5 applications.

                            EX: nbsp;If you buy TurboTax do you ask what it was programmed in so you can become an expert and run special features in the source program? nbsp;Most people don't and that's the type of people I want to be able to sell this app to - computer dummies who want a training curve that is 5 minutes or less. nbsp;For some, 60 seconds is too long. nbsp;They have no reason to know anything about A5.

                            My specific target is project managers who have enough trouble just keeping up with their projects without learning how to develop/use a database program. nbsp;They just want a menu/system that walks them through it as easily as possible.

                            Hope this helps explain the purpose of the script.

                            Cal

                            Comment


                            • #15
                              RE: Automated Network Optimization

                              Oops. Sorry about all those "nbsp;" marks. My shortcut key for required spaces wasn't working right. It's fixed now!

                              Comment

                              Working...
                              X