Userscripts.htmlTEXTVIZF*õ#µ2²›µ2²›qr User Scripts

User Scripts

What are the User Scripts ?

"User Scripts" is the reserved name of a particular folder of Smile. Script files, as well as text documents and Smile dialog files, which are stored in this folder will be listed in the Scripts menu of Smile, so that they can be opened handily.
A script which is located in the "User Scripts" folder is called a user script.
Besides script files, text documents and dialog files, the "User Scripts" folder can contain folders containing such items.
It can also contain aliases of files or of folders.
If the "User Scripts" folder contains an alias which points to an item which is not present at the time when Smile is launched, the launch will be longer.

The ctrl key

Many of the User scripts have an optional behavior, which is triggered if the ctrl key is kept pressed while you pull down the Scripts menu.

For instance, pressing the ctrl key will skip any confirmation dialog, or will undo the action when this makes sense.

Many of the User scripts have a keyboard shortcut attached. It is not possible to press the control key and use the keyboard shortcut at the same time.

User items provided

The following user items are provided with the Smile 1.7 release. More user items may be available from Smile's home page . Each one can be installed in or disinstalled from the 'Scripts' menu, by following the instructions given in Scripts menu .

- Scripting helpers
Balance   E
suggest the syntax of verbs, check parenthesis, and materializes indentation. See About Balance for a complete description.
Find far error
needed for large scripts (larger than 64 Kb), because of a weakness in AppleScript. Will shift the selection by 65536 to help finding syntax errors after compilation.
Open Event Log
open a window which displays every event. In Smile, the Event window is rarely needed, because text windows offer a better debugging environment.
Output Window  L
provide a "Result" window for the scripts run from the active window. See also Result windows .
Variable watcher
provide a window which monitors the value of Smile variables. Buttons in the window allow for setting on and off the periodic update, set its period, displaying all the variables, and displaying the credits.
To monitor a variable, copy or type its name in a new line.
'Variable watcher' monitors only the variables defined in the text windows which live in Smile's context, i.e. the text windows not linked to any application by the "tell" menu.
You can disactivate the periodic update of any variable by prefixing it with the double-hyphen " -- ".

- General utilities
Close without saving  W
close the front window with no chance of ever saving its contents
Delete file
trash, in Finder, the file of the active window, and close its window. (press the control key to disable the caution dialog box)
Duplicate  D
duplicate the selected text (or dialog items, if the active window is a dialog box). If nothing is selected, duplicate the active window.
Rename file
rename, in Finder, the document whose window is the active window, and rename the active window. If the window has no document attached, only rename the active window.
Revert
close the active window without saving changes, and re-open the latest saved version.
Save a copy as
save a copy of the active window as a new file.

- Development
Check memory   M
open a dialog which monitors the memory available to Smile as a "thermometer" display, allows to set an alarm to go off when the available memory is below a given threshold, and allows to watch for memory leaks.
Decimal to Hexa   H
convert the selected string (an integer smaller than 2^48 = 281474976710656) from integer to hexa
Hexa to Decimal   X
convert the selected hexa characters (1 to 12 hexa characters) to integer
Hexa to String   G
convert the selected hexa characters to text
String to Hexa   J
convert the selected text into hexa
Compare folders
display the differences between two folders, and updates them
Object expert ...
open a dialog which allows to get and set most of the properties of the objects. To set it to work on a particular object use drag and drop, or the button if it is a window.
Open data fork   O
display the data of a file as characters (press the control key to get hexa)
Propagate window bounds
resize the active window to the size of the second window
Type and creator
allows to get and set the types and creators (4 characters codes) of any file. Caution ! Change the type or creator of a file only if you know what you are doing !
To make a text file non editable, change its type from "TEXT" to "ttro" (for "TexT Read Only").
Who Was Modified ?
display the list of the windows which have been changed and not saved
Make new button
install an (empty) new button in the front (text) window
Align horizontally
align and distribute the selected dialog items horizontally
Align vertically
align and distribute the selected dialog items vertically
Fast dialog localization
fast setting of French or US names and strings
Geneva 9
set all items to Geneva 9
New dialog
create a new, empty, dialog window, and open the palette of dialog items
Palette
palette of many different dialog items, drag them on a new dialog
Propagate bounds
resize the selected items to the size of the first item selected
Scale dialog ...
scales the frontmost dialog using any scaling factor. The scaling factor can be given as a number, or a a formula, e.g. "3/16".
Toggle dialog  Y
toggle the edit mode of the active dialog on and off
Group
group multiple files containing sclipts into one sclipt
Make basic sclipt
turns the selected text into a sclipt
Ungroup
splits a multiple (grouped) sclipt into multiple files

