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

check for new versions

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

    #31
    Re: check for new versions

    Originally posted by Raymond Lyons View Post
    But wait, why would I want to spend $30 when I can build my own in about $300 worth of my time?
    That is the problem with the industry my apps target. They would rather spend 10k in time to get out of buying a $100.00 program. Just human nature I guess.

    Comment


      #32
      Re: check for new versions

      Originally posted by DaveM View Post
      Ray,
      I am almost positive he is looking to give update or information from his own website. (I think).
      a simple text file with one line including the newest up date is all that is needed.
      bring it to your site with and ftp function. read the first line with alpha to a variable, compare it to the variable for current in the adb and pop a message box up if needed. With a choice from that, can do nothing or can download the update file to wherever necessary (like desktop). the run the update. All is good again.

      I am working on that whole thing right now and will share all the details when done and fully tested.

      Similar is also going to be used for app registration. Again, I will share it when done.

      A little precursor to this though. I used cpanel to create a folder in ftp and then a ftp user name to go directly to that folder. text file is name newest.txt. One line in it is "15.0514"(without the quotes) to match the date like I use for my apps.
      The app version is in the adb, so any updates I put there will include the adb and any other changes applicable to my app.

      What I showed above in another post was an image from filezilla. That is not the final, but a rough idea.
      Dave, did you ever get any of this working?

      I need to do something similar but not for checking for new versions.

      What I would like be able to do is read a txt file on the web. Then read each line in the text file and compare to a value I will pull from the registry.

      Reading the value from the registry is easy but pulling a file from the web and then reading each line to compare against the value in the registry is giving me trouble.

      What I am trying to do is have my app read the file on the web which will contain canceled registration numbers. If the registration number matches one of the canceled numbers in the text file then I will have the app pop up a dialog telling them their license has been canceled and then shut the app down.

      I have had a few customers do the trial of my app, then buy it and get a registration number only to tell their CC company a few weeks later that they did not make the purchase. I end up getting a charge back and they end up getting my app for free. This is rare but there are some out there that just try and screw you out of money.

      So I need a way to shut the app down if they try and jip me out of a them money. If you get what I mean.

      Comment


        #33
        Re: check for new versions

        I understand fully. I would just download the file(can be any name) and read it on the machine. Then delete it after it is read.
        Using ftp, that should be easy.
        I use them like a csv then they could even be imported to a table then checked? Of course delete all of it when done.
        If a client paid no money, I would simply do what you are doing.
        No I have not been any further with it. Other pressing matters. I need to do it though.
        Dave Mason
        [email protected]
        Skype is dave.mason46

        Comment


          #34
          Re: check for new versions

          Ok, continuing from my post above.

          I bastardized an example in the docs that was showing how to read a rss xml file in.

          Ended up with this so far.

          Code:
          bad = http_get("http://www.shopcalsoftware.com/t5/nogood.txt")
          if .not. eval_valid("bad.body")
              ui_msg_box("Error","The Verification file was not downloaded from the server.",UI_STOP_SYMBOL)
          else
              dim num_regs as N
              num_regs = count_textblocks(bad.body,"<item>","</item>")
              dim item[num_regs] as P
              dim i as N
              dim this_item as C
              for i = 1 to num_regs
                  this_item = extract_string(bad.body,"<item>","</item>",i,.t.)
                  item[i].badnum = extract_string(this_item,"<badnum>","</badnum>")
          next i
          'now do something with this, like put it into a table or build an output file.
          a5_show_variable(property_to_string(item))
          end if
          This reads a text file that is laid out like this.

          <item>
          <cust>Jipster</cust>
          <badnum>0563-6382-2534-5784-2048</badnum>
          </item>
          <item>
          <cust>Punk</cust>
          <badnum>8384-0790-7574-2680-7078</badnum>
          </item>
          <item>
          <cust>Crook</cust>
          <badnum>8681-0134-4580-0786-3748</badnum>
          </item>
          <item>
          <cust>Tinhorn</cust>
          <badnum>8287-0725-8520-7389-7108</badnum>
          </item>

          The <cust> </cust> lines will not be read as they will only be for me to find the cheapskate in case they decide to pay me and want their app to run again.


          It returns these results.

          <[1]<badnum="0563-6382-2534-5784-2048">
          >
          <[2]<badnum="8384-0790-7574-2680-7078">
          >
          <[3]<badnum="8681-0134-4580-0786-3748">
          >
          <[4]<badnum="8287-0725-8520-7389-7108">
          >

          Now to work on stripping the number out of those results so I could then have a value like 8384-0790-7574-2680-7078.

          I would then check each cleaned up result against the value I read from the registry and if there is a match shut the app down.

          The comparison test will be done before each loop cycle (next i)

          The main thing is reading the file and getting numbers is working very good. Just need to strip the excess garbage off the string so the comparison can be done.

          Comment


            #35
            Re: check for new versions

            If the number to check against the reg number is = "0563-6382-2534-5784-2048" and the version on the registry is ="05636382253457842048" then just remspecial(the first number) an they will match.
            Dave Mason
            [email protected]
            Skype is dave.mason46

            Comment


              #36
              Re: check for new versions

              Originally posted by DaveM View Post
              If the number to check against the reg number is = "0563-6382-2534-5784-2048" and the version on the registry is ="05636382253457842048" then just remspecial(the first number) an they will match.
              regnum.png

              And before anyone ask, if they remove or modify the number in the registry the app will not run.

              Comment


                #37
                Re: check for new versions

                Ok, got it working and the registration number gets read, compared and then traps to a dialog if the customers reg number is on the bad list.

                This may not be the cleanest way to do it but it does work.

                nogood.txt file layout.

                <item>
                <cust>Jipster</cust>
                <badnum>0563-6382-2534-5784-2048</badnum>
                </item>
                <item>
                <cust>Punk</cust>
                <badnum>8384-0790-7574-2680-7078</badnum>
                </item>
                <item>
                <cust>My Dev Machine number for testing the trap</cust>
                <badnum>4887-5748-5796-1476-5159</badnum>
                </item>
                <item>
                <cust>Crook</cust>
                <badnum>8681-0134-4580-0786-3748</badnum>
                </item>
                <item>
                <cust>Tinhorn</cust>
                <badnum>8287-0725-8520-7389-7108</badnum>
                </item>

                Revised test code.

                Code:
                'Date Created: 08-Jul-2015 09:19:09 PM
                'Last Updated: 09-Jul-2015 09:16:50 AM
                'Created By  : ShopCal
                'Updated By  : ShopCal
                bad = http_get("http://www.shopcalsoftware.com/t5/nogood.txt")
                if .not. eval_valid("bad.body") 'This does not work yet for some reason so I may just take it out anyway. They may not have internet connection every time they run the app.
                    ui_msg_box("Error","The Verification file was not downloaded from the server.",UI_STOP_SYMBOL)
                else
                    dim num_regs as N
                    num_regs = count_textblocks(bad.body,"<badnum>","</badnum>")
                    dim item[num_regs] as P
                    dim i as N
                    dim this_item as C
                    dim numstring as c
                    dim fixed_L as C
                    dim fixed_R as C
                    dim bad_num as C
                'debug(1)    
                    for i = 1 to num_regs
                        this_item = extract_string(bad.body,"<badnum>","</badnum>",i,.t.)
                        item[i].badnum = extract_string(this_item,"<badnum>","</badnum>")
                        numstring = this_item
                        fixed_L = ltrim(numstring,"<[1]<badnum>")
                        fixed_R = Rtrim(fixed_L,"</badnum>")
                        bad_num = fixed_r
                        if bad_num = vc_reg_num then
                        	'Displays a message box (style:'OK Button', image: 'Information symbol', id: 'delined_reg').
                DIM SHARED  delinedreg_result as N
                DIM SHARED  delinedreg_OK_Button as L 
                delinedreg_OK_Button = .F.
                
                title_var = "Declined Registration Number"
                message_text_var = <<%text%
                Your registration number has been declined for one or more reasons.
                
                Please contact [email protected] if you feel this is in error.
                %text%
                delinedreg_result=ui_msg_box(title_var,message_text_var,UI_OK+ UI_FIRST_BUTTON_DEFAULT+ UI_INFORMATION_SYMBOL)
                'Test to see which button on the message box was pressed....
                SELECT
                	CASE delinedreg_result = UI_OK_SELECTED
                		delinedreg_OK_Button= .t.
                END SELECT
                'Kick them out of the app here or send them to the support site. Also write to a table to set the app as disabled.
                'This will keep the app from running if they do not have internet connection the next time they start the app.
                        end if
                next i
                
                end if
                In the above code the variable vc_reg_num is gotten using this code in the autoexec script.
                Code:
                vc_reg_num = registry.sys_get( "HKey_current_user\Software" + chr(92) + company_name + chr(92) + adb_name + "\reg_no" )
                A declined registration number will then get a message like this and when I finish the code it will shut down the app or take them to my support site after they click the "Ok" button.


                If you want to test this for yourself just take the above code as is, manually give vc_reg_num a value of one of the bad numbers shown in the nogood.txt file and then run the script. I am going to leave the nogood.txt file there. The actual file I will using in my app will have a different name and be in a different location.
                Last edited by preston2; 07-09-2015, 03:49 PM.

                Comment

                Working...
                X