My guess is that this AppleScript would be too much of a hassle for anyone to want to take on. But one or two folks might find it to be an interesting challenge and an added incentive is that I’ll donate $20 to MacScripter if site members work with me to fully develop this script. MacScripter and its members are great!
The purpose of this script is to create custom strings of rich-text that are formatted in such a way that they can be used as parseable task items for use in wiki.
When the user runs the script, the script should prompt the user for data for each of the six fields listed below. The process should proceed in serial, first getting the ‘context’, then the ‘date’, etc.
1 - context 2 - date 3 - minutes 4 - priority 5 - project 6 - notes
When the last piece of information (Notes) has been collected, then the script should paste the custom string of text (essentially a concatenation of some static text and the data collected in each step - see example below) into the location the cursor was when the script was run.
Each data field collection window should have an open input field on top and options listed below. The user can either manually input data into the open field or click on one of the options to have the open field populated by that data. When the user is satisfied with the information populating the input field, s/he can hit Return or click “Next” to proceed to the next window (or “Cancel”, to quit the script).
The options listed in each window (except for those in the Date window) should be populated from static text files. (Or, if it would significantly increase the performance of the script, the option values could be embedded in the script). Windows should be large enough to display all the options, unless the window would be too large, in which case there should be a scroll bar.
The options listed in the date window are more complicated - they need to be created dynamically each time the script is run (or at least each day the script is run). The current day plus the next 119 days should be listed in four columns of 30 days. The days should be listed like “Mon Sep 3”, “Tue Sep 4”, etc but when the user clicks on one of the options the input field should be populated like “2007-09-04”. (Is this too complicated?)
All entry fields should be 15 characters wide, except for the Notes field which should be 60 characters wide.
The users should be able to navigate through the script with the mouse, the keyboard, or a combination. With the keyboard, the user should be able to use tab to cycle from input field to option list to “Next” button and back. When a user has tabbed to the option buttons, s/he should be able to use the arrow keys to move among the options. When the user has navigated to the desired option, s/he should be able to hit the space bar (or the return key?) to “select” that option and populate the input field with its information. The user can then tab to the “Next” button and hit return to move to the next window.
The script should show the options that have been entered in previous steps in a “breadcrumbs” format.
The final output text string should look like:
@#: | EM | O | | | | | |
(although it should be highlighted yellow in rich-text format)
This url is to a page that shows some very mock-ups of how each window could look:
Model: PowerBook G4
Browser: Firefox 184.108.40.206
Operating System: Mac OS X (10.4)