IV-10 Advanced Topics.Pdf

Total Page:16

File Type:pdf, Size:1020Kb

IV-10 Advanced Topics.Pdf Chapter IV-10 IV-10Advanced Topics Regular Modules............................................................................................................................................. 222 Regular Modules in Action Procedures and Hook Functions .......................................................... 223 Regular Modules and User-Defined Menus........................................................................................ 224 Independent Modules .................................................................................................................................... 224 Independent Modules - A Simple Example......................................................................................... 225 SetIgorOption IndependentModuleDev=1 .......................................................................................... 225 Independent Module Development Tips............................................................................................. 225 Independent Modules and #include ..................................................................................................... 226 Limitations of Independent Modules ................................................................................................... 226 Independent Modules in Action Procedures and Hook Functions.................................................. 226 Independent Modules and User-Defined Menus ............................................................................... 227 Independent Modules and Popup Menus ........................................................................................... 227 Regular Modules Within Independent Modules ................................................................................ 228 Calling Routines From Other Modules ................................................................................................ 229 Using Execute Within an Independent Module.................................................................................. 229 Independent Modules and Dependencies ........................................................................................... 229 Independent Modules and Pictures...................................................................................................... 230 Making Regular Procedures Independent-Module-Compatible...................................................... 230 Sound................................................................................................................................................................ 230 Movies .............................................................................................................................................................. 230 Playing Movies......................................................................................................................................... 231 Creating Movies....................................................................................................................................... 231 Extracting Movie Frames........................................................................................................................ 231 Movie Programming Examples............................................................................................................. 231 Timing............................................................................................................................................................... 232 Ticks Counter ........................................................................................................................................... 232 Microsecond Timer.................................................................................................................................. 232 Packages ........................................................................................................................................................... 232 Creating a Package .................................................................................................................................. 232 Lightweight Packages ............................................................................................................................. 234 Managing Package Data ................................................................................................................................ 234 Creating and Accessing the Package Data Folder .............................................................................. 235 Creating and Accessing the Package Per-Instance Data Folders...................................................... 236 Saving Package Preferences .......................................................................................................................... 237 Saving Package Preferences in a Special-Format Binary File............................................................ 237 Saving Package Preferences in an Experiment File ............................................................................ 240 Creating Your Own Help File ....................................................................................................................... 241 Syntax of a Help File ............................................................................................................................... 242 Creating Links .......................................................................................................................................... 242 Checking Links......................................................................................................................................... 243 Creating Formatted Text................................................................................................................................ 244 Printf Operation ....................................................................................................................................... 245 sprintf Operation ..................................................................................................................................... 245 fprintf Operation...................................................................................................................................... 246 Chapter IV-10 — Advanced Topics wfprintf Operation .................................................................................................................................. 246 Example Using fprintf and wfprintf ..................................................................................................... 246 Client/Server Overview.................................................................................................................................. 246 Apple Events ............................................................................................................................................ 247 Apple Event Capabilities................................................................................................................. 247 Apple Events — Basic Scenario...................................................................................................... 247 Apple Events — Obtaining Results from Igor ............................................................................. 247 Apple Event Details ......................................................................................................................... 248 AppleScript............................................................................................................................................... 249 Executing Unix Commands on Mac OS X ........................................................................................... 250 ActiveX Automation................................................................................................................................ 250 Calling Igor from Scripts................................................................................................................................ 251 Network Communication.............................................................................................................................. 252 URLs.................................................................................................................................................................. 252 Usernames and Passwords..................................................................................................................... 253 Supported Network Schemes ................................................................................................................ 253 Percent Encoding ..................................................................................................................................... 253 Safe Handling of Passwords.......................................................................................................................... 254 Network Timeouts and Aborts ..................................................................................................................... 255 Network Connections From Multiple Threads .......................................................................................... 255 File Transfer Protocol (FTP)........................................................................................................................... 257 FTP Limitations.......................................................................................................................................
Recommended publications
  • Tinkertool System 7 Reference Manual Ii
    Documentation 0642-1075/2 TinkerTool System 7 Reference Manual ii Version 7.5, August 24, 2021. US-English edition. MBS Documentation 0642-1075/2 © Copyright 2003 – 2021 by Marcel Bresink Software-Systeme Marcel Bresink Software-Systeme Ringstr. 21 56630 Kretz Germany All rights reserved. No part of this publication may be redistributed, translated in other languages, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of the publisher. This publication may contain examples of data used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. The publisher may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Make sure that you are using the correct edition of the publication for the level of the product. The version number can be found at the top of this page. Apple, macOS, iCloud, and FireWire are registered trademarks of Apple Inc. Intel is a registered trademark of Intel Corporation. UNIX is a registered trademark of The Open Group. Broadcom is a registered trademark of Broadcom, Inc. Amazon Web Services is a registered trademark of Amazon.com, Inc.
    [Show full text]
  • Designing PCI Cards and Drivers for Power Macintosh Computers
    Designing PCI Cards and Drivers for Power Macintosh Computers Revised Edition Revised 3/26/99 Technical Publications © Apple Computer, Inc. 1999 Apple Computer, Inc. Adobe, Acrobat, and PostScript are Even though Apple has reviewed this © 1995, 1996 , 1999 Apple Computer, trademarks of Adobe Systems manual, APPLE MAKES NO Inc. All rights reserved. Incorporated or its subsidiaries and WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH No part of this publication may be may be registered in certain RESPECT TO THIS MANUAL, ITS reproduced, stored in a retrieval jurisdictions. QUALITY, ACCURACY, system, or transmitted, in any form America Online is a service mark of MERCHANTABILITY, OR FITNESS or by any means, mechanical, Quantum Computer Services, Inc. FOR A PARTICULAR PURPOSE. AS A electronic, photocopying, recording, Code Warrior is a trademark of RESULT, THIS MANUAL IS SOLD “AS or otherwise, without prior written Metrowerks. IS,” AND YOU, THE PURCHASER, ARE permission of Apple Computer, Inc., CompuServe is a registered ASSUMING THE ENTIRE RISK AS TO except to make a backup copy of any trademark of CompuServe, Inc. ITS QUALITY AND ACCURACY. documentation provided on Ethernet is a registered trademark of CD-ROM. IN NO EVENT WILL APPLE BE LIABLE Xerox Corporation. The Apple logo is a trademark of FOR DIRECT, INDIRECT, SPECIAL, FrameMaker is a registered Apple Computer, Inc. INCIDENTAL, OR CONSEQUENTIAL trademark of Frame Technology Use of the “keyboard” Apple logo DAMAGES RESULTING FROM ANY Corporation. (Option-Shift-K) for commercial DEFECT OR INACCURACY IN THIS purposes without the prior written Helvetica and Palatino are registered MANUAL, even if advised of the consent of Apple may constitute trademarks of Linotype-Hell AG possibility of such damages.
    [Show full text]
  • The Open Scripting Architecture: Automating, Integrating, and Customizing Applications
    The Open Scripting Architecture: Automating, Integrating, and Customizing Applications Unpublished manuscript, 1993 William R. Cook Warren H. Harris Apple Computer Apple Computer Research Topic areas: Language design and implementation, tools and environments, components and frameworks, concurrent and distributed systems, databases and persistence. Abstract The Open Scripting Architecture combines aspects of object-oriented programming, distributed computation, database queries, and dynamic languages into a powerful and practical system for automation, integration, and customization of applications and system services. Applications are integrated together with distributed messaging. The messages operate upon user-level application objects, like windows and spreadsheet cells that are identified by queries over properties and document containment structure. A general-purpose scripting language automates message sending and handling, and supports persistence and mobile objects. Applications call on scripting services to customize the behavior of their objects through a generic script management API. 1 Introduction The Open Scripting Architecture (OSA) is a comprehensive infrastructure for automating complex or repetitive tasks, integrating distributed applications and system services, and customizing application behavior. These end-user benefits are supported by a synergistic combination of technologies: distributed messaging and referencing of application objects, object-oriented scripting languages, and script development and management tools. Object-oriented concepts are used throughout the architecture, in the scripting language, the system, and the applications. The OSA is unique in several respects. First, it decouples the clients of scripting services (applications) from the providers of those services (language processors like AppleScript™). This decoupling allows for uniform scriptability across all applications in the same way a graphics toolbox provides a uniform GUI.
    [Show full text]
  • Macintosh Library Modules Release 2.4.1
    Macintosh Library Modules Release 2.4.1 Guido van Rossum Fred L. Drake, Jr., editor 30 March 2005 Python Software Foundation Email: [email protected] Copyright c 2001-2004 Python Software Foundation. All rights reserved. Copyright c 2000 BeOpen.com. All rights reserved. Copyright c 1995-2000 Corporation for National Research Initiatives. All rights reserved. Copyright c 1991-1995 Stichting Mathematisch Centrum. All rights reserved. See the end of this document for complete license and permissions information. Abstract This library reference manual documents Python’s extensions for the Macintosh. It should be used in conjunction with the Python Library Reference, which documents the standard library and built-in types. This manual assumes basic knowledge about the Python language. For an informal introduction to Python, see the Python Tutorial; the Python Reference Manual remains the highest authority on syntactic and semantic questions. Finally, the manual entitled Extending and Embedding the Python Interpreter describes how to add new extensions to Python and how to embed it in other applications. CONTENTS 1 Using Python on a Macintosh 1 1.1 Getting and Installing MacPython .................................. 1 1.2 The IDE ............................................... 2 1.3 The Package Manager ........................................ 3 2 MacPython Modules 5 2.1 macpath — MacOS path manipulation functions ......................... 5 2.2 macfs — Various file system services ............................... 5 2.3 ic — Access to Internet Config ................................... 8 2.4 MacOS — Access to Mac OS interpreter features .......................... 9 2.5 macostools — Convenience routines for file manipulation ................... 10 2.6 findertools — The finder’s Apple Events interface ...................... 10 2.7 EasyDialogs — Basic Macintosh dialogs ............................ 11 2.8 FrameWork — Interactive application framework ........................
    [Show full text]
  • Programming Mac OS X: a GUIDE for UNIX DEVELOPERS
    Programming Mac OS X: A GUIDE FOR UNIX DEVELOPERS KEVIN O’MALLEY MANNING Programming Mac OS X Programming Mac OS X A GUIDE FOR UNIX DEVELOPERS KEVIN O’MALLEY MANNING Greenwich (74° w. long.) For electronic information and ordering of this and other Manning books, go to www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact: Special Sales Department Manning Publications Co. 209 Bruce Park Avenue Fax: (203) 661-9018 Greenwich, CT 06830 email: [email protected] ©2003 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books they publish printed on acid-free paper, and we exert our best efforts to that end. Manning Publications Co. Copyeditor: Tiffany Taylor 209 Bruce Park Avenue Typesetter: Denis Dalinnik Greenwich, CT 06830 Cover designer: Leslie Haimes ISBN 1-930110-85-5 Printed in the United States of America 12345678910–VHG–05 040302 brief contents PART 1OVERVIEW ............................................................................. 1 1 ■ Welcome to Mac OS X 3 2 ■ Navigating and using Mac OS X 27 PART 2TOOLS ..................................................................................
    [Show full text]
  • Tinkertool System 6 Reference Manual Ii
    Documentation 0632-1969/2 TinkerTool System 6 Reference Manual ii Version 6.99, July 21, 2021. US-English edition. MBS Documentation 0632-1969/2 © Copyright 2003 – 2021 by Marcel Bresink Software-Systeme Marcel Bresink Software-Systeme Ringstr. 21 56630 Kretz Germany All rights reserved. No part of this publication may be redistributed, translated in other languages, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of the publisher. This publication may contain examples of data used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. This publication could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. The publisher may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Make sure that you are using the correct edition of the publication for the level of the product. The version number can be found at the top of this page. Apple, macOS, iCloud, and FireWire are registered trademarks of Apple Inc. Intel is a registered trademark of Intel Corporation. UNIX is a registered trademark of The Open Group. Broadcom is a registered trademark of Broadcom, Inc. Trademarks or service marks are used for identification purposes only.
    [Show full text]
  • Hypernext Studio Language Reference
    HyperNext Studio Language Reference v3.83 updated 31st December 2007 TigaByte Software 2007. http://www.tigabyte.com [email protected] Contents 1 INTRODUCTION....................................................................................5 WELCOME .................................................................................................5 RESOURCES ...............................................................................................6 2 HYPERNEXT CREATOR ..........................................................................7 USING HYPERNEXT CREATOR...........................................................................7 RUNNING PROJECT .......................................................................................8 COMPILING PROJECT.....................................................................................8 BUILD STACK .............................................................................................8 BUILD CLASSIC APPLICATION ..........................................................................8 BUILD OS X APPLICATION..............................................................................9 BUILD WINDOWS XP/VISTA APPLICATION ...........................................................9 BUILDING FOR MACINTOSH ON WINDOWS XP/VISTA...............................................9 SCRIPT EDITOR...........................................................................................9 MENU DESIGNER ......................................................................................
    [Show full text]
  • Phase&One&Media&Pro
    Phase&One&Media&Pro&& & & & & & & & & & & ! ! Phase&One&Media&Pro& Phase!One!Media!Pro!is!a!fast!and!easy!way!to!view,!organize!and!present!the! growing!number!of!images,!movies,!sounds,!fonts!and!other!media!files!that!you! have!created!or!acquired.!Whether!you!are!a!student,!journalist,!multimedia! enthusiast!or!creative!professional,!you!want!to!be!able!to!organize!and!browse! your!images,!movies!and!documents.!Media!Pro!enables!you!to!do!those!things,! as!well!as!enabling!you!to!modify!and!share!your!media!files!in!almost!any! multimedia!or!document!format!that!you!want.! Phase&One&Media&Pro&manual& The!Media!Pro!manual!is!integrated!into!the!software.!To!access!any!topic,!open! the!software,!go!to!the!top!toolbar!and!select!Help!>!Media!Pro!Help!and!either! select!a!relevant!topic!or!type!in!a!keyword!in!the!search!field.! This!document!is!a!hardcopy!reference!version!of!the!integrated!manual!and! help!pages.!All!topics!are!listed!alphabetically.!& ! & ! ! 2! Action menu The following options are available in the Set Finder Properties command in the Action menu: Creator Code Changes the four-character file creator that is associated with the media file. For example, if a file has a creator code that identifies QuickTime as the file creator, you can change the code to identify Photoshop as the creator. This enables you to double- click the files and open them with Photoshop. Desktop icons Used for easy identification of files in the application or in the Finder. This replaces generic desktop icons with image icons of the original files.
    [Show full text]
  • Hypernext Studio Quickstart
    HyperNext Studio QuickStart updated 27th November 2006 HyperNext Studio is an easy to use software development system that allows almost anyone to quickly create and run their own software. The HyperNext Creator can build both standalone applications as well as stacks that run on our freeware HyperNext Player. HyperNext is cross-platform and runs on Windows XP, Macintosh OS X and OS 9. Furthermore, each version of HyperNext builds software for ALL the other platforms. A companion to HyperNext Creator is HyperNext Developer, a visual development system that produces plug-ins for Creator. Plugins are self-contained programs (libraries) that bring extra functionality to the HyperNext programming language. This QuickStart is constantly being improved so please keep checking our web site for newer versions. The latest QuickStart can be found on our downloads page. TigaByte Software 2006. http://www.tigabyte.com [email protected] Contents 1. Introduction. a. HyperNext Stacks. b. QuickStart Organization. c. Programmer’s Guide. 2. HyperNext Creator. a. Creator Modes. b. Layout c. Key Shortcuts 3. Creator Lessons 1. Your first card. 2. Multiple cards. 3. Adding controls to cards. 4. Your first HyperNext script. 5. Variables, Text, Messages and Speech. 6. Fields and text. 7. Building a stack. 8. Building a standalone. 4. HyperNext Developer 1. Your first plug-in. 2. Testing a plug-in using Creator. 3. Plug-in global variables. 4. Preventing plug-in clashes. 5. Using AppleScript 6. Using REALbasic Script 1 Introduction Welcome to HyperNext Studio, a cross-platform visual software development system aimed at anyone interested in creating their own software.
    [Show full text]
  • Applescript Scripting Additions Guide
    AppleScript Scripting Additions Guide English Dialect Apple Computer, Inc. Helvetica and Palatino are Even though Apple has reviewed this © 1996 Apple Computer, Inc. registered trademarks of Linotype manual, APPLE MAKES NO All rights reserved. Company. WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH No part of this publication or the ITC Zapf Dingbats is a registered RESPECT TO THIS MANUAL, ITS software described in it may be trademark of International Typeface QUALITY, ACCURACY, MERCHANTA- reproduced, stored in a retrieval Corporation. BILITY, OR FITNESS FOR A PARTIC- system, or transmitted, in any form Microsoft is a registered trademark ULAR PURPOSE. AS A RESULT, THIS or by any means, mechanical, of Microsoft Corporation. MANUAL IS SOLD “AS IS,” AND electronic, photocopying, recording, Simultaneously published in the YOU, THE PURCHASER, ARE or otherwise, without prior written United States and Canada. ASSUMING THE ENTIRE RISK AS TO permission of Apple Computer, Inc. ITS QUALITY AND ACCURACY. Printed in the United States of America. IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, The Apple logo is a trademark of SPECIAL, INCIDENTAL, OR Apple Computer, Inc. Use of the LIMITED WARRANTY ON MEDIA CONSEQUENTIAL DAMAGES “keyboard” Apple logo (Option- AND REPLACEMENT RESULTING FROM ANY DEFECT OR Shift-K) for commercial purposes If you discover physical defects in the INACCURACY IN THIS MANUAL, without the prior written consent of manuals distributed with an Apple even if advised of the possibility of such Apple may constitute trademark product, Apple will replace the manuals damages. infringement and unfair competition at no charge to you, provided you return THE WARRANTY AND REMEDIES in violation of federal and state laws.
    [Show full text]
  • FCS Maintenance Pack 1.3.4 User Manual
    FCS Maintenance Pack User Manual 1 FCS Maintenance Pack 1.3.4 User Manual FCS Maintenance Pack is a utility pack designed to keep your Final Cut Studio machine running at optimal performance and help resolve problems when they arise. Major problems always seem to occur right on a deadline - FCS Maintenance Pack is designed to quickly diagnose and fix common issues, ensuring you meet your deadline. With the Task Scheduler utility, you can even schedule maintenance tasks in the background and not have to worry about them. FCS Maintenance Pack includes: Autosave Cleaner – Expanding on the basic autosave management in Final Cut Pro and Motion, Autosave Cleaner offers more flexibility and can remove autosaves based on additional criteria including age and file size. It can also be set to automatically remove autosaves from the Trash so that you don't have to keep emptying it when working on a long project. Corrupt Clip Finder – When you have corrupt media on your timeline, Final Cut Pro will simply crash and you will not have any idea which clip is causing the issue. You face the long and arduous process of reconnecting each clip one-by-one in order to find the problematic one. Corrupt Clip Finder finds the corrupt clip for you in seconds. Crash Analyzer – All of us have at some point received cryptic or confusing error messages and crash logs. Crash Analyzer analyzes your Final Cut Pro logs, attempts to diagnose the cause of the crash and suggests ways to solve the problem. FCS Maintenance Pack User Manual 2 FCS Housekeeper – Trashes various caches and temporary files to keep Final Cut Studio in peak operating condition.
    [Show full text]
  • FILES and NAVIGATION SERVICES Demonstration Program: Files
    18 FILES AND NAVIGATION SERVICES Demonstration Program: Files Introduction This chapter addresses: · Creating, opening, reading from, writing to, and closing files. · Navigation Services, an application programming interface that allows your application to provide a user interface for navigating, opening, and saving Mac OS file objects. Files Types of Files A file is a named, ordered sequence of bytes stored on a volume. The files associated with an application are typically: · The application file itself, which comprises the application's executable code and any application- specific resources and data. · Document files created by the user using the application, which the user can edit. · A preferences file created by the application to store user-specified preference settings for the application. The Operating System also uses files for certain purposes. For example, as stated at Chapter 9, the File Manager uses a special file called the volume's catalog file to maintain the hierarchical organisation of files and folders in a volume. Characteristics of Files File Forks Macintosh files comprise two forks, called the data fork and the resource fork. The resource fork contains a resource map and resources. Unlike the bytes stored in the resource fork, the bytes in the data fork do not have to have any particular internal structure. Your application must therefore be able to interpret the bytes in the data fork in an appropriate manner. All Macintosh files contain a data fork and a resource fork; however, one or both of these forks may, in fact, be empty. Fig 1 shows the typical contents of the data and resource forks of an application file and a document file.
    [Show full text]