Smile Reference Manual

Total Page:16

File Type:pdf, Size:1020Kb

Smile Reference Manual Smile Reference Manual Satimage-software http://www.satimage-software.com Copyright c 2003 Satimage (France) May 1st, 2003 Contents I Smile, the better script editor for AppleScript 11 1 About Smile Reference Manual 12 1.1 How Smile’s documentation is organized ......................... 12 1.1.1 The text files included in the distribution .................... 12 1.1.2 Smile’s on-line help menu ............................. 12 1.1.3 The resources available on the Web ........................ 13 1.2 The scope of Smile Reference Manual .......................... 13 1.3 Conventions used in Smile Reference Manual ...................... 13 1.4 What you should read ................................... 14 1.5 Reference Manual Change History ............................ 14 2 An introduction to Smile 15 2.1 Overview .......................................... 15 2.2 To get started quickly ... ................................. 15 2.3 Short features list ...................................... 15 3 Installation 17 3.1 What you should install .................................. 17 3.2 Installing Smile from scratch ............................... 18 3.3 Installing a new release .................................. 18 3.3.1 Full install ..................................... 18 3.3.2 Partial upgrade ................................... 18 3.4 Installing the Satimage osax ................................ 19 3.4.1 First install of the Satimage osax ......................... 19 3.4.2 Installing an upgrade of the Satimage osax ................... 19 3.5 Installing additional components ............................. 19 3.6 Multiple users support ................................... 19 2 CONTENTS 3 4 Entering the world of Smile: scripting and debuging in text windows 21 4.1 Smile, a different experience of scripting ......................... 21 4.2 Scripting and debug in text windows ........................... 21 4.2.1 Making a new text window ............................ 21 4.2.2 Executing scripts in text windows ........................ 21 4.2.3 Displaying the result of execution ......................... 22 4.2.4 The scope of the variables — Smile’s context .................. 22 5 Working with scripts in script windows 24 5.1 About script documents formats ............................. 24 5.2 Making a new script window ............................... 24 5.3 Opening a script document ................................ 25 5.4 Working with a script window ............................... 25 5.5 Editing an applet or a droplet ............................... 26 5.6 Saving a script document ................................. 26 5.7 Saving an applet or a droplet ............................... 27 5.8 Saving a script without its source ............................. 27 6 Editing text in text windows 28 6.1 About text documents formats .............................. 28 6.1.1 Unicode support .................................. 28 6.1.2 ISO-8859-1 support ................................ 28 6.2 Making a new text window ................................ 28 6.3 Opening a text document ................................. 29 6.4 Closing a text window ................................... 29 6.5 Saving a text window ................................... 29 6.6 Using drag and drop in text windows ........................... 29 6.7 Editing text ......................................... 30 6.8 Selection keyboard shortcuts — Mouse tricks ...................... 31 6.9 Text searches ........................................ 31 7 Using the dictionaries 33 7.1 Searching a term’s definition ............................... 33 7.2 Opening the dictionary of an application — Opening the dictionary of a Scripting Addition ........................................... 33 7.3 Opening the dictionary of an application which is running — Opening the dictionary of a Scripting Addition which is installed ........................ 34 7.4 Opening the dictionary of the target application of a window ............. 34 7.5 Opening AppleScript’s dictionary ............................. 34 4 CONTENTS 8 Scripting faster with the “Balance” command 35 8.1 Syntax pre-typing ...................................... 35 8.2 Parentheses balancing ................................... 35 8.3 Wrappers balancing .................................... 36 8.4 “Balance()” call to your script .............................. 36 9 The Scripts menu 37 9.1 How to use the “Scripts” menu .............................. 37 9.2 Adding and removing menu items to/from the “Scripts” menu ............ 38 9.3 Displaying hierarchical menus in the “Scripts” menu .................. 38 9.4 Grouping items in the “Scripts” menu .......................... 38 9.5 Using aliases in the “Scripts” menu ............................ 39 9.6 Sorting the items of the “Scripts” menu ......................... 39 9.7 Providing shortcuts to the items of the “Scripts” menu ................. 39 10 Connecting a window to an application — The “tell ...” feature 41 10.1 When to connect a window to an application ...................... 41 10.2 How to connect a window to an application ....................... 41 10.3 Making scripts into “raw code” .............................. 41 10.4 Targeting an application by script ............................ 42 10.5 The context of a window connected to an application .................. 42 10.6 “Find definition” in a window connected to an application ............... 42 10.7 Known bugs ......................................... 42 11 Comfort and productivity 43 11.1 The Worksheet ....................................... 43 11.2 Handling windows efficiently ................................ 43 11.3 The “Recent files” menu .................................. 44 11.4 The “Favorites” menu ................................... 44 11.5 Preferences ......................................... 44 11.5.1 The “General” pane ................................ 44 11.5.2 The “AppleScript” pane .............................. 45 11.5.3 The “Windows” pane ............................... 46 11.6 Programmer’s tools ..................................... 46 11.7 Variables that are saved when you quit Smile ...................... 47 II The AppleScript-based automation engine 49 12 Advanced text editing 50 CONTENTS 5 12.1 Advanced text searches .................................. 50 12.1.1 The Enhanced Find panel ............................. 50 12.1.2 Searching in folders ................................ 50 12.1.3 Regular expressions ................................ 50 12.2 Comparing files ....................................... 51 12.3 Text tools .......................................... 51 12.3.1 Make an AppleScript string ............................ 51 12.3.2 ISO-Latin1 to Mac and Mac to ISO-Latin1 ................... 51 12.3.3 Open ISO-Latin1 ... ................................ 51 12.3.4 Measure Text .................................... 52 12.3.5 Sort paragraphs .................................. 52 13 The scriptable text editor — The Text Suite 53 13.1 Specifying a text range in a window of Smile ...................... 53 13.2 whose, where and every .................................. 54 13.3 before and after ....................................... 54 13.4 The properties of the text ................................. 54 14 The UTF-16 editor 55 14.1 Overview .......................................... 55 14.2 Using the UTF-16 editor .................................. 55 15 Smile custom dialogs 56 15.1 Overview .......................................... 56 15.2 Running a custom dialog .................................. 56 15.3 Running a custom dialog by script ............................ 56 15.4 The basics of custom dialogs ............................... 57 15.5 Creating your own custom dialogs ............................ 57 15.5.1 Making a new custom dialog ........................... 57 15.5.2 Populating a new custom dialog ......................... 57 15.6 Editing a custom dialog .................................. 58 15.6.1 The edit mode ................................... 58 15.6.2 Dialog editing features ............................... 59 15.6.3 The dialog editing tools .............................. 59 15.7 Scripting a custom dialog ................................. 60 15.7.1 The basic properties of the controls ........................ 60 15.7.2 Events received by the scripts ........................... 61 15.8 Making a custom dialog multi-lingual .......................... 64 15.8.1 What is localization? ................................ 64 15.8.2 How to localize a dialog .............................. 64 6 CONTENTS 15.8.3 How to localize Smile ............................... 66 15.8.4 How to localize “Localize” ............................. 66 15.9 Making a custom dialog into a stand-alone application ................. 66 15.9.1 Why to make a custom dialog into a stand-alone application ......... 66 15.9.2 Why not to make a custom dialog into a stand-alone application ....... 66 15.9.3 The limits of a stand-alone application ...................... 67 15.9.4 Making a stand-alone application ......................... 67 15.10Attaching a custom dialog to an object .......................... 67 16 Scripting Smile — The basics 69 16.1 Overview .......................................... 69 16.2 Manipulating objects — The object model ........................ 69 16.2.1 Accessing an object ................................ 69 16.2.2 Making a new object by script .......................... 70 16.3 Programming the objects — The object scripts ....................
Recommended publications
  • Characters and Numerics A
    1019 Index ■ > (is greater than) operator, 151, 183, 221, Characters and 252, 372, 382, 869 Numerics ° (degree sign) character, 501 – (en dash) character, 501 16-bit UCS/Unicode Transformation Format - (negation) operator, 150, 217, 219, 224, (UTF-16)encoded files, 497–499 258, 379–380, 386 " (double quote character), 145, 163, 170– - (subtraction) operator, 149–150, 217, 219, 172, 263, 311 224–225, 254–255, 380, 385 1st keyword, 131 - button, Folder Actions Setup utility, 722 2nd keyword, 131 != symbol, 222 3rd keyword, 131 % symbol, 889 24U Appearance, 689 & operator, concatenating strings with, 952 32-bit, scripting additions, 686 (* symbol, 48 444 mode, 891 * (multiplication) operator, 150, 217, 224, 8-bit UCS/Unicode Transformation Format 380 (UTF-8) encoded files, 493, 497, *) symbol, 48 501, 871, 877 / (division) operator, 151, 217, 224, 380, 385 / (slash character), 193, 473 /Library/Scripts/ folder, 73–74, 310 ■ A : (colon character), 472 a reference to operator, 328, 347, 379, 388, ? operator, 372 479–480 \ (backslash character), 171 AAC (Advanced Audio Coding) format, \b construct, 703 Apple, 757 \n (line feed) character, 172–173, 179 About Downloads.pdf file, 475 \r (return) characters, 172–173, 486 about label, 515 \t (tab) character, 172–173, 791 above label, 515 \w modifier, 703 abs_num command, 219 ^ (exponent) operator, 151, 216–217, 220– abs_num handler, 219 221, 224, 380 absolute path, 875 + (addition) operator, 150, 217, 224–225, absolute reference, 96 254, 380, 385 abstract base class, 564 + button, Folder Action
    [Show full text]
  • Bbautocomplete 1.6.1 Manual
    BBAutoComplete 1.6.1 Manual C-Command Software c-command.com September 3, 2019 Contents 1 Introduction 3 2 Installing and Updating 3 2.1 Requirements.............................................3 2.2 Installing BBAutoComplete.....................................4 2.3 Updating From a Previous Version.................................4 2.4 Reinstalling a Fresh Copy......................................5 2.5 Integration Scripts..........................................5 3 Using BBAutoComplete7 3.1 Changing the Trigger Key......................................7 3.2 Ignoring Background Windows...................................8 3.3 Hiding the Dock Icon.........................................8 4 Menus 8 4.1 The BBAutoComplete Menu....................................8 4.1.1 About BBAutoComplete..................................8 4.1.2 Software Update::: ......................................8 5 Preferences 9 5.1 Find completions using spell checker................................9 5.2 Use word cache............................................9 5.3 Extra word characters........................................9 6 Frequently Asked Questions (FAQ) 11 6.1 What information should I include when I report a problem?.................. 11 6.1.1 Sending in an Error Report................................. 11 6.1.2 Sending in Screenshots.................................... 12 6.1.3 Sending in Crash Log Files................................. 13 6.1.4 Sending in a \Sample" Report............................... 13 6.2 How can I open the Library folder?................................
    [Show full text]
  • Pdfpen 11 Help
    ! ! Version 11 About PDFpenPro PDFpenPro Basics (features, installation, purchase & registration) What's New In This Version? Demo Version, Purchase/Registration Getting Started: Guided Tour View Options and Getting Around a PDF Toolbar Editing Bar Font Bar Sidebar Inspector Library Preferences Opening New and Existing PDF files Searching Within a PDF Redact or Replace Text from Keyword Search Undo/Redo Editing PDFs and Adding Content Working With Text Selecting Text Correcting Text Adding Text Formatting Text Markup: Highlighting, Underline, Strikethrough Redacting Text Images, Signatures, Objects and Imprints Adding Images Editing Images Cropping Images Adding Objects: Scribbles, Lines and Shapes Arranging Items Imprints Watermarks Signing Documents Adding a Basic Signature Using Interactive Signature Fields Digital Signatures Validation Signing a PDF with a Digital Signature Notes, Comments, Links, Bookmarks and Attachments Adding Notes and Comments Printing Notes and Comments Adding Links Bookmarks Attachments Extracting File Attachments Adding File Attachments (PDFpenPro only) Adding Audio annotations Forms Filling Out PDF Forms Signing a Form Scanning Scanning a Document OCR Using OCR (Optical Character Recognition) Batch OCR Forcing OCR Viewing the OCR Layer Remove the OCR Layer Dictionaries and OCR Editing the OCR Layer (PDFpenPro Only) Working With PDF Documents Adding Pages Deleting Pages Reordering Pages Combining PDFs Selecting Part of a Page Cropping Pages and Documents Numbering Pages Bates Numbering Line Numbers Headers
    [Show full text]
  • Pdfpen 10 Help
    ! ! Version 10 About PDFpenPro PDFpenPro Basics (features, installation, purchase & registration) What's New In This Version? Demo Version, Purchase/Registration Getting Started: Guided Tour View Options and Getting Around a PDF Toolbar Editing Bar Sidebar Inspector Library Preferences Opening New and Existing PDF files Searching Within a PDF Redact or Replace Text from Keyword Search Undo/Redo Editing PDFs and Adding Content Working With Text Selecting Text Correcting Text Adding Text Formatting Text Markup: Highlighting, Underline, Strikethrough Redacting Text Images, Signatures, Objects and Imprints Adding Images Editing Images Cropping Images Adding Objects: Scribbles, Lines and Shapes Arranging Items Imprints Watermarks Signing Documents Adding a Basic Signature Using Interactive Signature Fields Digital Signatures Validation Signing a PDF with a Digital Signature Notes, Comments, Links, Bookmarks and Attachments Adding Notes and Comments Printing Notes and Comments Adding Links Bookmarks Attachments Extracting File Attachments Adding File Attachments (PDFpenPro only) Adding Audio annotations Forms Filling Out PDF Forms Signing a Form Scanning Scanning a Document OCR Using OCR (Optical Character Recognition) Batch OCR Forcing OCR Viewing the OCR Layer Remove the OCR Layer Editing the OCR Layer (PDFpenPro Only) Working With PDF Documents Adding Pages Deleting Pages Reordering Pages Combining PDFs Selecting Part of a Page Cropping Pages and Documents Numbering Pages Bates Numbering Line Numbers Headers and Footers Printing iCloud AppleScript
    [Show full text]