|
Script Debugger provides convenient ways to navigate through the structure of your AppleScript code. As AppleScript programs become larger than a few lines, it’s common practice to divide them into smaller blocks โ handlers and script objects. You should adopt this practice, because it allows Script Debugger to help you navigate your code. One possibility is to navigate by jumping from handler to handler, successively. To do so:
For more power, use the navigation bar. This is the rectangle at the top of the script window, to the right, above the text area. The navigation bar shows you where you are, and it also contains the table of contents popup menu, which lets you jump easily to any part of your script. ![]() The above illustration shows a typical navigation bar display. Hold down the mouse on the navigation bar to bring up the table of contents menu. ![]() The menu shows all script object and handler definition blocks, along with all script property declarations and top-level global declarations, in an intuitive hierarchical layout. (Hold down the Option key while choosing the menu to show it without the properties and globals.) The check mark shows where the selection is now. Choose an item in the menu to jump to it. You can also insert markers into your script. A marker’s significance is that it appears in the table of contents menu, which means you can jump to it. A marker is defined as an AppleScript comment that starts with ![]() The text of the comment appears in the table of contents menu: ![]() The order of items in the table of contents menu is determined by an Editor preference โ either items are sorted alphabetically (Sort menu is checked) or they appear in the same order as they appear in the script (Sort menu is unchecked). Whichever order you prefer, hold down the Shift key while choosing the menu to show it sorted the other way.
|
|||||||||||||||||