![]() ![]() For starters, by default only three trigger keys (delimiters) are set up by default: Space, Tab and Return. TextExpander 3 does have some other limitations. Since it takes a bit of work to get the program set up the way you want it (specifying triggers, for example), it would be nice to not have to do so manually on other Macs. Unfortunately, you can sync only snippets you can’t sync program preferences. One ofTextExpander’s best features is its ability to sync your snippets to other Macs (and, if you have the TextExpander touch iPhone app, your iPhone or iPad touch too) via MobileMe or Dropbox. In addition, the program has a menubar icon, from which you can create, choose, even search your snippets collection. You can import and export snippets, and print them out for easy reference. It has hot keys that let you quickly enter new ones or to edit the last one you used. Hope that helps.TextExpander makes it easy to manage your snippets. ![]() This is one example of how you could tackle the lookup, and it is fully extensible. The output of the snippet of course reflects that. Note that I selected the “Statictics” course, which is instructed by “Mrs Chance”. When I enter the snippet Do101, I get a TextExpander fill-in form, and can complete the details as I might any such form. That’s the code explained, so how does it look? Here, the output building is the same, but we use the result we captured into the strCourse variable to act as the key name for strInstructors to return and output the name of the associated instructor. TextExpander.appendOutput("The instructor is " + strInstructors + ".\n") TextExpander.appendOutput("The assignment due date is %filltext:name:Enter the due date of the assignment%.") In reality, the fill ins can exist in a single string definition, but I figured it was a bit harder to read if you aren’t familiar with JavaScript scripting in TextExpander.Į.g. I’ve separated the text stings a little just so you can see how the different parts piece together each time. These are all single line fill in fields whose content also gets passed to the output generated at the end. TextExpander.appendOutput("The student is " + "%filltext:name:Enter the name of the student%" + ".\n") Īnd TextExpander.appendOutput("The assignment due date is " + "%filltext:name:Enter the due date of the assignment%" + ".") This adds a line of text naming the selected course to the output that is generated at the end of expansion. TextExpander.appendOutput("The course is " + strCourse + ".\n") ![]() This is the comma separated list of key-value pairs within the curly braces. I guess that would effectively be building a new level of dynamic snippets.Īgain, you would have to maintain the course to instructor associations. Ideally I would have liked to build the pop-up list from the list of available key values as they are a duplication of the list of courses, but TextExpander’s snippet expansion has no ordering of expansion, and to date. The next piece is an object that defines some key-value pairs that match up the name of an instructor to the name of a course. You would need to maintain this line with a list of the courses as per a typical TextExpander fill-in popup menu. This line sets a variable strCourse to be the result of the user selecting from four courses - Calculus, Trignonmetry, Statistics and Logic. let strCourse = "%fillpopup:name=Select a course:Calculus:Trigonometry:Statistics:Logic%" I’ll break down it down to describe what each piece is doing. TextExpander.appendOutput("The assignment due date is " + "%filltext:name:Enter the due date of the assignment%" + ".") TextExpander.appendOutput("The assignment is " + "%filltext:name:Enter the name of the assignment%" + ".\n") TextExpander.appendOutput("The student is " + "%filltext:name:Enter the name of the student%" + ".\n") The code I put together for this example snippet is as follows: let strCourse = "%fillpopup:name=Select a course:Calculus:Trigonometry:Statistics:Logic%"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |