Re: check for new versions
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.
Originally posted by Raymond Lyons
View Post
Alpha Software Mobile Development Tools: Alpha Anywhere | Alpha TransForm |
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
'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
vc_reg_num = registry.sys_get( "HKey_current_user\Software" + chr(92) + company_name + chr(92) + adb_name + "\reg_no" )
Comment