home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 April / macformat-049.iso / mac / Shareware Plus / Developers / Jon’s Commands / Jon’s Commands Read Me < prev    next >
Encoding:
Text File  |  1996-11-17  |  10.6 KB  |  145 lines  |  [TEXT/ttxt]

  1. Jon’s Commands
  2. Copyright 1993-97 by Jon Pugh
  3. (408) 974-0629
  4. jonpugh@frostbitefalls.com
  5.  
  6. You can always find the latest version on my web page: http://www.infoworkshop.com/~jonpugh/
  7.  
  8. Free for noncommercial use.
  9. Contact me for a simple cheap license if you wish to include any or all of these as part of a software solution that you sell.
  10.  
  11. This AppleScript scripting addition provides AppleScript and all scriptable and Apple Event aware applications with added functionality.  To examine the AppleScript syntax of each of these commands, simply drag Jon’s Commands onto the Script Editor or use the Open Dictionary command to open it.  To install it, simply drop it into the Scripting Additions folder which is inside your Extensions folder.
  12.  
  13. The file “Jon’s Commands Reference” is an Apple Guide file.  It contains a quick reference of all the commands’ syntax, examples and explanations.  It is designed to be used in your script editor.  You install it by placing it or an alias to it in the same folder as your script editor.  “Jon’s Commands Reference” will then appear in the help menu on the right side of your menu bar.  This guide is especially useful with Script Debugger, available from Late Night Software, since that editor is scriptable. In all other editors, when you press the Copy button a copy of the current command’s complete syntax is placed on the clipboard for you to paste into your script.  In Script Debugger, the text will be placed directly into the front script window, without the annoying switch to the Finder and back which is necessary with the other editors.  Jon’s Commands needs to be installed for the Copy feature to work properly with any editor besides Script Debugger, as does the scriptable Finder.
  14.  
  15. Jon’s Commands includes these commands:
  16.    deleteFile - delete a file, empty folder or a list of files and/or empty folders
  17.    renameFile - rename a file or folder
  18.    moveFile - move a file, folder or a list of files and/or folders to another folder
  19.    copyFile - copy a file, folder or a list of files and/or folders
  20.    sound volume - get the volume setting
  21.    set sound volume to - set the volume setting
  22.    clipboard info - get a list of data on the clipboard
  23.    set the clipboard to - put data on the clipboard
  24.    the clipboard - get data from the clipboard
  25.    execute FKEY - run an FKEY resource
  26.    screen list - describe the monitor configuration
  27.    finder selection - return the Finder’s selection
  28.    keys pressed - get a list of pressed keys
  29.    machine environment - get info about the machine via Gestalt
  30.    play sound - play sound resources, files and descriptors
  31.    run script resource - run an ‘Scpt’ or ‘scpt’ script resource
  32.    free memory - return the free memory available
  33.    the ticks - return the current value of tickCount
  34.    walk folders - walk folders and run a script on each file
  35.    set cursor to - provide feedback with the cursor
  36.    AE user interaction level - control the interaction level
  37.    choose color - use the color picker to select a color
  38.    keyboard lights - get and set the lights on the extended keyboard
  39.    snag object - save an object specifier into a resource file
  40.    alias information - get information about an alias
  41.  
  42. Jon’s Commands includes these objects:
  43.    picture - for getting them off the clipboard «class PICT»
  44.    sound - for getting them off the clipboard & playing them «class snd »
  45.    screen info object - for describing the monitors
  46.    environment info object - for describing the machine
  47.    alias info object - for describing an alias
  48.  
  49. Jon’s Commands includes these coercions:
  50.    string to file specification - ‘TEXT’ to ‘fss ’
  51.    styled text to file specification - ‘STXT’ to ‘fss ’
  52.    international text to file specification - ‘itxt’ to ‘fss ’
  53.  
  54.  
  55. Version History:
  56.  
  57. 1.0b1 - first public release
  58. 1.0b2 - fixed key name in “keys pressed” for PowerBook keyboard.
  59. 1.0b3 - added 7.1.1 to version check for “finder selection”.
  60. 1.0b4 - added “run script resource” command.
  61. 1.0b5 - added “free memory” and “the ticks” commands.
  62. 1.0 - official release.
  63. 1.1b1 - added “copyFile” command. Made “moveFile”, “deleteFile”, “renameFile” & “copyFile” accept lists of files, aliases or pathnames. Added string to file specification coercion.
  64. 1.1b2 - fixed bug in “set clipboard to” which could cause changes to the clipboard to be unnoticed and fixed a really minor bug in “execute FKEY” which passed a dirty PC to the FKEY in 24 bit mode.
  65. 1.1b3 - added “walk folders” command, made “finder selection” return aliases for AS 1.0 compatibility and made “screen list” work without color QuickDraw.
  66. 1.1 - official release
  67. 1.1.1b1 - fixed “machine environment” property name conflict with “machine” by renaming it “machine type” and actually implemented the “cpu type” property. Also fixed the sample script for “walk folders” above.
  68. 1.1.1b2 - fixed “execute fkey” error handling, twiddled clipboard code to remove debugger calls & clean up the code a bit, fixed “finder selection” when items were on desktop of volumes other than the startup volume & made “walk folders” send an alias instead of a file specification for compatibility with AS 1.0.
  69. 1.1.1b3 - fixed error handler in “play sound”.
  70. 1.1.1 - official release
  71. 1.1.2b1 - made string to fsspec coercion more picky so that it doesn’t confuse the “run script” osax.
  72. 1.1.2 - official release
  73. 1.1.3b1 - recompiled with debugger breaks off. Ooops.
  74. 1.1.3 - official release
  75. 1.2b1 - added “set cursor to” command.
  76. 1.2b2 - added “AE user interaction level” function.
  77. 1.2 - official release
  78. 1.3b1 - added “only using files of type” parameter to “walk folders” command.
  79. 1.3 - official release
  80. 1.3.1b1 - made aete unpurgeable to avoid Script Editor dictionary bug.
  81. 1.3.1 - official release
  82. 1.3.2b1 - added “scriptable Finder” to “machine environment” record.
  83. 1.3.2b2 - added additional acur and CURS resources and spruced up the readme.
  84. 1.3.2b3 - made “copyFile” delete the temp file even if FSpExchangeFile fails.  Also fixed memory leak in “keys pressed”.
  85. 1.3.2b4 - honest, this time “copyFile” is fixed.  It was FSpDelete that was failing.
  86. 1.3.2b5 - replaced guts of “copyFile” with MoreFiles code. Now it works with drop boxes. Spruced up the readme some more.
  87. 1.3.2 - official release
  88. 1.3.3b1 - Made clipboard commands error when in the background.
  89. 1.3.3b2 - Fixed “copyFile” problem when replacing a nonexistent file.
  90. 1.3.3 - official release
  91. 1.3.4b1 - Made “walk folders” command step backwards through folders.
  92. 1.3.4b2 - Made “copyFile” fail when copying to a nonexistant directory.
  93. 1.3.4b3 - Made “copyFile” return better errors when files and directories are missing. Zeroed location when not replacing so that the Finder will put the icon in the first empty spot.
  94. 1.3.4b4 - Made “copyFile” copy folders too.
  95. 1.3.4 - official release
  96. 1.3.5b1 - Fixed “copyFile” bug when copying file to file with a different name.
  97. 1.3.5 - official release
  98. 1.3.6b1 - Made replacing parameter on “copyFile” accept yes/no/ask & error when used with directories.
  99. 1.3.6b2 - Fixed “walk folders” bug when walking folders; files were fine.
  100. 1.3.6b3 - Fixed “finder selection” crash when trash is selected.  There are probably still problems with selecting PowerTalk or GX items which are not files.
  101. 1.3.6b4 - Added “check bit” parameter to “machine environment” command. 
  102. 1.3.6 - official release
  103. 1.3.7b1 - Fixed some comments in the dictionary. Changed the “check bit” parameter of “machine environment” command to be zero based instead of one based, making it compatible with Inside Mac.  This affects scripts!
  104. 1.4b2 - Added “choose color” command.  Wondered if this change log was worth the bother. It’s kind of embarassing, but I guess it’s educational. I hope.  :)  Changed the version to 1.4 since we added a command.
  105. 1.4b3 - Added “owner name” and “sharing name” properties to “machine information” record.
  106. 1.4b4 - Fixed “CPU type” and “FPU” to work properly with PowerPC machines and added “PowerPC” property. Added description and examples for “screen list” command to this document. It was always missing and no one noticed.
  107. 1.4 - official release
  108. 1.5b1 - Made everything compile with MPW Pro and the new headers.  Made “moveFile” support the Finder’s Put Away command. Added “Jon’s Commands Reference” guide file to the package. Added “set screens to” command.
  109. 1.5b2 - Added “with unlocking” parameter to “deleteFile” command so it can delete locked files. Made “set screens to” command persistent when running Display Manager 2. Beefed up the examples and moved them to a new file, “Jon’s Commands Notes” to avoid the 32K limit of SimpleText.
  110. 1.5b3 - included Display Enabler for Display Manager 2.
  111. 1.5 - official release
  112. 1.5.1b1 - Reverted to 1.4’s “finder selection” command because the new sc compiler appears to have changed the object layout so that it doesn’t match the Finder’s objects anymore and thus doesn’t work in 1.5. Also ditched the Display Library as it isn’t needed.
  113. 1.5.1 - official release
  114. 1.6b1 - Added "keyboard lights" command.
  115. 1.6 - official release
  116. 1.7b1 - Added **** to TEXT coercion.
  117. 1.7b2 - Added "snag object" command.
  118. 1.7b3 - Added a couple more parameters to the "snag object" command.  Removed the Display Enabler since it’s too big and available seperately.
  119. 1.7b4 - Removed the **** to TEXT coercion because of its lack of usefulness and potential for engendering confusion.
  120. 1.7 - official release
  121. 1.7.1b1 - Fixed moveFile for multiple files and put away functionality.
  122. 1.7.1b2 - Added this comment for you comment aficionados.
  123. 1.7.1 - official release
  124. 1.7.2b1 - Reworked ordering of “walk folder” execution so that deleting files & folders is possible. Made “deleteFile” delete folders recursively.
  125. 1.7.2 - official release
  126. 1.8b1 - Added “alias information” command.
  127. 1.8b2 - Futzed with it.
  128. 1.8b3 - ++futz
  129. 1.8b4 - Made “machine environment” handle missing machine or owner name safely.
  130. 1.8b5 - Made “walk folders” return errors from the script properly (they were all -1753 before).
  131. 1.8 - official release
  132. 1.8.1b1 - Made “machine environment” recognize PowerBook keyboards and 603e, 603ev and 604e processors.
  133. 1.8.1b2 - Fixed missing watch cursor from animated cursor in “set cursor to” command. Changed a bunch of the ids for resources just in case since they might conflict with application resources when embedding osaxen.  Now they’re all in wackier ranges.    This could affect scripts!  This could affect the “set cursor to” command in your scripts iff you refer to cursor lists by number instead of by name. Made “play sound” recognize alias files. 
  134. 1.8.1b3 - Shortened the copyFile temp file name so that it couldn’t get too long & recompiled with MoreFiles 1.4.3.
  135. 1.8.1 - official release
  136.  
  137. Feel free to send money or to write with questions, comments or suggestions.
  138.  
  139. Jon Pugh
  140. One Infinite Loop MS 303-3A
  141. Cupertino, CA 95014
  142. (408) 974-6029
  143. jonpugh@frostbitefalls.com
  144. http://www.infoworkshop.com/~jonpugh/
  145.