AppleScripts for Helix
The scripts on this page are available free of charge to all Helix users. More scripts are available exclusively to subscribers of the Learning AppleScript with Helix self-paced tutorial.
Scripts are grouped based on which icon type they (primarily) work with. Those prefixed with a version number require that version or later.
Field
- Rebuild Keyword Indexes: This script rebuilds just the keyword indexes in a collection. This is faster than breaking all indexes via Helix Utility when changing the HKWT resource. Updated to handle large indexes without a timeout, and to add better logging. (Hat tip: Lenny Eiger) (v1.1: Jan 7, 2014)
- Expose Field Datakeys: This script exposes the internal ‘datakey’ property of selected fields, adding it to the comments for that field. If one or more fields are selected, just the selected fields are processed; if no fields are selected, every field in the open/selected relation is processed. This script is useful when troubleshooting HSCM resource issues. (v1.0: Oct 31, 2016)
- Find Picture Fields: This script displays a list of every field whose data type is picture in a collection, and provides options to reveal them in their relations or to display a list of places where they are used. (v2.0: May 15, 2017)
Abacus
- Abacus Expression Language Exporter: This script creates a text file containing every abacus (including form query and power query statements) in its Abacus Expression Language (AEL) format. Examining how existing abaci appear in AEL will help you begin to see how you can create a complete abacus via this text-based language. (v1.0: Dec 10, 2011)
- Examine Tile Constant: This script displays ‘byte by byte’ details of a constant (text typed into a tile socket). (v1.0: Mar 21, 2017)
- Find Specified Tile Instances: This script locates all instances of a specified tile (or tiles) in a collection. If you can’t remember that one place where you used the Tan ◊ tile, this will find it. Requires Helix 7.0 or later. (v1.2: Apr 21, 2017)
- Find Text in Abaci: This script locates abaci whose expressions contain a specified string of text. If you need to find every place where you entered a value in a constant, or referenced a particular icon, this will find and open them. Requires Helix 7.0 or later. (v1.0: Oct 2, 2017)
- Make A Constant: This script shows how to use the Abacus Expression Language (AEL) to create any abacus constant. It includes some user interaction code. (v1.0: Jan 16, 2012)
- Make True Constant: This script shows how simple it is to use the Abacus Expression Language (AEL) to create an abacus constant for ‘true’ in the front relation window. (v1.0: Jan 16, 2012)
- Re-Optimize All Abaci: This script addresses a bug that exists in Helix RADE 6.2b9 (5773) thru 6.2b16 (5850). See the Preliminary Release 17 Release Notes for more details. See comments in script for change history. (v1.2: Nov 16, 2012)
Collection/Relation
- Cascade Icons: Helix RADE 6.2 has improved built-in commands to clean up and arrange icons, but these commands are limited in the icon arrangements they produce. This script gives you expanded control over the icon arrangement: four editable properties let you easily sort icons by kind, with control over the horizontal and vertical spacing, and more. (v1.0: Nov 10, 2012)
- Count Icons: This script counts each icon type in a collection. A simple dialog reports the results. (v1.0: Feb 24, 2014)
- Find Auto Open Views: Creating posts that auto open a view is a technique that has largely fallen out of favor, as better methods of accomplishing the task (posting to global, etc.) have been developed. This script finds all instances of auto open views and creates a report, so you can review them for potential replacement. (v1.0: Oct 11, 2017)
- Find By Name: This script finds all icons whose name starts with or contains a specified string. (v1.2: Jan 17, 2017)
- Find Modded Icons: This locates icons in relations whose comments contains a specified string. If you add a consistent comment as you modify icons, this will select them all quickly, making the creation of clippings much easier. (v1.0: Aug 13, 2014)
- Icon Modification Order Report: This script creates a report of which icons have been modified since a user-specified date, in modification order. Requires BBEdit and macOS 10.10 or later. (v1.0: Jul 6, 2017)
- Make Complete I/O Sequence: This script creates a ‘raw import/export’ view in each relation, sets them to import/export to the folder of your choosing, and adds them to a pair of sequences (one for importing, one for exporting). The sequences should then be able to export all data (except Pictures) from a collection and import it into an identical empty collection. (Assuming the data passes all validations.) (v1.0: Jul 16, 2015)
- Make Nested Colors: This script redefines entries 100–108 in the Helix color table to match the colors macOS uses when framed group boxes are nested. The script also demonstrates how to make a rectangle and set it to the matching color. (v1.0: Nov 9, 2012)
- Remove Linefeeds In Icon Names: A bug in Helix 5.0 and earlier could result in linefeed (return characters) being added to icon names. This script examines the whole collection, removing those characters wherever found. (v1.0: Jan 10, 2015)
- Remove User Name Security (from Sequences and Users): The ”User Name Security” dialog is obsolete, but may be available in the sequences and user menus of existing collections. (A future Helix update will remove it automatically — This setting is now controlled via a property in the Inspector or through AppleScript.) This script removes instances of the command from all sequence and user icons in the open collection, and writes a report detailing the findings as a tab delimited text file. 2.0 adds user icon checking. (v2.0: May 5, 2014)
- Reset Buttons to Default Style: This script removes Classic font style and color information from every command rectangle (button) in a collection. (v1.0: Mar 22, 2016)
- Reveal In Finder: A simple script that opens a Finder window containing the currently open collection. Demonstrates how to access the collection file. (v1.0: Dec 13, 2011)
- Select All Unused: This script selects the unused icons in the active collection or relation window. By default, it excludes indexes from the selection; there is an editable property to change if you want indexes included. (v1.0: Feb 26, 2014)
- Select Icons Modified Since: This script selects the icons modified after a specified date, using the modification date property of Helix 7.0. v1.0.1 fixes a bug that caused ‘PM’ in date input to be ignored. (v1.0.1: Jul 6, 2017)
- Stack Relations: This script arranges all of the relations in a collection in a tight stack, switches them to icon mode, resizes them to show all of the icons (if possible), and sets the width of the window to an appropriate size. Uses the new display mode and columns properties of Helix 7.0. (v1.0: Dec 22, 2016)
- Unlock All Icons: This script turns off the locked property for every icon in a collection. This important when applying structure, as locked icons can not be updated via apply structure. (v1.0: Oct 16, 2015)
Index
- Find Dates Converted to Text: This is an updated version of the ‘Find Dates as Text in Indexes’ script that appeared here before. This new script examines the collection to find any abaci that include dates that are converted into text. This will also find abaci that are not an issue, but reporting false positives is better than overlooking potential trouble spots. The script retains the ability to rebuild indexes that include dates as text. Changes in Helix 7.0.2 that make this collection exam necessary are detailed in the ‘Show Century’ flag in Helix 7.0.2 technote for details, which is where you can also find a link to download the script.
- Rebuild All Indexes: This script rebuilds every index in a collection, one by one. This is useful if you encounter an old Helix bug that results in bad indexes when they are rebuilt en masse. (v1.0: Dec 19, 2012)
- Rebuild Select Indexes: This script rebuilds only indexes related to the currently selected (or open) icon. (v1.0: Dec 19, 2012)
- Rebuild Keyword Indexes: See the ‘Field’ section above for a description.
Post
- Detail Post Setups: This script writes a report that details every post setup in a collection. (v1.0: Aug 10, 2012)
- Print Posting Finder: Technote R6112 details potential logic issues when using Print Posting. This script writes a report that details every view in a collection that uses Print Posting. (v1.0: Jan 29, 2014)
Query
- Convert Form Query to Power Query: This script converts form queries to power queries, by transferring data rectangles from the form query template into the “searchable items” list of the power query. The script also searches the relation for abaci that are valid “reference items” and adds them to the power query. Lastly, it reports the result of the conversion, and whether there were any non-editable query items on the form query. Currently Helix can not transfer an existing ‘completed search statement’ from a form query to a power query, so it is written into the comments of the power query, as an aid in recreating the existing search statement. (v1.0: Feb 8, 2017)
Sequence
- Detail Sequences: This script details the contents of one or more sequences, providing options to display the details in a dialog, copy them to the clipboard, or to write them to a BBEdit window. (v1.0 Jan 24, 2017)
- Add Draw Screen (to Sequences): This script inserts a draw screen command after every step of the selected sequences. This should alleviate issues related to sequences that “get ahead of themselves.” A list of sequences is presented so the user can choose which ones to modify. Version 2.0 adds much-needed intelligence to the script, inserting draw screen commands only when necessary. (v2.0 May 5, 2017)
- Remove Draw Screen (from Sequences): Sick of the Draw Screen commands added via the “Add Draw Screen” script? This script removes the draw screen commands from the selected sequences. A list of sequences is presented so the user can choose which ones to modify. (v1.0: Mar 14, 2012)
- Find Printing Sequences: This script examines every sequence in a collection and reports those that contain any of the print commands (page setup, print form, find and print all) along with the ‘show dialogs’ state of each one. It is important that sequences that print be able to show dialogs to assist in troubleshooting printing issues. The script also offers to switch sequences set to ‘Never’ to ‘Optionally’ show dialogs. (v1.0: Dec 10, 2011)
- Insert Page Setup in Printing Sequences: All sequences that print should have a Page Setup command in them just before the Print command. This script expands on the Find Printing Sequences script by creating a new sequence set to Optionally show the Page Setup dialog (when the Option key is held down) and inserting it just before every Print Form or Find and Print All step in the sequences in a collection. It has a bit of intelligence to avoid adding Page Setup where it already exists, but even so, the modified sequences are opened as they should be reviewed for accuracy. This script also reports on the status of printing sequences, just like Find Printing Sequences, but this script is much more refined and streamlined, for those who study these scripts to learn AppleScript techniques. (v1.0: Feb 12, 2015)
- Fix Single Step Recursive Sequence: A bug in Helix RADE 6.2.x results in a crash when a single step tail recursive sequence is created. (That is, a sequence whose one step is a call to itself.) This script resolves that crash by inserting a ‘null’ command as the first step in those sequences. You can then delete or edit those sequences.(v1.0: Feb 10, 2016)
Template
- Clean Up Styled Text Lables: This script removes redundant styled text data from label rectangles. It can fix a single template or an entire collection. (v1.0: Jan 5, 2016)
- Conditional Style Report: This script creates a text file report detailing the conditional styles used on a single view. (v1.0: Mar 17, 2017)
- Disable All Previews: This simple script turns off the “Preview” property for every template in a collection.(v1.0: Dec 6, 2017)
- Enable All Grids: This simple script turns on the “Align to grid” property for every template in a collection.(v1.0: Aug 12, 2015)
- Find Conditional Styles: This script searches every template for data rectangles containing conditional styles and reports on the number found, as well as the number that have mismatched font or size settings. (A common problem when changing a rectangle font is to forget to change the conditional styles as well.) Also includes an option to select the pertinent templates (and relations) for further investigation. (v2.0: Mar 13, 2017)
- Find Dates in Narrow Rectangles: A change in Helix 7.0.2 causes rectangles containing dates that display 2-digit years to now display 4-digit years. This script finds data rectangles that are not wide enough to display a 4-digit year and offers to resize them, to reduce the size of the text within, or to simply report its findings. More information on this change is found in the ‘Show Century’ flag in Helix 7.0.2 technote for details, which is where you can also find a link to download the script. (v1.1: Sep 26, 2017)
- Find Tabbable Controls: This script searches every template for data rectangles that contain a control (radio button, checkbox, menu) and also have the ‘Allow tab’ property set. (The behavior of these rectangles may vary depending on the computer’s Full Keyboard Access setting, making them difficult to use in sequences that rely on Home Field and Tab Field commands. Requires Helix 7.0.2 or later. (v1.0: Mar 27, 2017)
- Split Multiline Label Rectangles: This script splits selected label rectangles into multiple rectangles, one for each line of text (using the return or linefeed character as a divider). The template’s vertical spacing (grid) controls the spacing of the new rectangles. (v1.0: Jan 12, 2015)
- Switch Click To Open: This script presents a dialog that lets you quickly switch the entry view to open when a list is double clicked. This script works in user mode as well. (v1.1: Mar 16, 2017)
- Trim Group To Contents: This script resizes a group box or repeat rectangle according to the rectangles within it. The script includes an option to add a gap around the contents. (By default a group box adds padding, but a repeat rectangle does not. (v1.0: Sep 28, 2017)
- Trim List to Number of Records: This script resizes a list template to allow a specified (via a dialog) number of rows per page. If the repeat rectangle is set to also produce columns, it also resizes the template horizontally to allow the specified number of columns. (v1.0: Sep 28, 2017)
- Trim Templates: This script trims templates so there is no extra white space around the rectangles. Updated to handle multiple templates selected in a relation window. (v1.1: Nov 26, 2013)
- Turn Off Previews: This script turns of the preview property for templates. Shows how to examine the active window to do the right thing. (v1.0: Oct 1, 2021)
User
- Close User Windows: This script closes all views that are open in User Mode for the specified user. This is helpful if the designer inadvertently adds new views to a user while they are open, which causes them to be open the next time the user connects. (v1.0: Jun 16, 2017)
- Copy User To User: This script facilitates the process of duplicating user menus from one user to another. It can replace the entire contents of one or more users — including user permissions — to match a selected source user. In itself, that is a useful function, but due to a bug in prior versions of Helix, icons that were on hierarchical menus that have been deleted from a user’s menus are still associated with that user, making it impossible to delete obsolete icons. This script addresses that bug by making a replica of the original user, thereby correcting the error. (v2.0.1: Oct 11, 2017)
- Document User Menus: This script examines selected user icons, writing a detailed report of the user settings and menu items — including command keys and permissions — to a text file. Requires BBEdit. (v1.1: Nov 2, 2017)
- Remove Icon From Users: This script (an updated version of ‘Remove View From Users’) presents a list of user icons that have the currently selected (or open) icon (view, sequence, user) somewhere in their menus. Choose the users from which you want to remove the icon and poof! it’s done. (v2.0: Oct 31, 2017)
- Reset Passwords: Because Helix 7.0 uses Unicode for text input, passwords that use ‘high-ASCII’ (typed with the option key) characters will fail after upgrading to Helix 7. This script resets passwords for selected users to the string of your choosing. Users should be reminded to choose a new password when connecting for the first time after the Helix 7.0 upgrade. The script also checks which users have the Edit Username List… command on a menu, and offers to add it to users of your choosing. Requires Design mode access. (v1.0: Sep 8, 2016)
- Restore User Passwords: This script restores user passwords (stored in a tab delimited text file) after structure application has removed them. It also shows a techinque for preserving a variable in a property, allowing the script to automatically choose the file on subsequent runs. (v1.0: Mar 27, 2012)
- Set View Position for Users: This script uses the position of the open (or selected) view to reset the position and/or size of that view for all users who have it on their user menus. Works in Design Mode only. (Be sure to read the comments in the script for notes about an old bug that may affect this script. Version 1.3 fixes a bug that caused hierarchical menus to be skipped. (v1.3: Sep 11, 2017)
- Test Password For Unicode Compatibility: Because Helix 7.0 uses Unicode for text input, passwords that use ‘high-ASCII’ (typed with the option key) characters will fail after upgrading to Helix 7. This stand-alone application tests a password (which you must type) to determine whether it can be converted to Helix 7.0. Those that fail should be changed or removed before updating the collection. (v1.0: Sep 8, 2016)
View
- Everybody Go Forward: Sometimes developers need to ‘Find Last’ to see recent data, but that confuses the end users when the collection is returned to use. This simple script resets the “moving forward” property of every entry view in the open collection to true. (v1.0: Oct 12, 2017)
- Find Disabled Views: This script checks every view in the open collection to confirm that each one is in “Show Form” mode. (That is, that it is ready for use.) After checking the collection, a dialog reports on the findings. v1.1 fixes a bug caused by poor variable name choices. (v1.1: Jun 16, 2012)
- Open Every Page Setup: Because Helix collections store print record data (specifications made in the Page Setup and Print dialogs) for every view, and because macOS does a fairly poor job of interpreting the “Classic” print record data, the information stored by Classic is sometimes interpreted very poorly by macOS. The solution (unfortunately) is to use Helix RADE 6.2 to open every view, choosing Page Setup and Print Form for each one, and correcting improperly stored settings for macOS. This script assists by automating as much of the work as possible. But you still have to visually confirm the Page Setup and Print dialog settings, and make changes where needed for each view. Version 2.1 adds a self-adjusting delay between the Page Setup and Print Form steps, to avoid “menu not enabled” errors, increases the default timeout from 10 minutes to 1 hour, and uses Notifications (in macOS 10.9 and later) to show progress being made. See also this technote. (v2.1: October 23, 2014)
- Open My Template: This script opens the template of the currently open (or selected) view. (v1.0: Mar 27, 2014)
- Find All View I/O Paths: This script creates a report showing the import/export file paths stored in every view of a collection. Useful if you want to check that import/export sequences will run correctly. BBEdit or TextWrangler is used to generate the report. (v1.0: Apr 18, 2014)
- Find Views with High-ASCII Delimeters: When a collection is updated to Helix 7.0, any views whose I/O delimiters are greater than 127 are reset to the default values. This script — which must be run in Helix 6.2.x — checks for views that will be affected by this change. (v1.0: Oct 4, 2016)
Working With Data
- Record Data Explorer: This script demonstrates the record counting capabilities of Helix via AppleScript. Place it in your scripts menu or open it with your script editor. Then open a collection and run the script. It reports the record count of each relation along with the specific count of defined records for each field in the relation. Version 1.1 updated for current terminology. (v1.1: Jan 23, 2012)
- Delete Relation Data: This script that demonstrates how to delete data from a collection. It also shows how to present the user with a list of all of the relations in the open collection, how to test the current selection to provide a better user experience, and how to sort the list using the Unix sort. Version 2.0 also works if you are in User Mode, as long as you can supply the name/password of a user with Design Mode access. (v2.0: Oct 17, 2014)
- Make Max + 1: This script is a ‘time saver’ script: it makes a ‘Max + 1’ abacus for selected number or fixed point fields. It also looks for an index on the field and an abacus for the constant ‘1’ to use in the abacus and offers to make those if they aren’t found. (v1.1: Jan 28, 2017)
- Record ID Examiner: This script can be used to views records in their ‘raw’ form, via the internal Record ID. This is useful in conjunction with User Access Logging, which logs record access by the internal record IDs, examining damaged records reported by Helix Utility, or just for general knowledge. Authentication via a user with Design Mode access is required. Version 2.0 can access data from any Helix application (RADE, Server, Engine) on a local or remote machine (if Remote Apple Events are enabled). (v2.0: Aug 11, 2017)
- Image To Helix: This script demonstrates the new capability of Helix 7.0.3 to store documents via AppleScript. (v1.0: Aug 7, 2017)
Miscellaneous
- Clear Temporary Files: When a Helix collection is closed without saving, a temporary file is left behind, leading to -48 errors when creating a new collection. (This is a bug: see R7173) This script deletes those temp files. (v1.0: Jan 2, 2013)
- Error Identifier: This is a script that might help you identify the icon that Helix RADE reports as containing an error, should such a thing happen to you. Version 1.5 adds the ability to report the type of a non-traceable object in Helix 8.0 and later. (v1.5: Mar 30, 2020)
- Helix Preference Editor for Helix 7: Some behaviors of Helix applications can be changed by setting preference values. Until there is a built-in interface for editing them, this script, which can be downloaded from the Editing Preferences in Helix 7, makes it easier.
- Helix Preference Editor for Helix 6: Users of Helix 6 should use this version of the preference editor. See Editing Preferences in Helix 6 to download it.
- Make and Delete Icons: This is a simple script that shows how to make and delete icons. It doesn’t do anything useful beyond showing the scripting syntax. (v1.0: Sep 26, 2011)
- Move Windows Right: This script finds every icon editor window that is positioned so that it would be under the default position of the new Element Panel, and moves it to the right so it will not be obscured when opened. v1.1 adds better progress and error reporting. v1.2 adds an option to open any icon that generates an error, thereby automatically fixing illegal coordinate errors. (v1.2: Jan 13, 2014)
- Registration Reset: This script resets the registration data for a Helix application, as though it had never been launched on the computer. (v1.0: Mar 26, 2014)
- Rename Duplicates: This script addresses the same issue as ‘Search for Duplicates’ but it also renames the duplicate icons, appending text to the end of the name. (v1.0: Mar 27, 2012)
- Search for Duplicate Names: This script searches a collection for icons with identical names, which might lead to ambiguity when addressed via scripting. Only identically named instances of the same icon class within a parent are reported, as that is the only ambiguity. That is: two abaci named "true" in two different relations are not reported, but two abaci named "true" in the same relation are. Version 1.1 trims the dialog when there are too many lines to fit on your screen. (v1.1: Mar 27, 2012)
- Select In Parent: This script opens the parent icon of the current frontmost icon, selecting that icon in the parent’s window. This is like the “tunnel up” capability you see in Finder when pressing CMD-Up arrow. (v1.0: Aug 13, 2012)
- Show Clipboard Text as ASCII: This script displays a dialog showing the ASCII values for the text currently on the clipboard. This is not specifically a Helix script, but is useful in certain debugging situations, such as when using the “Paste Records” command. (v1.0: May 25, 2017)
-
Color Scripts
- Get Nearest Color: This script uses the macOS color picker to find a color in the Helix collection color table. It also shows how to update a color index to a specific color. (v1.0: Jul 14, 2014)
- Set Background Color: This script uses the macOS color picker to set the background color of a rectangle. Based largely on the ‘Get Nearest Color’ script above. (v1.0: Jul 14, 2014)
- Map Colors To View: This script builds a template and view (in a new relation) that shows all of the colors in the open collection’s color table. (v1.0: June 4, 2013)
- Find Colors Used: This script examines all of the templates to find out which colors are used in a collection. It then reports of the number of colors found and offers to build a view (in a new relation) containing color swatches the used colors. Note that colors used in styled text are not reported. Version 3.0 adds checking for conditional styles. (v3.0: December 6, 2013)
Note: A version that demonstrates how to use Growl to provide user feedback is available here.
Helix Utlity
- Simple Maintenance: This script is a simple alternative to Helix Maintenance Manager, which does not work with Helix 6.2 or later. It creates a zip archive of the folder containing your collection, uses Helix Utility to verify and (if necessary) repair the collection, and sends an email report to a specified user. Note: you must edit the properties in this script before it can work for you. (We’ll help if you need us to.) If you create a launchd process to run this script (helpers for that are noted in the script comments) you can have a completely automated backup and maintenance system much as was provided by HMM. (v1.0: Jul 14, 2016)
Non-Helix
- Make Iterations (Duplicate and Rename): This drag and drop script duplicates any file dropped onto it, adding a number to the name, for making iterative copies. Preferences can be changed to append or prepend the number, and to control how many zeroes the number is padded with. (v1.0.1: Oct 09, 2017)
- Winnow Backups: This is a Finder script that monitors a folder and deletes older files, keeping all files that are less than one week old, one file for each of the last 4 weeks, and one file for each month before that. Obviously, this only makes senes if the folder is where recurring backups of a file (e.g: a Helix collection) are stored. (v1.0: Nov 7, 2012)
- Duplication Timing Test: This script tests the speed of a hard drive in repeatedly copying a file. I wrote this to test whether a hard drive was running slower than it should be (it was) and thought others might find it useful. Run it now to gather baseline data, then later to see if the drive has slowed. (v1.0: Sep 29, 2011)
- File Size Monitor: This is a Finder script that monitors the size of a file and notifies you (via Growl) when the file size changes. I wrote this when we were tracking down a bug and thought others might find it useful to others. (v1.0: Jul 13, 2011)