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

sorting documentation favorites

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

    sorting documentation favorites

    always bothered me when I added topics to favorites, that I couldn't easily find them. so I wrote some code to sort them.

    it works with alpha anywhere 12 and windows 10, that's all I've tested it on. didn't really write any error checking into it, but it serves my purpose.

    in case anyone wants it, here it is.
    Code:
    dim file_to_open as c
    dim fav_list as c
    dim i as n
    dim txt as c
    dim new_list as c
    dim sav_list as c
    dim file_pointer as p
    DIM q AS N
    
    file_to_Open = win_special_folder("appdata") + chr(92) + "Alpha Software\Alpha Anywhere Version 12\Installations\CProgramFilesx86a5V12\localDocumentationFavoritesList.txt"
    
    fav_list =get_from_file(file_to_open)
    
    for i = 1 to line_Count(fav_list)
    	txt =word(fav_list,i,crlf())
    	if "]" $ txt then
    		new_list = new_list + filter_string(txt,"[","]",.t.) + crlf()
    	end if
    next
    
    new_list = sortsubstr(new_list,crlf())
    
    for q = 1 to line_count(new_list)
    	if q = 1 then
    		sav_list = "<a_favorites<[" + q + "]" + word(new_list,q,crlf()) + crlf()
    	else
    		sav_list = sav_list+  "<["+ q + "]" + word(new_list,q,crlf()) + crlf()
    	end if
    	sav_list = sav_list + ">" + crlf()
    next
    sav_list = sav_list + ">"
    
    file_pointer =file.create(file_to_open, FILE_RW_EXCLUSIVE)
    file_pointer.write(sav_list)
    file_pointer.flush()
    file_pointer.close()
    ui_msg_box("Complete","Favorites Sorted")

    #2
    Re: sorting documentation favorites

    Thanks Gary, that is something I always wanted to do too. In a button on the control panel toolbar should be just the place to put it.
    Robin

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

    Comment


      #3
      Re: sorting documentation favorites

      I'm going to try your script. "Searching for things" (in general) has always been a task in a5.

      On a related note: I was always frustrated searching for code in my code libraries. So several years ago, I had written a similar routine that extracts a list of your code libraries and extracts the data for FAST/EASY integration into a free tool that provides full/wildcard searches on the code in the libraries.

      Here's how it works. (Extracts/preps multiple a5 code libraries, in one swoop with just a few mouse clicks. ~ You'r code libraries DO NOT change in a5. They are only read by script.)
      Select the libraries you want, and it extracts all the data (from selected code libraries) and creates a text file formatted properly for EASY/FAST import int this free tool: http://fishcodelib.com/CodeLibFree.htm Their download link (to a file Notes.zip) is at bottom left of their web page & IMO confusing/difficult to locate. (FWIW: Their main page fishcodelib.com features some other interesting tools I have not tried.)

      When this tool imports files created by the a5 script, it creates a separate .mdb files for each library.
      But.... the "wildcard search" searches all the imported .mdb files for anything you're looking for.

      I found this solution works GREAT because I organize my code library by project. (Each new project gets a new code library of the stuff I'm presently working on.) Makes it easy to find stuff I'm presently "working on." and then each code library integrates into this tool. (And becomes a great reference/resource down the road because of it's search capabilities.)

      If anyone is interested, here's the function below. (Just double click & run the function from the control panel. It doesn't have error code either, but I've never had it hang on anything.) ~ I had some pretty strange stuff in my old code libraries lol.

      Note: I haven't run it for a while but I believe it still works fine. (As of a few weeks ago, I can confirm that it does find the a5 code library items in a5 v12. ~ So I presume it's still fully functional, even with the new version of the free tool which I haven't tried.) Important: The tool you'll need to use/download (to work with my script) is "Library .NET", NOT the "Database.NET"
      PS: I simply add this function to each of my projects at the very beginning (and create a new library for each project.) ~ Works like a charm for me, ymmv.
      Code:
      'Date Created: 04-Feb-2014 03:03:54 PM
      'Last Updated: 10-Feb-2014 07:40:41 PM
      'Created By  : Robert Tupper
      'Updated By  : Robert Tupper
      'VERSION: __LibraryExport12_fnc
      'Usage/copyright restrictions:  Free to use, but not for sale/resale.
      
      FUNCTION __LibraryExport_fnc AS C (vc_NewFileName as C = "_tmp.txt" , vc_LibName AS C = "" , vc_DestPath as C = A5.GET_PATH())
      	'debug(1)
      
      	'STEP1:  GET LIBRARY FILES TO EXPORT
      	dim vc_DefDir as C = a5_getcodelibraryfolder()
      	dim vc_SelectedFileList as C = vc_LibName  'can remove vc_SelectedFileList IF change vc_LibName parameter above
      	dim vc_LibraryName as C
      	
      	'dim vp_Ptr as P
      	dim vn_LibraryItems as N
      	dim vn_loop as N
      	
      	dim vc_TempDir as C = "_LIB-" + file.filename_parse(a5.Get_Name(),"N") + ".tmp" 'temporary directory
      	'dim vc_TempDir as C = "_LIB-" + file.filename_parse(a5.Get_Name(),"N") + "." + time("yyMMdd") 'temporary directory
      
      	dim vc_Path as C = file.filename_parse(a5.Get_Name(),"DP") + vc_TempDir 'path displayed at end, sent to clipboard for conveneince of import
      	'msgbox(vc_Path)
      	'end
      	
      '//MAPPING: 'BAD CHARACTERS& ^ ` [ ] # etc.....
      	dim vc_BadChars as C =  "^" + crlf() +    "`" + crlf() + "[" + crlf() +    "]" + crlf() +    "#" + crlf() +   "*" + crlf() +  "<" + crlf() +    ">" + crlf() +    "?" + crlf() +    ":" + crlf() + "|" + crlf() +    "/" + crlf() +    "\\" + crlf() +   "'" + crlf() + chr(34)
      	'dim vc_GoodChars as C = "(Vi)" + crlf() + "'" + crlf() + " b{ " + crlf() + " }b " + crlf() + "(Ht)" + crlf() + "%" + crlf() + " v{ " + crlf() + " }v " + crlf() + "(Qm)" + crlf() + ";" + crlf() + "(Pp)" + crlf() + "(Fs)" + crlf() + "(Bs)" + crlf() + "'" +  crlf() + "''"
      	dim vc_GoodChars as C = "" + crlf() + "'" + crlf() + " b{ " + crlf() + " }b " + crlf() + "(Ht)" + crlf() + "%" + crlf() + " v{ " + crlf() + " }v " + crlf() + "(Qm)" + crlf() + ";" + crlf() + "(Pp)" + crlf() + "(Fs)" + crlf() + "(Bs)" + crlf() + "" +  crlf() + "''"
      	dim vc_CleanString as C
      	
      	dim vp_TextFile as P
      	'dim vp_TextFile as P
      	dim vc_NodeType as C
      	
      	vc_NodeType = ui_get_text("Type","OPTIONAL:  Enter 'Node' Type (\"KISS\" method/two letters suggested):","xB")
      	
      	if vc_SelectedFileList = "" then
      		vc_SelectedFileList = ui_get_files_multiple("Select File",vc_DefDir,"*.clip_lib")  'get files for export
      	end if
      	
      	'STEP2:  GENERATE DIR & FILE TO STORE TEXT FILES
      	'debug(1)
      	if .not. A5_IS_PATH_VALID(A5.GET_PATH() + chr(92) + vc_TempDir)  'generate directory: if not exist
      	DIR_CREATE(A5.GET_PATH() + chr(92) + vc_TempDir)
      	end if
      	
      	for each Enum_Item in vc_SelectedFileList
      
      		vc_LibraryName = file.filename_parse(Enum_Item.value,"N")  'this is the list of code library items
      		'msgbox(vc_LibraryName)
      
      		'redim vp_Ptr.code as P
      		'vp_Ptr.code.RESIZE(1)
      		'vp_Ptr.code.description.resize(1)
      		'debug(1)
      		dim vp_Ptr as P
      		property_from_string(vp_Ptr,get_from_file(A5_GetCodeLibraryFilename(vc_LibraryName)))
      		vn_LibraryItems = vp_Ptr.code.size()
      		'vp_Ptr.code.RESIZE(1)
      		'showvar(vp_Ptr)
      		'ui_msg_box(vc_LibraryName,vn_LibraryItems)
      		'debug(0)
      		for vn_Loop =  1 to vn_LibraryItems 'Inner Loop: through items in individual library and write to file
      			
      			'generate and open text file: providing it does not exist
      			vc_CleanString = stritran_multi(alltrim(vp_Ptr.code[vn_Loop].description),vc_BadChars,vc_GoodChars)
      			'create (and write) data to text file
      			vp_TextFile = file.create(A5.GET_PATH() + chr(92)+ vc_TempDir + chr(92)+ alltrim(vc_CleanString) + "  ." + vc_NodeType,FILE_RW_EXCLUSIVE) 'text file created and open
      			'msgbox(A5.GET_PATH() + vc_TempDir + chr(92)+ alltrim(vc_CleanString) + "  ." + vc_NodeType)
      			'msgbox(A5.GET_PATH() chr(92) + vc_TempDir + chr(92)+ alltrim(vc_CleanString) + "  ." + vc_NodeType)
      			vp_TextFile.write("'SUBJECT: " + alltrim(vp_Ptr.code[vn_Loop].description) + crlf()) 'SUBJECT
      			vp_TextFile.write("'SOURCE: " + alltrim(vc_LibraryName) + crlf()) 'SOURCE
      			vp_TextFile.write("'ENTRY TYPE: A5-Library" + crlf())
      			vp_TextFile.write("'USAGE: Alphasoftware" + crlf())
      			'vp_TextFile.write("'SOFTWARE: Alpha5 v" + version("v / b - e (c)") + crlf())
      			vp_TextFile.write("'SOFTWARE: Alpha5 v." + version() + "x Build: " + version("b - e (c)") + crlf())
      			'vp_TextFile.write("'DATE: " + time("yyyy.MM.dd") + crlf())
      			vp_TextFile.write("'--------------------------------------------------" + crlf())
      			vp_TextFile.write("'ORIGIN: " + file.filename_parse(a5.get_name(),"NE") + crlf())
      			'vp_TextFile.write("'ORIGIN: " + "Base Export" + crlf())
      			vp_TextFile.write("'ENTRY DATE: " + time("yyyy.MM.dd") + crlf())
      			vp_TextFile.write("'ORIGIN: " + file.filename_parse(a5.get_name(),"NE") + crlf())
      			vp_TextFile.write("'LINK: " + "www.AlphaSoftware.com" + crlf() + crlf()+ crlf() + crlf())
      			vp_TextFile.write(alltrim(convert_type(vp_Ptr.code[vn_loop].code, "C")) + crlf())
      			'vp_TextFile.write("====================<END|BREAK>====================" + crlf())
      			vp_TextFile.close()
      			'msgbox(vc_LibraryName,vc_CleanString)
      			'?a5_get_var_names()
      
      		next
      		delete vp_Ptr
      		
      	next
      	clipboard.Set_Data(vc_Path)
      	__LibraryExport_fnc = "vc_Path"
      END FUNCTION
      
      	
      '==================================================================================================	
      
      msgbox("EXPORT","Export completed & directory copied to clipboard!" + crlf() + __LibraryExport_fnc())
      Last edited by SNusa; 02-26-2017, 01:20 PM.
      Robert T. ~ "I enjoy manipulating data... just not my data."
      It's all about the "framework." (I suppose an "a5-induced" hard drive crash is now in order?)
      RELOADED: My current posting activity here merely represents a "Momentary Lapse Of Reason."

      Comment

      Working...
      X