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

Form change when copying from one computer to a second computer

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

  • #46
    Re: Form change when copying from one computer to a second computer

    Sorry Tim, but after lots of trying - very trying, I can't figure out how to do the msgbox() thing

    "Change the autoexec code to only get the machine name and display it in a msgbox()."
    "Change the autoexec code to only display a form- first a form other than the two you have tried. then one of the two you do want."


    Can you please let me know the required code.

    many thanks
    Arthur

    Comment


    • #47
      Re: Form change when copying from one computer to a second computer

      If I run it from the code editor, it opens the specified form
      Arthur

      That is, after clicking on the icon, it opens up to the CP. Then clicking on the autoexec again, it opens the specified form. Hope that's what you mean or want to know

      Comment


      • #48
        Re: Form change when copying from one computer to a second computer

        From the interactive window access the variable page from the toolbar. Define your global variable 'machname' in the on initalize tab as

        machname
        = API_getmachinename()

        Then in your autoexec try

        Dim global machname as c
        If "ADC" $ machname then
        Form.view("your large form name here")
        Else
        Form.view("your small form name here")
        End if

        That will at least eliminate any double hyphen problem in the name. Do NOT change the machine name because your A5 license requires it.
        Robin

        Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

        Comment


        • #49
          Re: Form change when copying from one computer to a second computer

          Oddly, I just change the computer name and encountered no problem starting alpha. Of course I changed it back after the experiment.
          Dave Mason
          [email protected]
          Skype is dave.mason46

          Comment


          • #50
            Re: Form change when copying from one computer to a second computer

            Thank you Robin.

            Did all that and worked well when run from the interactive window - ie it selected and opened desired form.

            But when shut down and reopened from the icon or Programs>Alpha.exe, in both cases again only went to CP, not desired form????

            Short of selecting manually, changing computer name is starting to look like the only option.

            Arthur

            Comment


            • #51
              Re: Form change when copying from one computer to a second computer

              Originally posted by adcooke View Post
              If I run it from the code editor, it opens the specified form
              Arthur

              That is, after clicking on the icon, it opens up to the CP. Then clicking on the autoexec again, it opens the specified form. Hope that's what you mean or want to know
              Below should get you the message box test working but the fact that the code opens the correct form from the code tab means the code itself is ok. The message box should confirm if the autoexec is firing ok at start up.
              Code:
              dim machname as c
              machname = api_getmachinename()
              msgbox(machname)
              It is beggining to sound like there is some other setting amiss somewhere.
              Tim Kiebert
              Eagle Creek Citrus
              A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

              Comment


              • #52
                Re: Form change when copying from one computer to a second computer

                How are you spelling autoexec?
                Full name please?
                Other: Are you sure the settings are made to run autoexec on startup? I know you indicated so.
                There is a setting to run a form on start in the settings also, what is that set to??
                Dave Mason
                [email protected]
                Skype is dave.mason46

                Comment


                • #53
                  Re: Form change when copying from one computer to a second computer

                  Originally posted by DaveM View Post
                  How are you spelling autoexec?
                  Full name please?
                  I was about to ask the same question.
                  Tim Kiebert
                  Eagle Creek Citrus
                  A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                  Comment


                  • #54
                    Re: Form change when copying from one computer to a second computer

                    Tim and Bave

                    Definitely spelt A U T O E X E C (all in lower case, no spaces, and nothing after autoexec).

                    Settings>Autoexec Script>Execute the Autoexec Script - definitely set to YES

                    Startup Form>Display Startup Form> was set to YES ( I thought I had reset this to NO previously, but apparently not). So reset this to "NO", but again made no difference - starting via icon or All Programs>Alpha.exe - still goes straight to CP

                    Reset to Dave's autoexec with above resets, but still opens to CP
                    Reset to Tim's autoexec with above resets, but still opens to CP

                    Checked Startup>Default Control Panel Prompt> was set at YES, reset to NO - again made no difference - still opens to CP

                    Will now try Tim's msgbox routine, as now have code - sincere thanks again Tim & Dave.

                    Arthur
                    Last edited by adcooke; 11-09-2014, 02:38 AM.

                    Comment


                    • #55
                      Re: Form change when copying from one computer to a second computer

                      Reset autoexec to Tim's version, just to eliminate the double hyphen problem as he suggested.

                      Got Tim's msgbox working fine - definitely showed the correct machine/computer name - ADC-TOSHIBA-PC

                      Then checked Workplace Properties Library Tab as Tim suggested in Msg 41

                      "Check in the workspace properties library tab that there is only one library listed. Sometimes when copies are made there is still reference to a library(.alb file) in another folder. which may result in the wrong autoexec running".

                      Found only one .abl file listed, with correct database name.

                      Also tried Tim's further suggestion to to get it to open a third form

                      "Change the autoexec code to only display a form- first a form other than the two you have tried. then one of the two you do want".

                      It opened a third form fine when run from the interactive window, but again not after shutdown and restart via icon of Alpha.exe - still went to CP


                      So where to from here - this is crazy?? You guys have done immense work - but are we reaching the end, and have to change computer names to eliminate all hyphens, and all that implies with licencing at Alpha???

                      Arthur
                      Last edited by adcooke; 11-09-2014, 03:04 AM.

                      Comment


                      • #56
                        Re: Form change when copying from one computer to a second computer

                        I would debug autoexec to see how far it gets before dropping out (probable that's what it is doing)
                        and check the values at each line as it executes

                        Comment


                        • #57
                          Re: Form change when copying from one computer to a second computer

                          To expand on what mograce stated, put this as the last thing in your autoexec script.

                          'Open startup form
                          form.view("FormName","","","","","")
                          a5.window_title = "Your app Title"
                          a5.icon = A5.Get_Master_Path() + "\Your.ico"
                          a5.splash = A5.Get_Master_Path() + "\YourSplash.png"
                          'Hide the Control Panel.
                          :controlpanel.hide()


                          The a5.window_title, a5.icon and a5.splash are optional.



                          Using something similar with your autoexec would be like this.

                          'Date Created: 08-Nov-2014 03:25:37 PM
                          'Last Updated: 09-Nov-2014 01:01:07 PM
                          'Created By : ADC
                          'Updated By : ADC

                          'Set variables
                          dim global vc_startform as c
                          dim global machname as c

                          'Get Machine Name
                          machname = API_GETMACHINENAME()

                          'Set startup form
                          if machname = "ADC-TOSHIBA-PC" then
                          vc_startform = "CWSmall Clnt Simple set"
                          else
                          vc_startform = "CWSmall set for eMachine"
                          end if

                          'Open startup form
                          form.view(vc_startform,"","","","","")
                          'Hide the Control Panel.
                          :controlpanel.hide()
                          Last edited by preston2; 11-09-2014, 11:29 AM.

                          Comment


                          • #58
                            Re: Form change when copying from one computer to a second computer

                            I have display startup form set to yes in settings/system/preferences/startupform

                            I have default control panen set to yes in settings/system/preferences/startup


                            I can start the app by clicking the adb, through the alpha5.exe normal start up and choose the app or from an icon on the desktop. It always starts my dotimes form. If I insert the above, it will choose the appropriate form according to the computer.

                            See if you can best dupe what I have with your stuff.

                            A small app I have - autoexec.

                            a5.Maximize()
                            controlpanel.Maximize()
                            form.view("dotimes")

                            this is all that is in it.

                            adxxxxx1.jpg

                            This is a space where I test stuff.
                            Last edited by DaveM; 11-09-2014, 12:24 PM.
                            Dave Mason
                            [email protected]
                            Skype is dave.mason46

                            Comment


                            • #59
                              Re: Form change when copying from one computer to a second computer

                              Hi Arthur,
                              Have you actually created the script and named it Autoexec? Not trying to be sassy, just checking...
                              Robin

                              Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                              Comment


                              • #60
                                Re: Form change when copying from one computer to a second computer

                                I think a screenshot of your code tab on the control panel would satisfy Robin's question.
                                Last edited by Mike Wilson; 11-09-2014, 05:51 PM.
                                Mike W
                                __________________________
                                "I rebel in at least small things to express to the world that I have not completely surrendered"

                                Comment

                                Working...
                                X