home *** CD-ROM | disk | FTP | other *** search
/ PSION CD 2 / PsionCDVol2.iso / Programs / 447 / DOC.TXT next >
Encoding:
Text File  |  1999-02-17  |  33.9 KB  |  646 lines

  1.                  Macro5 v2.40
  2.                  ------------
  3.  
  4. Macro5 is a small but efficient program designed
  5. to enable you to make more effective use of your PDA.
  6. It allows you to define up to 8 hotkeys and 3 panels
  7. of 27 shortcuts for :
  8.  
  9.    1) Switching directly to applications or documents
  10.    (run them if not started). When you need an info, you don't
  11.    have to bother anymore whether the application is already
  12.    running or not (then having to switch to the shell in order
  13.    to find and start it) : you just key the corresponding
  14.    shortcut and youÆre in.
  15.  
  16.    2) Pasting predefined texts (with keywords like %%date%%,
  17.    %%time%%, %%query question_text%%).
  18.  
  19.    3) Executing macros (all the OPL, some new commands, send
  20.    keys, etc...) for shortcuting all your repetitive tasks
  21.    (e.g. direct access to the battery statistics, automatic link
  22.    between your agenda and your data files, help on a selected
  23.    command in the OPL editor, immediate link on/off, inserting
  24.    new tasks in your agenda, modifying text, restart of your
  25.    programs after a backup with PsiWin, ..., and all the
  26.    small utilities that are not complex enough to make an app
  27.    but you use all the time).
  28.  
  29.    4) Switching directly to folders.
  30.  
  31.    5) Remapping keys.
  32.  
  33. Since hotkeys can be any of the silkscreen keys, you can re-assign
  34. the sensitive keys to run your favorite applications and macros.
  35.  
  36. For those, like me, who hate to press Ctrl+Shift+Key in order
  37. to access certain Menu functions, (always miss a key and got
  38. the wrong menu or a new character in the document), Macro5
  39. provides a hotkey that will prompt for a key and send
  40. Ctrl+Shift+Key to the current application.
  41.  
  42. And last but not least, it  enables you to cycle through
  43. tasks (like ctrl-tab on Windows), to display a tasklist,
  44. to run macros at startup & switch on and to manage your
  45. display at switch on (backlight and contrast).
  46.  
  47.  
  48. Usage :
  49. -------
  50.  
  51. 1) You display a TaskList by pressing the TaskList Hotkey (Fn+Del by default).
  52.    You may then switch to the selected task or close it.
  53.  
  54. 2) To cycle through the tasks, hold down Ctrl, browse the applications with
  55.    the Space Bar and release Ctrl when you have found the one your are looking
  56.    for. It works like Ctrl-Tab on Windows. Esc or Del cancels the cycling (notice
  57.    that the  hotkey is defined as Fn+Key, then Fn+Esc will switch off your machine).
  58.    Any other key will cycle backward. Since you do not switch to Macro5 itself
  59.    very often, it does not appear in the cycle. Use the tasklist to access it.
  60.  
  61. 3) You run a shortcut by typing first the Shortcuts Panel Hotkey (Fn+N by default),
  62.    and then the key of the shortcut (26 letters and Space). If you configured Macro5
  63.    for not displaying the shortcuts panels, any non-letter key or any non-assigned
  64.    letter will pop it up.
  65.    You move from one panel to the others with 'Tab' or the arrow keys. 'Esc' will
  66.    cancel the action.
  67.    You can organize the shortcuts in the panels according to their use (e.g. App, Doc,
  68.    Macro or Office, Home, Miscellaneous). You can affect a silkscreen key to one of the
  69.    panel hotkeys and thereby call and run shortcuts with the pen only.
  70.    You can assign the most used shortcuts to hotkeys and run them with a single keystroke.
  71.  
  72. 4) You send Ctrl+Shift+Key by pressing the Ctrl+Shift Hotkey (disabled by default),
  73.    and then the letter corresponding to the Menu function you want to access.
  74.    Any other key than a letter will cancel the action.
  75.  
  76. 5) You can configure Macro5 to set the backlight and the display contrast
  77.    when the machine is switched on. It possible to activate or deactivate the backlight
  78.    and the contrast settings. Parameters are different for the day and the night times.
  79.    Of course, the Night Time has to be greater than the Day Time.
  80.  
  81. 6) It is also possible to define macros that will be run either at switch on (can be
  82.    once a day) or at Macro5 startup.
  83.  
  84. I have set up by default Fn+Del for the TaskList and Fn+N for the Shortcuts because
  85. they are the same on the different keyboard layouts. But I find more convenient
  86. to use only one modifier (Ctrl) and to affect the hotkeys to non-letter keys around
  87. the right of the Space Bar, like "Ctrl+?" & "Ctrl+," on the US keyboard and
  88. "Ctrl+:" & "Ctrl+;" on the French keyboard. The Ctrl+Shift hotkey is disabled by default.
  89. I have not set a toolbar to keep the program as small as possible.
  90.  
  91. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  92. !!! I have not included a hotkey to switch back to macro5 because I think it's better !!!
  93. !!! to assign it to a silkscreen key (is set up in the System Control Panel->Extras). !!!
  94. !!! This way the same 'hotkey' allows you to switch back to Macro5 and to restart it  !!!
  95. !!! when it's not running (after a backup).                                           !!!
  96. !!! If you think a regular hotkey would be better please send me your comments.       !!!
  97. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  98.  
  99.    App Menu :
  100.    ----------
  101.       + Go to background - Ctrl+B or Esc : send Macro5 to background
  102.       + Exit - Ctrl+E : exit Macro5
  103.  
  104.    Shortcuts Menu:
  105.    ---------------
  106.       + Modify - Ctrl+M or enter : edit the selected shortcut
  107.       + Move - Ctrl+X : reassign the shortcut to a new key
  108.       + Delete - Ctrl+H or Del : delete the selected shortcut
  109.       + New macro - Ctrl+N : create and open a new source file for a macro
  110.       + Open macro - Ctrl+O : edit the source file of the selected shortcut
  111.       + Record macro - Ctrl+R : record your keystrokes in a new source file
  112.  
  113.       You select a shortcut either with the arrows or by typing directly the letter of
  114.       the shortcut. You switch from one panel to the others with 'Tab' or the arrows.
  115.       Notice that Enter edit the current shortcut and does not run it.
  116.       Press the Shortcuts hotkey for that. When you create or edit a shortcut,
  117.       you specify first the Caption, which is the label put on the reminding panels,
  118.       and the type of the shortcut. Then you enter the attributes of the shortcut.
  119.  
  120.       A shortcut may be a :
  121.          + direct access to a document : to be used when the file you want to open is
  122.            a document linked to an application : it has the same icon than its
  123.            application and it may be run by selecting it with the explorer (e.g. Data,
  124.            Word and spreadsheet files).
  125.          + direct access to a program : to be used when the application is not document
  126.            oriented (e.g. Calc, Shell, Time, games, utilities). Notice that you may
  127.            switch to the system by running : "z:\System\Apps\Shell\Shell.app".
  128.          + text to paste : can be any text up to 255 characters, plus the following
  129.            keywords :
  130.               + %%country%% : insert the name of the current home country.
  131.               + %%city%% : insert the name of the current home city.
  132.               + %%date format%% : insert the current date as specified by format.
  133.                 format may a combination of any characters plus :
  134.                   +DD : day of the month (1 to 31)
  135.                   +MM : month (1 to 12)
  136.                   +YY : year on 4 digits
  137.                   +yy : year on 2 digits
  138.                   +DN : full day name
  139.                   +dn : 3-letter day name
  140.                   +MN : full month name
  141.                   +mn : 3-letter month name
  142.                 e.g. %%date DD/MM/yy%% pastes 21/12/97
  143.                 rem  %%date%% is equivalent to %%date dn DD mn YY%%
  144.               + %%time format%% : insert the current time as specified by format.
  145.                 format may a combination of any characters plus :
  146.                   +HH : hours in 24 format
  147.                   +hh : hours in 12 format
  148.                   +MM : minutes
  149.                   +SS : seconds
  150.                   +AP : AM/PM
  151.                 e.g. %%time hh:MM:SS AP%% pastes 01:23:45 PM
  152.                 rem  %%time%% is equivalent to %%time HH:MM:SS%%
  153.               + %%query question_text%% : open an input box with the label "question_text"
  154.                 and paste the input text.
  155.            You can use as many keywords as you want. This way you may prepare small
  156.            documents (e.g. email) that are customized on the spot. This version is
  157.            limited to 255 characters, but by programming a macro with several paste
  158.            commands, you can create large documents. If you ask for it, I will try
  159.            to remove this limit. If you think of some new useful keywords, don't
  160.            hesitate to send me an email. Macro5 is improved through your feedback.
  161.          + macro to execute : look below how to program macros.
  162.          + bookmark : allow you to access directly folders of any drive (even the ROM).
  163.          + keystroke : used for remapping keys.
  164.  
  165.       When you record a macro, you are first prompted for its name (must be a new file)
  166.       and for the task you want to work on (you have the option of not recording
  167.       this switch). If you want to switch to the system screen or any other standard
  168.       application, select it in Z:\System\Apps. Then enter your sequence of key and
  169.       pen strokes. When you are done, stop the recording with the hotkey used for
  170.       the Shortcuts and a program editor will pop up with the code of the macro.
  171.       While recording, do not switch to another task with the application keys,
  172.       the system tasklist or the silkscreen keys but use the TaskList or TaskCycling
  173.       hotkeys instead. If you loose the blinking message "Recording macro...", get it back
  174.       by switching to Macro5 with the system tasklist.
  175.       I'm aware that the text cursor is not visible during the record of a macro
  176.       but so far I have not been able to find a workaround.
  177.  
  178.    Display Menu :
  179.    --------------
  180.       + Change mode - Ctrl+W : select how shortcuts panels are displayed.
  181.       + Shortcuts panels - Ctrl+Y : if activated, the shortcuts panels will pop up
  182.         each time you press one of the 3 Shortcuts hotkeys. Otherwise they will only
  183.         pop up when pressing a non-letter key or a not assigned key.
  184.  
  185.    Tools Menu :
  186.    ------------
  187.       + Settings - Ctrl+S : define the options for setting the display at switch on.
  188.         The "Turn backlight on when main power" option uses the night contrast setting.
  189.       + Hotkeys ->
  190.          + User defined - Ctrl+U : assign your most used shortcuts to hotkeys.
  191.          + System - Ctrl+V : set the system hotkeys :
  192.             + First Panel : run a shortcut in the first panel
  193.             + Second Panel : run a shortcut in the second panel
  194.             + Third Panel : run a shortcut in the third panel
  195.             + TaskCycling : cycle through open tasks
  196.             + TaskList : display a tasklist
  197.             + Ctrl+Shift : active the Ctrl+Shift capability
  198.         Hotkeys can be any of the silkcreen keys. Use 'Space' to call the list.
  199.         It is possible to disable any hotkey with the key 'Del'.
  200.         !!! Some very rare key combinations may return different keycodes when Caps Lock
  201.         is on or off. If you use your machine in both modes, watch for that (in the
  202.         hotkey setting try the key with and without Caps and check it is the same string).
  203.         Otherwise define your hotkeys with Caps set accordingly but it may happen that
  204.         one of your hotkeys will not work when you are in the other Caps mode.
  205.       + Advanced ->
  206.           + Macro at startup - Ctrl+U : execute the specified macro at Macro5 startup.
  207.             This feature is particularly useful after a backup or a reset, when you have
  208.             to restart all your favorite applications. If you have assigned an Extras bar
  209.             position to Macro5, they may all be restarted with one key stroke.
  210.             You may use the macro "Startup" that runs all the apps & docs
  211.             in \Startup, but it may be anything else (e.g. a sequence of FgApp%:()).
  212.           + Macro at switch on - Ctrl+T : execute the specified macro at switch on.
  213.             Use it to foreground an application at each switch on or when you want
  214.             something to be done or checked regularly. For example you can use the macro
  215.             NoLightOff that disable the backlight timer when the external power is
  216.             connected or you can write a macro that checks the battery status at each
  217.             switch on. You can add the option to run it only once a day.
  218.           + Macro folder - Ctrl+F : define the path of the folder where the macros are
  219.             stored. When you change it, Macro5 ask you to confirm the update
  220.             of the shortcuts paths.
  221.             !!! The system updates the shortcuts paths, but not the code of the macros.
  222.             Some macros may have to be updated as well.
  223.           + Panel captions - Ctrl+J : set the captions of the 3 shortcuts panels.
  224.           + Start in background - Ctrl+G : make Macro5 go to the background once it is started.
  225.           + Close for backup - Ctrl+K : enable/disable the closing of Macro5 during the backups.
  226.             The advantage of keeping Macro5 running is that you will not have to restart it.
  227.             !!! The drawback is that, if Macro5 is running on the disk that is backed up,
  228.             you will get a message warning you that Macro5.app was not saved. The workaround
  229.             is to close Macro5 each first time you make a backup with a new release of Macro5.
  230.             As long as Macro5.app does not change, PsiWin will not try to save it and
  231.             you will not get any warning message.
  232.             !!! When Macro5 is set to stay open during the backups, it will not close when asked to
  233.             do so from the tasklist. To close it, you'll have to switch to it and quit.            
  234.       + Key summary - Ctrl+L : remind you the system hotkeys.
  235.       + Help - Ctrl+P : start the online help.
  236.       + About - Ctrl+A : display information about Macro5.
  237.  
  238.  
  239. Programming of Macros :
  240. -----------------------
  241.  
  242. Macros are written and compiled with the standard program editor.
  243. The sources should be named *.opl and the binaries *.opo, both stored
  244. in \Macros (may be reconfigured). This naming is not mandatory but
  245. will allow you to access these files directly from Macro5.
  246. The language for the macros is the same than for any other OPL program.
  247. All the EPOC32 OPL & OPX commands are available, plus some new variables,
  248. constants and functions that will help you writing your macros :
  249.  
  250.    Variables :
  251.    -----------
  252.  
  253.    + Thread& : + is set at the start of a macro and by FgDoc, UseDoc, FgApp,
  254.                  BgApp, FgSystem and BgSystem.
  255.                + is used by FgCurrent, BgCurrent, TaskUid, TaskApp, TaskDoc,
  256.                  SendKey, SendString, SendPenClick, SendPenUp, SendPenDown,
  257.                  SendPenDrag, Paste, Copy, CopyWord, TaskUid, TaskApp, TaskDoc,
  258.                  SendRscMenu, SendRscButton and SendRscList.
  259.                + is the thread number of the task you want to work with.
  260.  
  261.    + Macros$ : + path of the folder where macros are stored.
  262.                + e.g. used by the macro Pen to load the bitmap of the cursor.
  263.                !!! do not modify it otherwise the file input boxes will not point
  264.                    to the correct folder anymore.
  265.  
  266.    Commands :
  267.    ----------
  268.  
  269.       + FgDoc%:(Doc$)
  270.          => + foreground the document Doc$ if in memory and open it otherwise.
  271.             + use it only with documents bound to applications (have the same icon
  272.               than their application and may be run by selecting them with the explorer).
  273.         + set Thread& to the corresponding ThreadId.
  274.         + return 0 if Doc$ was in memory, 1 if it has to be loaded
  275.               and -1 if an error occurred.
  276.  
  277.       + UseDoc%:(App$,Doc$,Cmd%)
  278.          => + switch to the document Doc$ if in memory and Cmd% < 3,
  279.               set Thread& to the corresponding ThreadId if in memory and Cmd% = 3,
  280.               and start App$ otherwise.
  281.             + Cmd%=0 for open, 1 for create, 2 for run and 3 for run in background.
  282.               Notice that the standard applications do not open Doc$ but the last
  283.               document when they are opened with Cmd%=3.
  284.             + set Thread& to the corresponding ThreadId.
  285.         + return 0 if Doc$ was in memory, 1 if it has to be loaded
  286.               and -1 if an error occurred.
  287.  
  288.       + FgApp%:(App$)
  289.          => + foreground the program App$ if in memory and run it otherwise.
  290.             + handle app, opo and application bound documents as well, but prefer
  291.               FgDoc when you know it is a document (is faster).
  292.             + set Thread& to the corresponding ThreadId.
  293.         + return 0 if App$ was in memory, 1 if it has to be run
  294.               and -1 if an error occurred.
  295.  
  296.       + BgApp%:(App$)
  297.          => + set Thread& to the corresponding ThreadId if in memory and run it
  298.               in the background otherwise. To be used when you want to send information
  299.               (SendKeyCode, Copy$, Paste) to an application but you don't want it
  300.               to be in the foreground yet (is faster).
  301.             + handle only programs (app & opo), not documents.
  302.             + set Thread& to the corresponding ThreadId.
  303.         + return 0 if App$ was in memory, 1 if it has to be run
  304.               and -1 if an error occurred.
  305.  
  306.       + FgSystem:
  307.          => + foreground System.
  308.             + set Thread& to the corresponding ThreadId.
  309.  
  310.       + BgSystem:
  311.          => + set Thread& to the ThreadId of System.
  312.  
  313.       + FgCurrent:
  314.          => + foreground the task with the ThreadId Thread&.
  315.          !!!! make sure that Thread& points to the correct task.
  316.  
  317.       + BgCurrent:
  318.          => + background the task with the ThreadId Thread&.
  319.          !!!! make sure that Thread& points to the correct task.
  320.  
  321.       + FgMacro:(Mac$)
  322.          => + execute the macro Mac$
  323.          !!!! Thread& keeps its current value.
  324.          !!!! you may not exceed 5 levels of macros calling other macros
  325.  
  326.       + FgSound:(Sound$,Volume%)
  327.          => + play the file Sound$, waiting for the end of the file before going on.
  328.             + 0 (no volume) =< Volume% =< 4 (maximum volume).
  329.  
  330.       + BgSound:(Sound$,Volume%)
  331.          => + play the file Sound$, going on without waiting the end of the file.
  332.             + 0 (no volume) =< Volume% =< 4 (maximum volume).
  333.  
  334.       + GetFocus:
  335.          => + when any Bgxxx commands is used, the corresponding task is foregrounded
  336.               and the macro is sent to the background. As a result all displays are now
  337.               in the background as well and all events redirected to the current task.
  338.               GetFocus return the focus on the macro when you need to display information
  339.               or input data.
  340.           !!! Thread& keeps its current value.
  341.  
  342.       + ReleaseFocus:
  343.          => + return the focus to the current task.
  344.             + you may use FgCurrent (or any Fgxxx) as well.
  345.          !!!! Thread& keeps its current value.
  346.  
  347.       + CloseApp%:(App$)
  348.          => + ask the application or document App$ to close (data are saved).
  349.             + return 1 if App$ was running and 0 otherwise.
  350.          !!!! if the application is not programmed to respond to closing events,
  351.               it will not go down.
  352.  
  353.       + KillApp%:(App$)
  354.          => + kill the application or document App$ (data are not saved).
  355.             + return 1 if App$ was running and 0 otherwise.
  356.          !!!! ALL DATA UPDATES IN THE APPLICATION MAY BE LOST !!!!
  357.  
  358.       + GetThread&:(App$)
  359.          => + return the thread ID of App$ if it is running and 0 otherwise.
  360.  
  361.       + GetApp$:(UID&)
  362.          => + return the full path of the program identified by UID.
  363.  
  364.       + TaskUid&:
  365.          => + return the program's UID pointed by Thread&.
  366.          !!!! make sure that Thread& points to the correct task.
  367.  
  368.       + TaskApp$:
  369.          => + return the program's name pointed by Thread&.
  370.          !!!! make sure that Thread& points to the correct task.
  371.  
  372.       + TaskDoc$:
  373.          => + return the path of the document used by the program pointed by Thread&.
  374.               return "" if the program does not use any document or has not declared it.
  375.          !!!! make sure that Thread& points to the correct task.
  376.  
  377.       + CurrentFolder$:
  378.          => + return the current folder in System.
  379.          !!!! this functions modifies the shell bookmark.
  380.  
  381.       + CurrentFile$:
  382.          => + return the current highlighted file in System.
  383.          !!!! this functions modifies the shell bookmark.
  384.  
  385.       + Copy$:
  386.          => + copy the selected text in the clipboard and return it.
  387.             + if the text is greater than 255 characters, only the first 255 are copied.
  388.          !!!! if no text is selected, Copy$ returns "".
  389.          !!!! make sure that Thread& points to the correct task.
  390.  
  391.       + CopyWord$:(CharList$):
  392.          => + copy the word around the cursor in the clipboard and return it.
  393.             + CharList$ is not case sensistive and lists the allowed characters in
  394.               the word. The selection is stopped ss soon as a not allowed character is found.
  395.               e.g. for : + a standard word, use "ABCDEFGHIJKLMNOPQRSTUVWXYZ-"
  396.                          + a procedure name, use "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_%&$:"
  397.                          + an URL, use "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_:\."
  398.                          + a number, use "0123456789.,"
  399.          !!!! Space or Tab CANNOT be allowed and always stop the selection.
  400.          !!!! make sure that Thread& points to the correct task.
  401.  
  402.       + Paste:(Text$)
  403.          => + put Text$ in the clipboard and paste it.
  404.             + the keywords %%date%%, %%time and %%query question_text%% may be used.
  405.          !!!! this command works only when the target task supports it.
  406.          !!!! make sure that Thread& points to the correct task.
  407.  
  408.       + ClipType&:
  409.          => + return the type of the object currently stored in the clipboard.
  410.  
  411.       + ClipLen&:
  412.          => + return the length of the text in the clipboard
  413.  
  414.       + ClipRead:(BufferAddr&,Max&)
  415.          => + put in Buffer the text in the clipboard, with a limit of Max& Characters.
  416.          !!!! Max& has to be a long integer. If you use a constant, either do it in hexa
  417.               and put '&' before or include "Macro.oph" for the OPL compiler to coerce
  418.               the parameters types.
  419.          !!!! make sure that Buffer is large enough to store Max& characters.
  420.          !!!! if you want to read the selected text,
  421.               use "SendKeyCode:(Ctl%+%c,Ctrl%,1) :Pause 5" before.
  422.  
  423.       + ClipWrite&:(BufferAddr&)
  424.          => + put in the clipboard the text in Buffer.
  425.          !!!! if you want to paste the text in the current task,
  426.               use SendkeyCode:(Ctl%+%v,Ctrl%,1) after.
  427.  
  428.       + SendPenClick:(x%,y%)
  429.          => + emulate a click of the pen at x%,xy%.
  430.          !!!! make sure that Thread& points to the correct task.
  431.          !!!! this command foregrounds the corresponding task.
  432.         
  433.       + SendPenDown:(x%,y%)
  434.          => + emulate a pen going down at x%,xy%.
  435.          !!!! make sure that Thread& points to the correct task.
  436.          !!!! this command foregrounds the corresponding task.
  437.  
  438.       + SendPenUp:(x%,y%)
  439.          => + emulate a pen going up at x%,xy%.
  440.          !!!! make sure that Thread& points to the correct task.
  441.          !!!! this command foregrounds the corresponding task.
  442.  
  443.       + SendPenDrag:(x%,y%)
  444.          => + emulate a dragging of the pen to x%,xy%.
  445.          !!!! make sure that Thread& points to the correct task.
  446.          !!!! this command foregrounds the corresponding task.
  447.         
  448.       + SendKey:(KeyStr$)
  449.          => + send the corresponding key sequence to the task pointed by Thread&.
  450.             + the keywords are : Sh or Shift, Ct or Ctrl, Fn, Del, Tab, Enter,
  451.                                  Space, Esc, Menu, Up, Down, Right and Left.
  452.               they are not case sensitive (letters are).
  453.  
  454.             + e.g. to send: Ctrl+Fn+Left, Ctrl+Shift+Fn+Right, Ctrl+c (copy the whole text)
  455.                    use:     SendKey:("Ct+Fn+Left,Ct+Sh+Fn+Right,Ct+c")   
  456.  
  457.                    to send: Hello,[Enter]How are you ?
  458.                    use:     SendKey:("H,e,l,l,o,,,Enter,H,o,w, ,a,r,e, ,y,o,u, ,?")
  459.                    rem:     in this case, Paste:("Hello,"+Chr$(6)+"How are you ?")
  460.                             would be faster.
  461.  
  462.          !!!! make sure that Thread& points to the correct task.
  463.          !!!! KeyStr$ is limited to 255 characters. Use several SendKey if you need more.
  464.  
  465.       + SendString:(String$)
  466.          => + send String$ to the task pointed by Thread&.
  467.             + to be used instead of Paste: when String$ is short or when the target application
  468.               does not support the copy/paste functions.
  469.          !!!! make sure that Thread& points to the correct task.
  470.          !!!! keywords like %%date%% %%time and %%query%% are not supported by SendString.
  471.  
  472.       + SendRscMenu:(RscFile$,Pos%,Menu&)
  473.          => + read in RscFile$ the key referenced by Menu& and send it
  474.               to the task pointed by Thread&.
  475.             + to be used to call menu shortcuts.
  476.             + this allows the writing of language independent macros.
  477.             + e.g. to add a new record in a Data file :
  478.               SendRscMenu:("z:\System\Apps\Data\Data.rsc",4,&0d) will send
  479.               Ctrl+shift+N on the English machines but Ctrl+A on the French ones.
  480.             + you can get Pos% and Menu& with the provided macro RscMenuCode.
  481.          !!!! make sure that Thread& points to the correct task.
  482.  
  483.       + SendRscButton:(RscFile$,Pos%,Button%)
  484.          => + read in RscFile$ the key corresponding to Button% and send it
  485.               to the task pointed by Thread&.
  486.             + to be used to press buttons in dialogs.
  487.             + this allows the writing of language independent macros.
  488.             + e.g. to set the font when editing a record in a Data file :
  489.               SendRscButton:("z:\System\Apps\Data\Data.rsc",16,1) will send
  490.               Ctrl+F on the English machines but Ctrl+P on the French ones.
  491.             + Button% is the position of the button in the dialog (1 for the first).
  492.               I have not yet found a way to compute Pos% automatically. Send me a mail
  493.               with the description of the dialog you want to use this comand on.
  494.          !!!! make sure that Thread& points to the correct task.
  495.  
  496.       + SendRscList:(RscFile$,Pos%,List%)
  497.          => + read in RscFile$ the choice corresponding to List% and send it
  498.               to the task pointed by Thread&.
  499.             + to be used to select items in lists.
  500.             + this allows the writing of language independent macros.
  501.             + e.g. to turn off the link :
  502.               SendRscList:("z:\System\Apps\Shell\Shell.rsc",42,1) will select
  503.               'Off' on the English machines but 'DΘsactivΘe' on the French ones.
  504.             + List% is the position in the list of the item (1 for the first).
  505.               I have not yet found a way to compute Pos% automatically. Send me a mail
  506.               with the description of the dialog you want to use this comand on.
  507.          !!!! Only the first character is used for the selection. If several items begin
  508.               with the same character, the first in the list will be selected.
  509.          !!!! make sure that Thread& points to the correct task.
  510.  
  511.       + KeyString$:(Key%,Mod%)
  512.          => + return the caption of the key defined by ev&(1) and ev&(4) in GetEvent32.
  513.  
  514.       + KeyMod&:(EvMod%)
  515.          => + translate the Modifiers Code returned by GetEvent32 in ev&(4).
  516.               to the Modifers Code used by SendKeyCode and CaptureKey.
  517.  
  518.       + gClip:(Text$)
  519.          => + same as Busy, but does not blink.
  520.          !!!! make sure you've got the focus, otherwise nothing will appear.
  521.          !!!! if you make some graphical operations (e.g. gPrint, gLine, ...) between gClip:()
  522.               and gClipOff, insert a command 'gUse' after each gClip:() in order to switch back
  523.               to the windows you're working on.
  524.  
  525.       + gClipOff:
  526.          => + same as Busy Off but for gClip.
  527.  
  528.       + OPLCreate:(HdlAddr&,Files$)
  529.          => + create the OPL file Files$ with the handler Hdl%.
  530.  
  531.       + OPLWrite:(Hdl%,Text$)
  532.          => + write Text$ in the OPL file handled by Hdl%.
  533.  
  534.       + OPLClose:(Hdl%)
  535.          => + close the OPL file handled by Hdl%.
  536.  
  537.       + Log:(Message%)
  538.          => + Write Message$ in c:\Logs\Macro5.txt
  539.  
  540.       + ViewLog:
  541.          => + Display c:\Logs\Macro5.txt in a window.
  542.  
  543.       + ClearLog:
  544.          => + Delete c:\Logs\Macro5.txt
  545.  
  546.       + Beep:
  547.          => + sound a nice beep.
  548.  
  549.       + CopyScreen:(filename$)
  550.          => + Copy the current screen in filename$.
  551.  
  552. Notice that a macro is seen as a part of Macro5 (that's why you are able to
  553. access some global variables and new functions) and consequently, as long as the
  554. macro is running, Macro5 is not available for an other switch or lighting up
  555. the display at switch on. The purpose of a macro is to automate straight tasks.
  556. If you think of something more complex, then program an app and define a shortcut
  557. to run it. Do not use macros to access Macro5 : because Macro5 is busy executing
  558. the macro, it will not react to the sent events.
  559. You may not program Macro5 to switch to itself.
  560. If you get strange results or the target application crashes when using Copy/Paste
  561. or SendKey commands, try to add pauses to let the target application catch up.
  562. If you think of new functions that would help writing macros, please send me an email.
  563. And if you write useful macros, please think that it may benefit to others.
  564. Either publish them on the web or send them to me and I will upload them on my site.
  565. I have included some examples as a tutorial :
  566.  
  567.    + Battery : display the battery statistics : show you how to send keys to an App.
  568.    + LinkOn : set on the link : show you how to send keys to an App.
  569.    + LinkOff : set off the link : show you how to send keys to an App.
  570.    + UpperCase : set to uppercase the text you've selected : show you how to handle
  571.                  the clipboard functions.
  572.    + DataLink : seach a data file (e.g. address book) for the selected text :
  573.                 show you how to link data spread over several applications.
  574.    + OPLHelp : display the usage of a keyword you've selected in the OPL Editor (*) :
  575.                show you how to link data spread over several applications.
  576.    + FileTime : change the time stamp of a file : show you how to use OPL in a macro.
  577.    + RunExtras : run applications in the Extras bar without the pen : show you how
  578.                  to start programs.
  579.    + RunMacro : run not assigned macros : show you how to run macros.
  580.    + Startup : start all the App/Doc in c:\Startup. Very useful after a backup
  581.                with PsiWin or a reset. Can be used with Shortcut.app or XtraLink.app.
  582.    + NoLightOff : disable the backlight timer when the main power is present. To be
  583.                   used as a 'Run macro at switch on'.
  584.    + BatStat : display a graphical status of the main batteries for 2 seconds.
  585.                to be used as a 'Run macro at switch on'
  586.    + BatStatLow : same as BatStat but display the status only when the batteries are low.
  587.    + RscMenuCode : compute the parameters Pos% and menu& required by SendRscMenu.
  588.    + Pen : emulate the pen with the keyboard : no more using of the back
  589.            of your fingernails :
  590.  
  591.               + arrows => move the cursor
  592.               + space => click
  593.               + ctrl+arrows => drag (ctrl down, move, ctrl up)
  594.               + shift+space => space
  595.               + shift+arrows => arrows
  596.               + shift+esc => quit
  597.               + any other key => key
  598.  
  599.    (*) : you need the "OPL reference" database file.
  600.  
  601. Please have a look at them before writing your own procedures. I hope they cover
  602. all the new commands. If you have any questions, please feel free to contact me
  603. and I will do my best to reply you as soon as possible. Because you can do almost
  604. anything with macros, you should watch what you are doing and backup your data.
  605.  
  606. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  607. !!! If you get the error message 'ppp procedure not found' where ppp is one   !!!
  608. !!! of the macro functions (BgSystem, FgCurrent, ...), it means either that   !!!
  609. !!! you did not select the type "macro" in the shortcut definition, or you're !!!
  610. !!! trying to run the macro directly from the program editor or the system.   !!!
  611. !!! A macro cannot be run directly after a translation or by selecting it     !!!
  612. !!! in the explorer, but must be executed through a shortcut in Macro5.       !!!
  613. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  614.  
  615.  
  616. Known issues :
  617. --------------
  618. + When you press tab in a file select box and the directory is system,
  619.   the app crashes. It seems to be an EPOC32 bug and I can't do anything about it.
  620. + When Macro5 is busy doing something (open dialog or menu,
  621.   running macro), neither the hotkeys or the display settings works.
  622.   Consequently, do not keep open a dialog box and write straight macros.
  623. + The text cursor is not visible when a macro is being recorded. So far I have not
  624.   been able to find a workaround.
  625. + Macro5 is not restarted after a backup by PsiWin. This is a known bug of PsiWin
  626.   that will only restart the applications in the ROM (Z:).
  627.  
  628.  
  629. Copyright :
  630. -----------
  631. This program has been written by Pascal NICOLAS. It may be distributed
  632. freely as long as it is not altered or sold. This program is a SmileWare,
  633. which means that if you use it, you "MUST" send me a :-)
  634. Even if you did it for a previous release, please tell me how you find
  635. this new version : I do love :-) very much. I will then notify you of
  636. the new releases.
  637.  
  638. At this point, many many thanks and :-) to MattM who helps me a lot in the
  639. enhancement of Macro5. Thank you also to Dominique Faure who wrote Macro5.hlp
  640.  
  641. And thank you to all of you who send me comments, new ideas, :-) and encourages
  642. me to go on.
  643.  
  644. Pascal NICOLAS
  645. Email : pnicolas@geocities.com
  646. Latest version and a huge library of macros at http://www.geocities.com/SiliconValley/Pines/1215