- Text
Measure text   L
open a dialog box which gives info on the selected text or the whole text of the active window: character count, paragraph count, etc. You can set the selection by entering any formula such as "13122 + 10*128"
Replace all   R
change the selected text into a new text entered in a dialog box, a quick alternate to the regular 'Find' dialog box.
Use the 'Fast replace' option if you have a really huge change to process. As a counterpart of being fast styles will not be preserved.
You can also use this dialog to count occurrences of a given string in a window. Just change the string into itself, without change.
Copy style   C
copy the font, size and style of the selected text in a special clipboard. The contents of this clipboard is automatically saved when you quit.
Paste style   V
applies the text properties stored by 'Copy style' to the selected text
Change case  <
change the selected text into lower case (hold Shift  for upper case)
Make an AppleScript string  "
makes the selected text into a string for AppleScript, e.g. hello becomes "hello"
Parenthesize selection  (
a shortcut to add parenthesis around the current selection
Sort lines
sort the selected lines alphabetically
Degremlinize .doc
translate most of the gremlins found when opening the data fork of a .doc PC file
TID police
displays continuously the value of 'AppleScript's text item delimiters', and allows for setting it. Includes a traffic light, which is set to green when the value is {""}, red otherwise.

- Window management
Four Tile Windows  4
tile the screen with the four frontmost windows
Send to back   B
send the active window to the background
Toggle windows   T
bring the second window to the front
Zoomit   Z
create a magnified clone of the active window. Don't use the clone to make changes.





# " _ÿ  Ô    Ô    €°    Ô    Ô    Ô  –¡    İk¢  %  İk¢„  ”  İk墉    İk¢4  ó  Ô!  1  Ô5  f  İk¢j  ½  İk¢Á  @  İk¢D  {  İk¢    İk¢b  r  İk¢¥  5  İk¢=  ·  İk¢¿  Z  İk¢Ÿ  ¶  İk墎  U  Ô€  •  Ô™    Ô:  J  ÔN  S  İk¢[  a  İk¢g  ~  İk¢  ™  İk¢²  ·  İkÂ¢Ó  Ø  İk墧  å  İk墎  ?  Ô i  {  Ô   Ÿ  İk¢ ¦  º  İk¢   l  İk¢ s  †  İk¢  ò  Ô )  :  Ô >  h  İk¢ o   İk¢ š  Ÿ  İk¢ ¦  ¬  İk¢ °    Ô 2  D  Ô H  M  İk¢ T  i  İk¢ m  n  İk¢ r  E  İk¢ I  ˆ  İk¢ Œ  A  İk¢E  ¯  İk¢·  ½  İkÂ¢à  Ú  İk墎    İk¢    İk¢'  -  İk¢1  v  İk¢}  Œ  İk¢”    İk¢  ,  İk¢E  J  İk¢Q  W  İk¢[  è  İk墕  ş  İk¢  ±  İk¢¸    İkÂ¢Ê  #  İk¢*  <  İk¢D  w  İk¢  …  İk¢‹  œ  İk¢«  »  İk¢¿  Å  İkÂ¢Ú  ß  İk¢û    İk¢    İk¢  è  İk墕    İk¢    İk¢!  &  İk¢B  G  İk¢N  T  İk¢X  ½  İk墀  ×  İkÂ¢Û  á  İk¢ö  û  İk¢    İk¢#  )  İk¢-  z  İk¢  “  İk¢—    İk¢²  ·  İkÂ¢Ó  Ø  İk墧  å  İk墎    İk¢  2  İk¢K  P  İk¢l  q  İk¢x  ~  İk¢‚  ©  İk¢°  à  İkÂ¢Ë    İk¢  (  İk¢0  á  İk墏  ú  İk¢ş    İk¢    İk¢:  ?  İk¢F  L  İk¢P     İk¢§    İkÂ¢Ê    İk¢  "  İk¢*  Ñ  İkÂ¢Õ  8  İk¢?  U  İk¢]  ¦  İk¢­  À  İkÂ¢È    İk¢  !  İk¢)  h  İk¢o  ƒ  İk¢‹  È  İkÂ¢Ï  ë  İk¢ó  %  İk¢,  8  İk¢@  ]  İk¢d  r  İk¢z  Æ  İkÂ¢Í  Ø  İk墈  %  İk¢,  @  İk¢H  Œ  İk¢“  §  İk¢¯  2  İk¢9  J  İk¢c  h  İk¢o  u  İk¢y  ±  İk¢¸  Á  İk境    İk¢    İk¢(  Q  İk¢X  c  İk¢k  ¥  İk¢­  ³  İk¢¹  à  İkÂ¢Ò  â  İk¢û   İk¢   !  İk¢ (  .  İk¢ 2  !  İk¢!  !  İk¢!6  !;  İk¢!W  !\  İk¢!c  !i  İk¢!m  !æ  İk¢!ê  "u  İk¢"y  #  İk¢#  #  İk¢#/  #4  İk¢#P  #U  İk¢#\  #b  İk¢#f  #ù  İk¢$  $  İk¢$(  $-  İk¢$I  $N  İk¢$U  $[  İk¢$_  $ª  İk¢$±  $À  İk¢$Ù  $Ş  İk¢$å  $î  İk¢$ò  %,  İk¢%A  %F  İk¢%M  %a  İk¢%h  %†  İk¢%Ÿ  %¤  İk¢%«  %±  İk¢%µ  &  İk¢&  &+  İk¢&D  &I  İk¢&P  &V  İk¢&Z  &˜  İk¢&Ÿ  &­  İk¢&µ  &ß  İk¢&æ  &û  İk¢'  'X  İk¢'_  'm  İk¢'u  (3  İk¢(;  (A  İk¢(G  (^  İk¢(m  (ƒ  İk¢(œ  (¡  İk¢(¨  (®  İk¢(²  (å  İk¢(ì  (ü  İk¢)  )  İk¢)6  );  İk¢)B  )H  İk¢)L  )x  İk¢)  )‘  İk¢)ª  )¯  İk¢)Ë  )Ğ  İk¢)×  )İ  İk¢)á  *  İk¢*  *  İk¢*3  *8  İk¢*T  *Y  İk¢*`  *f  İk¢*j  *  İk¢*İ  *á  İk¢*ó  ~selelist long Vlong fpbndlist8long long(longŞlongÖBDrwfalspvistrueWIDLfalsICFFlongrSiDlong€ptxfTEXTGenevaptpslong Rectlist8longlonglonglongWTBHlongRqULlongLWdtlongBrWdlongAuAdfalsTbSzlong # " _ 0zZstylSOUP&reco2€ÿÿ€ÿÿ š‚  \cwtx