home *** CD-ROM | disk | FTP | other *** search
- Macro5 v2.40
- ------------
-
- Macro5 is a small but efficient program designed
- to enable you to make more effective use of your PDA.
- It allows you to define up to 16 hotkeys and 3 panels
- of 27 shortcuts for :
-
- 1) Switching directly to applications or documents
- (run them if not started). When you need an info, you don't
- have to bother anymore whether the application is already
- running or not (then having to switch to the shell in order
- to find and start it) : you just key the corresponding
- shortcut and youÆre in.
-
- 2) Pasting predefined texts (with keywords like %%date%%,
- %%time%%, %%query question_text%%).
-
- 3) Executing macros (all the OPL, some new commands, send
- keys, etc...) for shortcuting all your repetitive tasks
- (e.g. direct access to the battery statistics, automatic link
- between your agenda and your data files, help on a selected
- command in the OPL editor, immediate link on/off, inserting
- new tasks in your agenda, modifying text, restart of your
- programs after a backup with PsiWin, ..., and all the
- small utilities that are not complex enough to make an app
- but you use all the time).
-
- 4) Switching directly to folders.
-
- 5) Remapping keys.
-
- Since hotkeys can be any of the silkscreen keys, you can re-assign
- the sensitive keys to run your favorite applications and macros.
-
- For those, like me, who hate to press Ctrl+Shift+Key in order
- to access certain Menu functions, (always miss a key and got
- the wrong menu or a new character in the document), Macro5
- provides a hotkey that will prompt for a key and send
- Ctrl+Shift+Key to the current application.
-
- And last but not least, it enables you to cycle through
- tasks (like ctrl-tab on Windows), to display a tasklist,
- to run macros at startup & switch on and to manage your
- display at switch on (backlight and contrast).
-
-
- Usage :
- -------
-
- 1) You display a TaskList by pressing the TaskList Hotkey (Fn+Del by default).
- You may then switch to the selected task or close it.
-
- 2) To cycle through the tasks, hold down Ctrl, browse the applications with
- the Space Bar and release Ctrl when you have found the one your are looking
- for. It works like Ctrl-Tab on Windows. Esc or Del cancels the cycling (notice
- that the hotkey is defined as Fn+Key, then Fn+Esc will switch off your machine).
- Any other key will cycle backward. Since you do not switch to Macro5 itself
- very often, it does not appear in the cycle. Use the tasklist to access it.
-
- 3) You run a shortcut by typing first the Shortcuts Panel Hotkey (Fn+N by default),
- and then the key of the shortcut (26 letters and Space). If you configured Macro5
- for not displaying the shortcuts panels, any non-letter key or any non-assigned
- letter will pop it up.
- You move from one panel to the others with 'Tab', the arrow keys or the panel hotkeys.
- 'Esc' or the hotkey of the panel will cancel the action. 'Menu' will switch back to
- Macro5.
- You can organize the shortcuts in the panels according to their use (e.g. App, Doc,
- Macro or Office, Home, Miscellaneous). You can assign silkscreen keys to panel hotkeys
- and thereby call and run shortcuts with the pen only.
- You can set the most used shortcuts to hotkeys and run them with a single keystroke.
- When in the graphic mode, all the icons may be customized by creating multi-bitmap
- files labeled xxx.ico where xxx is the name of the file for the types 'Document',
- 'Program' and 'Macro' or the name of the caption for the types 'ClipText', 'Folder'
- and 'KeyStroke'. They must be put along the opo/app files for the types 'Macro'
- and 'Program' or in \Macros\Icons for all the other types. These files must contain
- first the bitmap of the icon and then the bitmap of the mask.
-
- 4) You send Ctrl+Shift+Key by pressing the Ctrl+Shift Hotkey (disabled by default),
- and then the letter corresponding to the Menu function you want to access.
- Any other key than a letter will cancel the action.
-
- 5) You can configure Macro5 to set the backlight and the display contrast
- when the machine is switched on. It possible to activate or deactivate the backlight
- and the contrast settings. Parameters are different for the day and the night times.
- Of course, the Night Time has to be greater than the Day Time.
-
- 6) It is also possible to define macros that will be run either at switch on (can be
- once a day) or at Macro5 startup.
-
- I have set up by default Fn+Del for the TaskList and Fn+N for the Shortcuts because
- they are the same on the different keyboard layouts. But I find more convenient
- to use only one modifier (Ctrl) and to affect the hotkeys to non-letter keys around
- the right of the Space Bar, like "Ctrl+?" & "Ctrl+," on the US keyboard and
- "Ctrl+:" & "Ctrl+;" on the French keyboard. The Ctrl+Shift hotkey is disabled by default.
- I have not set a toolbar to keep the program as small as possible.
-
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !!! I have added a hotkey to switch back to Macro5 but I think it is better to assign !!!
- !!! it to a silkscreen key (is set up in the System Control Panel->Extras). !!!
- !!! This way the same 'hotkey' allows you to switch back to Macro5 and to restart it !!!
- !!! when it's not running (after a backup). !!!
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
- File Menu :
- ----------
- + Go to background - Ctrl+B or Esc : send Macro5 to background
- + Close - Ctrl+E : exit Macro5
-
- Shortcuts Menu:
- ---------------
- + Modify - Ctrl+M or enter : edit the selected shortcut
- + Move - Ctrl+X : reassign the shortcut to a new key
- + Delete - Ctrl+H or Del : delete the selected shortcut
- + New macro - Ctrl+N : create and open a new source file for a macro
- + Open macro - Ctrl+O : edit the source file of the selected shortcut
- + Record macro - Ctrl+R : record your keystrokes in a new source file
-
- You select a shortcut either with the arrows or by typing directly the letter of
- the shortcut. You switch from one panel to the others with 'Tab' or the arrows.
- Notice that Enter edit the current shortcut and does not run it.
- Press the Shortcuts hotkey for that. When you create or edit a shortcut,
- you specify first the Caption, which is the label put on the reminding panels,
- and the type of the shortcut. Then you enter the attributes of the shortcut.
-
- A shortcut may be a :
- + direct access to a document : to be used when the file you want to open is
- a document linked to an application : it has the same icon than its
- application and it may be run by selecting it with the explorer (e.g. Data,
- Word and spreadsheet files).
- + direct access to a program : to be used when the application is not document
- oriented (e.g. Calc, Shell, Time, games, utilities). Notice that you may
- switch to the system by running : "z:\System\Apps\Shell\Shell.app".
- + text to paste : can be any text up to 255 characters, plus the following
- keywords :
- + %%country%% : insert the name of the current home country.
- + %%city%% : insert the name of the current home city.
- + %%date format%% : insert the current date as specified by format.
- format may a combination of any characters plus :
- +DD : day of the month (1 to 31)
- +MM : month (1 to 12)
- +YY : year on 4 digits
- +yy : year on 2 digits
- +DN : full day name
- +dn : 3-letter day name
- +MN : full month name
- +mn : 3-letter month name
- e.g. %%date DD/MM/yy%% pastes 21/12/97
- rem %%date%% is equivalent to %%date dn DD mn YY%%
- + %%time format%% : insert the current time as specified by format.
- format may a combination of any characters plus :
- +HH : hours in 24 format
- +hh : hours in 12 format
- +MM : minutes
- +SS : seconds
- +AP : AM/PM
- e.g. %%time hh:MM:SS AP%% pastes 01:23:45 PM
- rem %%time%% is equivalent to %%time HH:MM:SS%%
- + %%query question_text%% : open an input box with the label "question_text"
- and paste the input text.
- You can use as many keywords as you want. This way you may prepare small
- documents (e.g. email) that are customized on the spot. This version is
- limited to 255 characters, but by programming a macro with several paste
- commands, you can create large documents. If you ask for it, I will try
- to remove this limit. If you think of some new useful keywords, don't
- hesitate to send me an email. Macro5 is improved through your feedback.
- + macro to execute : look below how to program macros.
- + bookmark : allow you to access directly folders of any drive (even the ROM).
- + keystroke : used for remapping keys.
-
- When you record a macro, you are first prompted for its name (must be a new file)
- and for the task you want to work on (you have the option of not recording
- this switch). If you want to switch to the system screen or any other standard
- application, select it in Z:\System\Apps. Then enter your sequence of key and
- pen strokes. When you are done, stop the recording with the hotkey used for
- the Shortcuts and a program editor will pop up with the code of the macro.
- While recording, do not switch to another task with the application keys,
- the system tasklist or the silkscreen keys but use the TaskList or TaskCycling
- hotkeys instead. If you loose the blinking message "Recording macro...", get it back
- by switching to Macro5 with the system tasklist.
- I'm aware that the text cursor is not visible during the record of a macro
- but so far I have not been able to find a workaround.
-
- View Menu :
- -----------
- + Shortcuts panels - Ctrl+Y : if activated, the shortcuts panels will pop up
- each time you press one of the 3 Shortcuts hotkeys. Otherwise they will only
- pop up when pressing a non-letter key or a not assigned key.
- + Switch view : select how shortcuts panels are displayed.
-
- Tools Menu :
- ------------
- + Preferences - Ctrl+K : define the options for setting the display at switch on.
- The "Turn backlight on when main power" option uses the night contrast setting.
- + Hotkeys ->
- + User defined - Ctrl+U : assign your most used shortcuts to hotkeys.
- + System - Ctrl+S : set the system hotkeys :
- + First Panel : run a shortcut in the first panel
- + Second Panel : run a shortcut in the second panel
- + Third Panel : run a shortcut in the third panel
- + TaskCycling : cycle through open tasks
- + TaskList : display a tasklist
- + Ctrl+Shift : active the Ctrl+Shift capability
- + Macro5 : switch back to Macro5 itself
- Hotkeys can be any of the silkcreen keys. Use 'Space' to call the list.
- It is possible to disable any hotkey with the key 'Del'.
- !!! Some very rare key combinations may return different keycodes when Caps Lock
- is on or off. If you use your machine in both modes, watch for that (in the
- hotkey setting try the key with and without Caps and check it is the same string).
- Otherwise define your hotkeys with Caps set accordingly but it may happen that
- one of your hotkeys will not work when you are in the other Caps mode.
- + Advanced ->
- + Macro at startup - Ctrl+V : execute the specified macro at Macro5 startup.
- This feature is particularly useful after a backup or a reset, when you have
- to restart all your favorite applications. If you have assigned an Extras bar
- position to Macro5, they may all be restarted with one key stroke.
- You may use the macro "Startup" that runs all the apps & docs
- in \Startup, but it may be anything else (e.g. a sequence of FgApp%:()).
- + Macro at switch on - Ctrl+W : execute the specified macro at switch on.
- Use it to foreground an application at each switch on or when you want
- something to be done or checked regularly. For example you can use the macro
- NoLightOff that disable the backlight timer when the external power is
- connected or you can write a macro that checks the battery status at each
- switch on. You can add the option to run it only once a day.
- + Macro folder - Ctrl+F : define the path of the folder where the macros are
- stored. When you change it, Macro5 ask you to confirm the update
- of the shortcuts paths.
- !!! The system updates the shortcuts paths, but not the code of the macros.
- Some macros may have to be updated as well.
- + Panel captions - Ctrl+J : set the captions of the 3 shortcuts panels.
- + Close for backup - Ctrl+Z : enable/disable the closing of Macro5 during the backups.
- The advantage of keeping Macro5 running is that you will not have to restart it.
- !!! The drawback is that, if Macro5 is running on the disk that is backed up,
- you will get a message warning you that Macro5.app was not saved. The workaround
- is to close Macro5 each first time you make a backup with a new release of Macro5.
- As long as Macro5.app does not change, PsiWin will not try to save it and
- you will not get any warning message.
- !!! When Macro5 is set to stay open during the backups, it will not close when asked to
- do so from the tasklist. To close it, you'll have to switch to it and quit.
- + Start in background - Ctrl+G : make Macro5 go to the background once it is started.
- + Key summary - Ctrl+L : remind you the system hotkeys.
- + Help on Macro5 - Ctrl+P : start the online help.
- + About Macro5 - Ctrl+A : display information about Macro5.
-
-
- Programming of Macros :
- -----------------------
-
- Macros are written and compiled with the standard program editor.
- The sources should be named *.opl and the binaries *.opo, both stored
- in \Macros (may be reconfigured). This naming is not mandatory but
- will allow you to access these files directly from Macro5.
- The language for the macros is the same than for any other OPL program.
- All the EPOC OPL & OPX commands are available, plus some new variables,
- constants and functions that will help you writing your macros :
-
- Variables :
- -----------
-
- + Thread& : + is set at the start of a macro and by FgDoc, UseDoc, FgApp,
- BgApp, FgSystem and BgSystem.
- + is used by FgCurrent, BgCurrent, TaskUid, TaskApp, TaskDoc,
- SendKey, SendString, SendPenClick, SendPenUp, SendPenDown,
- SendPenDrag, Paste, Copy, CopyWord, TaskUid, TaskApp, TaskDoc,
- SendRscMenu, SendRscButton and SendRscList.
- + is the thread number of the task you want to work with.
-
- + Macros$ : + path of the folder where macros are stored.
- + e.g. used by the macro Pen to load the bitmap of the cursor.
- !!! do not modify it otherwise the file input boxes will not point
- to the correct folder anymore.
-
- Commands :
- ----------
-
- + FgDoc%:(Doc$)
- => + foreground the document Doc$ if in memory and open it otherwise.
- + use it only with documents bound to applications (have the same icon
- than their application and may be run by selecting them with the explorer).
- + set Thread& to the corresponding ThreadId.
- + return 0 if Doc$ was in memory, 1 if it has to be loaded
- and -1 if an error occurred.
-
- + UseDoc%:(App$,Doc$,Cmd%)
- => + switch to the document Doc$ if in memory and Cmd% < 3,
- set Thread& to the corresponding ThreadId if in memory and Cmd% = 3,
- and start App$ otherwise.
- + Cmd%=0 for open, 1 for create, 2 for run and 3 for run in background.
- Notice that the standard applications do not open Doc$ but the last
- document when they are opened with Cmd%=3.
- + set Thread& to the corresponding ThreadId.
- + return 0 if Doc$ was in memory, 1 if it has to be loaded
- and -1 if an error occurred.
-
- + FgApp%:(App$)
- => + foreground the program App$ if in memory and run it otherwise.
- + handle app, opo and application bound documents as well, but prefer
- FgDoc when you know it is a document (is faster).
- + set Thread& to the corresponding ThreadId.
- + return 0 if App$ was in memory, 1 if it has to be run
- and -1 if an error occurred.
-
- + BgApp%:(App$)
- => + set Thread& to the corresponding ThreadId if in memory and run it
- in the background otherwise. To be used when you want to send information
- (SendKeyCode, Copy$, Paste) to an application but you don't want it
- to be in the foreground yet (is faster).
- + handle only programs (app & opo), not documents.
- + set Thread& to the corresponding ThreadId.
- + return 0 if App$ was in memory, 1 if it has to be run
- and -1 if an error occurred.
-
- + FgSystem:
- => + foreground System.
- + set Thread& to the corresponding ThreadId.
-
- + BgSystem:
- => + set Thread& to the ThreadId of System.
-
- + FgCurrent:
- => + foreground the task with the ThreadId Thread&.
- !!!! make sure that Thread& points to the correct task.
-
- + BgCurrent:
- => + background the task with the ThreadId Thread&.
- !!!! make sure that Thread& points to the correct task.
-
- + FgMacro:(Mac$)
- => + execute the macro Mac$
- !!!! Thread& keeps its current value.
- !!!! you may not exceed 5 levels of macros calling other macros
-
- + FgSound:(Sound$,Volume%)
- => + play the file Sound$, waiting for the end of the file before going on.
- + 0 (no volume) =< Volume% =< 4 (maximum volume).
-
- + BgSound:(Sound$,Volume%)
- => + play the file Sound$, going on without waiting the end of the file.
- + 0 (no volume) =< Volume% =< 4 (maximum volume).
-
- + GetFocus:
- => + when any Bgxxx commands is used, the corresponding task is foregrounded
- and the macro is sent to the background. As a result all displays are now
- in the background as well and all events redirected to the current task.
- GetFocus return the focus on the macro when you need to display information
- or input data.
- !!! Thread& keeps its current value.
-
- + ReleaseFocus:
- => + return the focus to the current task.
- + you may use FgCurrent (or any Fgxxx) as well.
- !!!! Thread& keeps its current value.
-
- + CloseApp%:(App$)
- => + ask the application or document App$ to close (data are saved).
- + return 1 if App$ was running and 0 otherwise.
- !!!! if the application is not programmed to respond to closing events,
- it will not go down.
-
- + KillApp%:(App$)
- => + kill the application or document App$ (data are not saved).
- + return 1 if App$ was running and 0 otherwise.
- !!!! ALL DATA UPDATES IN THE APPLICATION MAY BE LOST !!!!
-
- + GetThread&:(App$)
- => + return the thread ID of App$ if it is running and 0 otherwise.
-
- + GetApp$:(UID&)
- => + return the full path of the program identified by UID.
-
- + TaskUid&:
- => + return the program's UID pointed by Thread&.
- !!!! make sure that Thread& points to the correct task.
-
- + TaskApp$:
- => + return the program's name pointed by Thread&.
- !!!! make sure that Thread& points to the correct task.
-
- + TaskDoc$:
- => + return the path of the document used by the program pointed by Thread&.
- return "" if the program does not use any document or has not declared it.
- !!!! make sure that Thread& points to the correct task.
-
- + CurrentFolder$:
- => + return the current folder in System.
- !!!! this functions modifies the shell bookmark.
-
- + CurrentFile$:
- => + return the current highlighted file in System.
- !!!! this functions modifies the shell bookmark.
-
- + Copy$:
- => + copy the selected text in the clipboard and return it.
- + if the text is greater than 255 characters, only the first 255 are copied.
- !!!! if no text is selected, Copy$ returns "".
- !!!! make sure that Thread& points to the correct task.
-
- + CopyWord$:(CharList$):
- => + copy the word around the cursor in the clipboard and return it.
- + CharList$ is not case sensistive and lists the allowed characters in
- the word. The selection is stopped ss soon as a not allowed character is found.
- e.g. for : + a standard word, use "ABCDEFGHIJKLMNOPQRSTUVWXYZ-"
- + a procedure name, use "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_%&$:"
- + an URL, use "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_:\."
- + a number, use "0123456789.,"
- !!!! Space or Tab CANNOT be allowed and always stop the selection.
- !!!! make sure that Thread& points to the correct task.
-
- + Paste:(Text$)
- => + put Text$ in the clipboard and paste it.
- + the keywords %%date%%, %%time and %%query question_text%% may be used.
- !!!! this command works only when the target task supports it.
- !!!! make sure that Thread& points to the correct task.
-
- + ClipType&:
- => + return the type of the object currently stored in the clipboard.
-
- + ClipLen&:
- => + return the length of the text in the clipboard
-
- + ClipRead:(BufferAddr&,Max&)
- => + put in Buffer the text in the clipboard, with a limit of Max& Characters.
- !!!! Max& has to be a long integer. If you use a constant, either do it in hexa
- and put '&' before or include "Macro.oph" for the OPL compiler to coerce
- the parameters types.
- !!!! make sure that Buffer is large enough to store Max& characters.
- !!!! if you want to read the selected text,
- use "SendKeyCode:(Ctl%+%c,Ctrl%,1) :Pause 5" before.
-
- + ClipWrite:(BufferAddr&)
- => + put in the clipboard the text in Buffer.
- !!!! if you want to paste the text in the current task,
- use SendkeyCode:(Ctl%+%v,Ctrl%,1) after.
-
- + ClipReadBmp:(id%,x%,y%)
- => + copy the bitmap stored in the clipboard to the window id% at x%,y%.
-
- + ClipWriteBmp:(id%,x%,y%,w%,h%)
- => + copy to clipboard the bitmap defined by x%,y%,w%,h% to the window id%.
-
- + ClipClear:
- => + empty the clipboard.
-
- + SendPenClick:(x%,y%)
- => + emulate a click of the pen at x%,xy%.
- !!!! make sure that Thread& points to the correct task.
- !!!! this command foregrounds the corresponding task.
-
- + SendPenDown:(x%,y%)
- => + emulate a pen going down at x%,xy%.
- !!!! make sure that Thread& points to the correct task.
- !!!! this command foregrounds the corresponding task.
-
- + SendPenUp:(x%,y%)
- => + emulate a pen going up at x%,xy%.
- !!!! make sure that Thread& points to the correct task.
- !!!! this command foregrounds the corresponding task.
-
- + SendPenDrag:(x%,y%)
- => + emulate a dragging of the pen to x%,xy%.
- !!!! make sure that Thread& points to the correct task.
- !!!! this command foregrounds the corresponding task.
-
- + SendKey:(KeyStr$)
- => + send the corresponding key sequence to the task pointed by Thread&.
- + the keywords are : Sh or Shift, Ct or Ctrl, Fn, Del, Tab, Enter,
- Space, Esc, Menu, Up, Down, Right and Left.
- they are not case sensitive (letters are).
-
- + e.g. to send: Ctrl+Fn+Left, Ctrl+Shift+Fn+Right, Ctrl+c (copy the whole text)
- use: SendKey:("Ct+Fn+Left,Ct+Sh+Fn+Right,Ct+c")
-
- to send: Hello,[Enter]How are you ?
- use: SendKey:("H,e,l,l,o,,,Enter,H,o,w, ,a,r,e, ,y,o,u, ,?")
- rem: in this case, Paste:("Hello,"+Chr$(6)+"How are you ?")
- would be faster.
-
- !!!! make sure that Thread& points to the correct task.
- !!!! KeyStr$ is limited to 255 characters. Use several SendKey if you need more.
-
- + SendString:(String$)
- => + send String$ to the task pointed by Thread&.
- + to be used instead of Paste: when String$ is short or when the target application
- does not support the copy/paste functions.
- !!!! make sure that Thread& points to the correct task.
- !!!! keywords like %%date%% %%time and %%query%% are not supported by SendString.
-
- + SendRscMenu:(RscFile$,Pos%,Menu&)
- => + read in RscFile$ the key referenced by Menu& and send it
- to the task pointed by Thread&.
- + to be used to call menu shortcuts.
- + this allows the writing of language independent macros.
- + e.g. to add a new record in a Data file :
- SendRscMenu:("z:\System\Apps\Data\Data.rsc",4,&0d) will send
- Ctrl+shift+N on the English machines but Ctrl+A on the French ones.
- + you can get Pos% and Menu& with the provided macro RscMenuCode.
- !!!! make sure that Thread& points to the correct task.
-
- + SendRscButton:(RscFile$,Pos%,Button%)
- => + read in RscFile$ the key corresponding to Button% and send it
- to the task pointed by Thread&.
- + to be used to press buttons in dialogs.
- + this allows the writing of language independent macros.
- + e.g. to set the font when editing a record in a Data file :
- SendRscButton:("z:\System\Apps\Data\Data.rsc",16,1) will send
- Ctrl+F on the English machines but Ctrl+P on the French ones.
- + Button% is the position of the button in the dialog (1 for the first).
- I have not yet found a way to compute Pos% automatically. Send me a mail
- with the description of the dialog you want to use this comand on.
-
- + e.g. to press the button No/Non/Nein...
- use : SendRscButton:("z:\System\Data\Eikon.rsc",308,1)
-
- to press the button Yes/Oui/Ya...
- use : SendRscButton:("z:\System\Data\Eikon.rsc",308,2)
-
- !!!! make sure that Thread& points to the correct task.
-
- + SendRscList:(RscFile$,Pos%,List%)
- => + read in RscFile$ the choice corresponding to List% and send it
- to the task pointed by Thread&.
- + to be used to select items in lists.
- + this allows the writing of language independent macros.
- + e.g. to turn off the link :
- SendRscList:("z:\System\Apps\Shell\Shell.rsc",42,1) will select
- 'Off' on the English machines but 'DΘsactivΘe' on the French ones.
- + List% is the position in the list of the item (1 for the first).
- I have not yet found a way to compute Pos% automatically. Send me a mail
- with the description of the dialog you want to use this comand on.
- !!!! Only the first character is used for the selection. If several items begin
- with the same character, the first in the list will be selected.
- !!!! make sure that Thread& points to the correct task.
-
- + KeyString$:(Key%,Mod%)
- => + return the caption of the key defined by ev&(1) and ev&(4) in GetEvent32.
-
- + KeyMod&:(EvMod%)
- => + translate the Modifiers Code returned by GetEvent32 in ev&(4).
- to the Modifers Code used by SendKeyCode and CaptureKey.
-
- + gClip:(Text$)
- => + same as Busy, but does not blink.
- !!!! make sure you've got the focus, otherwise nothing will appear.
- !!!! if you make some graphical operations (e.g. gPrint, gLine, ...) between gClip:()
- and gClipOff, insert a command 'gUse' after each gClip:() in order to switch back
- to the windows you're working on.
-
- + gClipOff:
- => + same as Busy Off but for gClip.
-
- + OPLCreate:(HdlAddr&,Files$)
- => + create the OPL file Files$ with the handler Hdl%.
-
- + OPLWrite:(Hdl%,Text$)
- => + write Text$ in the OPL file handled by Hdl%.
-
- + OPLClose:(Hdl%)
- => + close the OPL file handled by Hdl%.
-
- + Log:(Message%)
- => + write Message$ in c:\Logs\Macro5.txt
-
- + ViewLog:
- => + display c:\Logs\Macro5.txt in a window.
-
- + ClearLog:
- => + delete c:\Logs\Macro5.txt
-
- + CopyScreen:(id%,posX%,posY%,x%,y%,w%,h%)
- => + copy the current screen area defined by x%,y%,w%,h%
- to the window id% at posX%,posY%.
-
- + SetDictaphoneLed:(state%)
- => + turn On/Off the red LED of the dictaphone.
- + the LED is automatically turned off when the machine switches off.
-
- + Beep:
- => + sound a nice beep.
-
- + LibVersion%:
- => + display the version of the Macro5 library.
-
- Notice that a macro is seen as a part of Macro5 (that's why you are able to
- access some global variables and new functions) and consequently, as long as the
- macro is running, Macro5 is not available for an other switch or lighting up
- the display at switch on. The purpose of a macro is to automate straight tasks.
- If you think of something more complex, then program an app and define a shortcut
- to run it. Do not use macros to access Macro5 : because Macro5 is busy executing
- the macro, it will not react to the sent events.
- You may not program Macro5 to switch to itself.
- If you get strange results or the target application crashes when using Copy/Paste
- or SendKey commands, try to add pauses to let the target application catch up.
- If you think of new functions that would help writing macros, please send me an email.
- And if you write useful macros, please think that it may benefit to others.
- Either publish them on the web or send them to me and I will upload them on my site.
- I have included some examples as a tutorial :
-
- + Battery : display the battery statistics : show you how to send keys to an App.
- + LinkOn : set on the link : show you how to send keys to an App.
- + LinkOff : set off the link : show you how to send keys to an App.
- + UpperCase : set to uppercase the text you've selected : show you how to handle
- the clipboard functions.
- + DataLink : seach a data file (e.g. address book) for the selected text :
- show you how to link data spread over several applications.
- + OPLHelp : display the usage of a keyword you've selected in the OPL Editor (*) :
- show you how to link data spread over several applications.
- + FileTime : change the time stamp of a file : show you how to use OPL in a macro.
- + RunExtras : run applications in the Extras bar without the pen : show you how
- to start programs.
- + RunMacro : run not assigned macros : show you how to run macros.
- + Startup : start all the App/Doc in c:\Startup. Very useful after a backup
- with PsiWin or a reset. Can be used with Shortcut.app or XtraLink.app.
- + NoLightOff : disable the backlight timer when the main power is present. To be
- used as a 'Run macro at switch on'.
- + BatStat : display a graphical status of the main batteries for 2 seconds.
- to be used as a 'Run macro at switch on'
- + BatStatLow : same as BatStat but display the status only when the batteries are low.
- + RscMenuCode : compute the parameters Pos% and menu& required by SendRscMenu.
- + ExtrasBar : allow to display the Extras-bar when its key is used as a hotkey.
- + Pen : emulate the pen with the keyboard : no more using of the back
- of your fingernails :
-
- + arrows => move the cursor
- + space => click
- + ctrl+arrows => drag (ctrl down, move, ctrl up)
- + shift+space => space
- + shift+arrows => arrows
- + shift+esc => quit
- + any other key => key
-
- (*) : you need the "OPL reference" database file.
-
- Please have a look at them before writing your own procedures. I hope they cover
- all the new commands. If you have any questions, please feel free to contact me
- and I will do my best to reply you as soon as possible. Because you can do almost
- anything with macros, you should watch what you are doing and backup your data.
-
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !!! If you get the error message 'ppp procedure not found' where ppp is one !!!
- !!! of the macro functions (BgSystem, FgCurrent, ...), it means either that !!!
- !!! you did not select the type "macro" in the shortcut definition, or you're !!!
- !!! trying to run the macro directly from the program editor or the system. !!!
- !!! A macro cannot be run directly after a translation or by selecting it !!!
- !!! in the explorer, but must be executed through a shortcut in Macro5. !!!
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-
- Known issues :
- --------------
- + When you press 'Tab' in a file select box and the directory is system,
- the app crashes. It seems to be an EPOC bug and I can't do anything about it.
- + When Macro5 is busy doing something (open dialog or menu,
- running macro), neither the hotkeys or the display settings works.
- Consequently, do not keep open a dialog box and write straight macros.
- + The text cursor is not visible when a macro is being recorded. So far I have not
- been able to find a workaround.
- + Macro5 is not restarted after a backup by PsiWin. This is a known bug of
- PsiWin 2.1 that will only restart the applications in the ROM (Z:).
- It is fixed in PsiWin 2.2.
-
-
- Copyright :
- -----------
- This program has been written by Pascal NICOLAS. It may be distributed
- freely as long as it is not altered or sold. This program is a SmileWare,
- which means that if you use it, you "MUST" send me a :-)
- Even if you did it for a previous release, please tell me how you find
- this new version : I do love :-) very much. I will then notify you of
- the new releases.
-
- At this point, many many thanks and :-) to MattM who helps me a lot in the
- enhancement of Macro5. Thank you also to Dominique Faure who wrote Macro5.hlp
-
- And thank you to all of you who send me comments, new ideas, :-) and encourages
- me to go on.
-
- Pascal NICOLAS
- Email : pnicolas@geocities.com
- Latest version and a huge library of macros at http://www.geocities.com/SiliconValley/Pines/1215