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

Anyway to set the value of private_path with xbasic?

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

    Anyway to set the value of private_path with xbasic?

    Is there any way to use xbasic to set the value of the private_path, shared_path, and default_folder in Alpha5? The Help files only seem to indicate using View/Settings in the Control Panel to manually set these values. However, isn't there some kind of undocumented command that uses xbasic code to internally save these values, once the user defines them in the settings tab? I inquired with Alpha but haven't received a response yet.

    I realize that all the settings under the view tab are program specific rather than application specific. Nevertheless, making an application truly transportable requires that these program settings be handled. All their values can be setup and stored in the system registry using dot variables but that does no good if you can't write them into Alpha5 settings controls. Thanks.

    Gordon
    SCS

    #2
    Re: Anyway to set the value of private_path with xbasic?

    It's in the registry, under
    HKEY_CURRENT_USER\Software\Alpha Software\Alpha Five 9.0\init\paths

    where the keys are
    "databases", "images", "private", "shared" and
    "use_windows_temp"

    So to change the paths to something else, you would do something like

    paths.private="c:\private"
    paths.shared="c:\shared"
    paths.images="c:\images"
    paths.use_windows_temp=0

    registry.save_settings("init\paths",paths)

    (I haven't tested this -- let us know how it works!)

    Comment


      #3
      Re: Anyway to set the value of private_path with xbasic?

      Originally posted by Peter.Wayne View Post
      It's in the registry, under
      HKEY_CURRENT_USER\Software\Alpha Software\Alpha Five 9.0\init\paths

      where the keys are
      "databases", "images", "private", "shared" and
      "use_windows_temp"

      So to change the paths to something else, you would do something like

      paths.private="c:\private"
      paths.shared="c:\shared"
      paths.images="c:\images"
      paths.use_windows_temp=0

      registry.save_settings("init\paths",paths)

      (I haven't tested this -- let us know how it works!)

      Hi Peter,

      I finally got a response from Selwyn today and he sent me some undocumented xbasic code to handle this issue. What is interesting is that your way will work as well and I had not thought of using xbasic to adjust the values in the registry. In fact, I hadn't realized until earlier today that the registry already held all these settings in it. I am new at working with the registry.

      Here is what Selwyn shared which I believe others will find of interest.

      a5.System_Mode_Set( "paths.shared", varSharedPath)
      a5.System_Mode_Set( "paths.private", varPrivatePath)


      This use of the a5.System_Mode_Set() command is not documented. What I have learned is that every single event in Alpha5 behind the scenes reflects a command in xbasic. Ira mentions on his website that Alpha5 has almost 10,000 instruction sets of which 40% are not fully documented. That is allot. His commercial utility lists all of them and the use of some result in catastrophic errors since the correct syntax is not documented. So we test at our own risk with plenty of backup.

      Kind regards,
      Gordon
      SCS

      Comment


        #4
        Re: Anyway to set the value of private_path with xbasic?

        Originally posted by GordonMac View Post
        Here is what Selwyn shared which I believe others will find of interest.

        a5.System_Mode_Set( "paths.shared", varSharedPath)
        a5.System_Mode_Set( "paths.private", varPrivatePath)


        This use of the a5.System_Mode_Set() command is not documented.
        Actually, they are, kind of. See a5.System_Mode_Get help

        Originally posted by GordonMac View Post
        What I have learned is that every single event in Alpha5 behind the scenes reflects a command in xbasic.
        Well, mostly. There are a number that are driven by C code or Active X code
        Originally posted by GordonMac View Post
        Ira mentions on his website that Alpha5 has almost 10,000 instruction sets of which 40% are not fully documented.
        That's 10000 functions (or methods). I don't think I said 40% are not documented, but about 6000 are, so I guess that rings right.

        Originally posted by GordonMac View Post
        His commercial utility lists all of them and the use of some result in catastrophic errors since the correct syntax is not documented. So we test at our own risk with plenty of backup.
        .

        The CSDA Code Utility does not have a feature like that, although I do have an internal utility that does just that. I don't release it, because I don't feel it's an appropriate tool for most to have. Alpha could do it, but they'd have to spend a lot of time getting rid of junk code in the list that is old and no longer used. Many functions are left for backward compatibility, some are just junk code for testing, some for internal use by other functions, as well as some other types. I don't think any of them are really dangerous, but many of them are not useful, due to context being different. Nevertheless, many are useful, but are risky to use. If Alpha doesn't document them, they are also free to change them at any time.

        Or, as I've said for many years before the phrase became popular, "With Great Power, comes Great Responsibilty". Use with caution.

        I do make use of many undocmented functions (I think I'll have to add that to my code count utility that will be in the next version of my utility as a flag - that way you can decide if the risk is worth it!), but they are always as a last resort.

        More typically, I redo the function in my own, typically faster and with more features, code. But these are for large ROI (Return-On-Investment) in terms of speed or power or ease of use
        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


          #5
          Re: Anyway to set the value of private_path with xbasic?

          Hi Ira,

          Thanks for all your commentary. It is much appreciated. Yes, the function is listed in the help files but not with any examples of syntax used in the way I was shown... which is why I indicated it was undocumented.

          I was aware of the ActiveX code as an addin but was not aware of the C code. I had assumed early on that the platform was written in C (as most are) but when I saw so many of the internal references handled by xbasic, I started to think it may have been written almost entirely in xbasic. However, that seems unlikely since many of the application files appear to be saved in a more condensed almost semi compiled format. That would not likely be the work of xbasic. Anyway, these are just my observations and I am not a programmer such as youself.

          Sorry, I did not understand that you did not include those routines in your CSDA Code Utility. I remember reading something about it on your web site but didn't end up actually seeing it in the demo version of your utility. Now I don't have to spend hours looking for something that is not there.

          It is interesting that you mentioned all the old code in the Alpha5 engine. It seems to me that they could prune much of it out and then write some routines in a separate utility that would safely strip out the old outdated functions and commands when found in an application and replace them with the correct replacements. Of course, this may be a great deal easier said than done. Nevertheless, it can be done and perhaps should be done in order to consolidate and speed up their engine. Perhaps a simple redirection from old references to the new instruction sets would be th easiest way without changing the client's applications. At least a Beta version that could be tested and tuned... I know, money.

          I will be interested to see what you do with your next version of the CSDA Code Utility according to your above comments.

          Kind regards,
          Gordon
          SCS

          Comment


            #6
            Re: Anyway to set the value of private_path with xbasic?

            Originally posted by Peter.Wayne View Post
            It's in the registry, under
            HKEY_CURRENT_USER\Software\Alpha Software\Alpha Five 9.0\init\paths

            where the keys are
            "databases", "images", "private", "shared" and
            "use_windows_temp"

            So to change the paths to something else, you would do something like

            paths.private="c:\private"
            paths.shared="c:\shared"
            paths.images="c:\images"
            paths.use_windows_temp=0

            registry.save_settings("init\paths",paths)

            (I haven't tested this -- let us know how it works!)
            Hi Peter and Ira,

            Peter's method worked and the one sent by Selwyn didn't. In fact, I do not recommend using his a5.system_mode_set() suggestion. Although it did not error on execution, I was not able to edit any more of my scripts once executed. I had to exit Alpha5 and reload the program and application. This is what I used which worked perfectly:

            dim varSharedPath as c
            dim varPrivatePath as c
            varPrivatePath = "C:"+chr(92)+"Program Files"+chr(92)+"<AppFolder>\\"
            varSharedPath = a5.get_exe_path()+"\\"
            paths.private = varPrivatePath
            paths.shared = varSharedPath
            :registry.save_settings("init\paths",paths)


            Don't forget to use the colon before :registry.save_settings()

            Thanks so much for you help.

            Kind regards,
            Gordon

            Comment


              #7
              Re: Anyway to set the value of private_path with xbasic?

              Hi Gordon,

              Originally posted by GordonMac View Post
              Hi Peter and Ira,

              Peter's method worked and the one sent by Selwyn didn't. In fact, I do not recommend using his a5.system_mode_set() suggestion. Although it did not error on execution, I was not able to edit any more of my scripts once executed. I had to exit Alpha5 and reload the program and application.
              Despite the fact that you had problems with Selwyn's method, I would use an XBasic way that targets the functionality 1st before using such a raw method as modifying the registry. Alpha's storage to the registry can change between versions (e.g. ver 8 to ver 9) made entirely different items to the registry, but none to the XBasic call. In general, you do a5.system_mode_get(), modify some of the pointer properties, followed by am a5.system_mode_set() to change something.

              I know you couldn't get it to work, but that's how most, if not all, the settings are done within A5, and is the "proper" way to go for long term XBasic program reliability.
              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: Anyway to set the value of private_path with xbasic?

                Hi Ira,

                Yes, I agree with you completely and that is why I first went with the method shared by Selwyn. However, the syntax he shared is not correct since it doesn't change the settings in the settings tab nor does it save the changes to the registry on exit. In fact, the program code becomes currupted using that syntax, requiring an exit and reload. However, both the registry and the settings tab are updated immediately with Peter's method, which is effective for the current version of Alpha5.

                Nevertheless, you are absolutely right and that is why I wanted to handle the settings internally with xbasic and that was the reason for my asking Selwyn for the code suggestion. If Alpha only gave more examples of valid syntax it would give me a better clue to experiment with. I will look at it again. In the mean time, I have at least one method that works.

                In every instance, I make these kinds of calls to the registry conditional so that if the condition is already met, the autoexec script bypasses the call and leaves the registry alone. I have the condition set in both the script as well as the script that calls the script so that even a manual execution of the script will not change the registry if the condition is already met. I like belts and suspenders...

                Kind regards,
                Gordon
                SCS


                Originally posted by csda1 View Post
                Hi Gordon,

                Despite the fact that you had problems with Selwyn's method, I would use an XBasic way that targets the functionality 1st before using such a raw method as modifying the registry. Alpha's storage to the registry can change between versions (e.g. ver 8 to ver 9) made entirely different items to the registry, but none to the XBasic call. In general, you do a5.system_mode_get(), modify some of the pointer properties, followed by am a5.system_mode_set() to change something.

                I know you couldn't get it to work, but that's how most, if not all, the settings are done within A5, and is the "proper" way to go for long term XBasic program reliability.

                Comment

                Working...
                X