|
This macro is used to send presses of control keys into the
destination window. You can use it for "pressing" single keys, e.g.
Tab, Enter, Escape or more complex combinations. Flashpaste does
not pretend to replace special software for macro recording and
playback; there are many actions which cannot be "programmed" using
Flashpaste. However, you can use %Control(...)% to perform simple
macros to save your time.
You can add macros into your text using the main menu of the
configuration window
String -> Insert Macros-> Send Control
Keys... or write them manually in the line body.
Usage
The macro body is located in brackets and represents a sequence
of commands separated by the underscore: %Control(x_x_x_x)%, where
x is one of supported instructions. As a command you can use the
following:
- Key identifier - tab, enter,
ctrl... You can quickly insert the identifier using the
list in the Add Control Macro dialog (see the picture above).
- Key letter - o, s,
n. This way, you can for example access a menu item using
the alt_n sequence or invoke the file open dialog using
the ctrl_o sequence.
- Key letter after '^' symbol - ^o, ^s, ^n. This
is alternative method to send key pressing as a UNICODE character.
This works better then simply "o" or "s" in some applications. You
are welcome to experiment on.
- Key code - #49, #1065. You
will probably never have to use keycodes, however it is
possible.
- Pause command: @time - @250,
@1000. Specify the length of pause in milliseconds after
the @ character.
- Repeat command - You can repeat pressing of
any key N times by specifying *N after it. For example, left*3 will
move the cursor 3 points left.
Specifics
- %Control(...)% is not case-sensitive, i.e.
%Control(tab)% is identical to %CONTROL(TAB)%.
- You can "accumulate" modifier keys - for
example, to press ctrl+shift+p use
%Control(ctrl_shift_p)%
- The sequence of modifier keys is applied only to the
first character which follows it. If you need to press
alt+n, alt+k use %Control(alt_n_alt_k)%,
instead of %Control(alt_n__k)%.
- As a rule, to press the ALT, the alt
command suffices, but in some cases you have to emulate exactly the
right or left ALT, in this case you can use
Ralt or Lalt respectively.
- If you need to send a long sequence of keys and the application
can't process them all, try to use a pause
(@500).
- In theory you can try to print characters using this macro, for
example the %Control(t_e_s_t)% macro can print the "test" line, but
in reality the result may be not what you intended. Better use
%Print(test)% instead.
- Note: Flashpaste
uses global hotkey to quickly insert the last
inserted line; by default it is Ctrl+O though you could
reconfigure it. Don't use this combination in your macros
or the program could hang.
Simple examples
-
MyLogin%Control(tab)%MyPassword%Control(enter)%
- example which fills a login form. Insert MyLogin, proceed to the
next field, insert MyPassword and press Enter. (Note that it could
be better to use %Print(MyLogin)% and %Print(MyPassword)%).
- %Control(alt_l_y_d_enter)% - this is
an easy way to add Drop Shadow for the current layer in
Photoshop.
-
%Control(ctrl_a_ctrl_c_ctrl_n_ctrl_v)%
this macro, launched in Word will open a new document and copy to
it all text in the current file.
Reserved keywords
Keys
APPS, BACKSPACE, CAPSLOCK, DELETE , DOWN, END, ENTER, ESCAPE,
EXECUTE, F0, F1, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, HOME,
INSERT, LEFT, LSTARTMENU, PAGEDOWN, PAGEUP, PRINTSCREEN, RIGHT,
RSTARTMENU, SPACE, STARTMENU, TAB, UP,
Modifier keys
ALT, CTRL, LALT, LCTRL, LSHIFT, LWIN, RALT, RCTRL, RSHIFT, RWIN,
SHIFT, WIN
|