KeyBind User @Macros
As far as KeyBind is concerned, a @Macro is just some data; usually text; the value of which might change at any time.
Some have near-fixed values, like @Documents, which is unlikely to change during the execution of some task. Others are more dynamic, like @Sec and @MSec, which change every second and millisend, respectively. You can also make your own on-the-fly, which KeyBind calls "variables"; these can be used in the same way as @Macros and are also accessed via the "@Word" convention.
In short, all KeyBind tasks and paths accept @Macros. KeyBind will tranlate the @Macro to its live value, the moment it's used, so @Sec, for example, could be used to produce a file name timestamp accurate to one second.
You can mix KeyBind @Macros and your own @Variables and use them inside .kc scripts exactly as you would in in any Task. They are also used extensively inside the default ini file, KeyBind transforming the @Macro values into their "real" values at runtime.
The @Macro/@Variable then, is simply a placeholder for some current value, whatever it is.
As mentioned, you can use @Macros in supported KeyBind.ini settings, which is basically all of those where it might be useful to do so. The INI examples below (from the main [KeyBind] section) will hopefully give you a better idea of their potential.
Note: In the text below, any command, setting or rename pattern which might be useful to paste somewhere, click it, and it will be automatically selected for you, ready to copy / run* / whatever.
* If KeyBind is running with its default HotKeys, you can use Ctrl+Win+Alt+R to run the selection directly in KeyBind.
A few conventions..
Macros are spelt exactly as shown, checking is case-insensitive, so capitalize however you like. If a macro has no value right now (nothing selected, empty clipboard, etc.), it quietly becomes an empty string.
Some macros only make sense inside certain commands; where that applies, it says so in the entry.
The @Macros:
@AudioDevice
- The playback device names when an AudioChange trigger fires.
- Available in AudioChange trigger tasks where ordinary text @Macros are accepted. Empty when no playback device is found.
- e.g.
Speak(Sound is on @AudioDevice)- announces the current output.
See also: @DisplayCount, @SSID,
@USBDrive, @USBID,
@USBLabel
@Center
- The middle of the screen, for mouse commands that need a coordinate.
- Only understood where a screen position goes, e.g. mouse clicks and moves. Use
@DesktopWidth/2anywhere else. - e.g.
MouseClick(@Center|@Center)- clicks the exact middle of the screen.MouseMove(@Center|100)- parks the pointer mid-screen, 100 pixels down.
KeyBind.inistartup_task=MouseMove(@Center|@Center)- parks the pointer in the middle when KeyBind starts.
See also: @DesktopX, @WindowX,
@WorkAreaX
@ClipBoard
- Whatever text is sitting in the clipboard right now.
- Works in any task, anywhere ordinary text goes.
- e.g.
Speak(@ClipBoard)- reads the clipboard aloud.FileAppendData(@Desktop\notes.txt|@ClipBoard\n)- saves the clipboard to a file on your desktop.If(@ClipBoard)**Speak(There's something in the clipboard!)- only speaks when the clipboard contains text.
KeyBind.inistartup_task=If(@ClipBoard)**Speak(Clipboard ready)- checks the clipboard at startup.
See also: @ClipData, @Selected
@ClipData
- The text captured when a ClipBoard trigger fires. It stays with that trigger while its task runs, even if the task changes the clipboard.
- Available in ClipBoard trigger tasks where ordinary text @Macros are accepted. Empty for a change that contains no text.
@ClipBoardreads the current clipboard instead.- e.g.
FileAppendData(@Desktop\clips.txt|@ClipData\n)saves the captured text to a file.
See also: @ClipBoard, @Selected
@Count
- The running number, starting at 1 each time KeyBind launches. It keeps its value between tasks.
- Use
Count()to change it. Put+or-immediately after the macro to change the number by exactly one before using it. Each occurrence changes it once. - e.g.
FileSave(C:\Temp\file_@Count.txt|some-data)- writesfile_1.txtwhen KeyBind has just launched.FileSave(C:\Temp\file_@Count+.txt|some-data)- increments first, then writesfile_2.txt.Count(10)**FileSave(C:\Temp\file_@Count-.txt|some-data)- subtracts one, then writesfile_9.txt.
KeyBind.inistartup_task=Count(10)**Speak(@Count)- sets and announces the counter when KeyBind starts.
See also: @ExitValue, @Item
@DataDir
- The full path to your KeyBind data folder.
- Use it whenever a task reads or writes a file that should travel with your KeyBind setup.
- e.g.
FileAppendData(@DataDir\word-list.txt|@Selected\n)- collects selected words into a file in your data folder.Launch(|@DataDir\Scripts)- opens your scripts folder.
KeyBind.inidebug_log=@DataDir\debug.log- keeps the debug log in KeyBind's data folder.
See also: @Desktop, @Documents,
@HomeDir, @ProgramFiles,
@ScriptsDir, @TempDir,
@UserDir
@Date
- Today's date, in the format from your date_format setting (year-month-day by default).
- For scripters: the format string itself can contain time macros like @Year and @Mon.
- e.g.
Text(@Date)- types today's date at the caret.FileAppendData(@Desktop\log.txt|@Date @Time - started\n)- timestamps a log line.
KeyBind.inistartup_task=FileAppendData(@DataDir\startup.log|Started @Date\n)- dates a startup log entry.
See also: Date @Macros, @DateTimeX,
@Time
Date @Macros
@MDay,
@Mon,
@Weekday,
@WDay,
@YDay and
@Year
- Today's date in pieces: day of the month (
@MDay), month number (@Mon) and four-digit year (@Year); with the weekday name (@Weekday, e.g. Friday), day of the week (@WDay, 1-7, Sunday first) and day of the year (@YDay, 1-366). - Use them to build your own date formats wherever text goes. Use the name in messages people read; the numbers in conditions or filenames that rotate by day.
- e.g.
Text(@MDay/@Mon/@Year)- types the date day-first at the caret.FileAppendData(@Desktop\@Year-log.txt|@MDay/@Mon - @ClipBoard\n)- files notes under a yearly log.FileAppendData(@Desktop\log.txt|@Weekday, day @YDay: @ClipBoard\n)- heads each logged day with its name and number.
KeyBind.inistartup_task=FileAppendData(@DataDir\days.log|@WDay/@YDay\n)- records both day numbers at startup.date_format=@Year-@Mon-@MDay- sets the format used by@Date.
See also: @Date, @DateTimeX
@DateTimeX
@DateTime0 to
@DateTime5
- Pre-formatted date/time macros:
@DateTime0: Regional short date plus time, e.g.13/10/2026 15:50:32@DateTime1: Long date, e.g.13 October 2026@DateTime2: Short date, e.g.13/10/2026@DateTime3: Regional time, e.g.15:51:05@DateTime4: 24-hour hours and minutes, e.g.15:51@DateTime5: 24-hour hours, minutes and seconds, e.g.15:51:32
- e.g.
Text(@DateTime1)- types the long date at the caret.Speak(It is now @DateTime5)- announces the time including seconds.
KeyBind.inistartup_task=FileAppendData(@DataDir\startup.log|@DateTime1\n)- records when KeyBind started.
See also: @Date, Date @Macros,
@Time
@Desktop
- The full path to your desktop folder.
- Use it as the start of any file path that should land on the desktop.
- e.g.
FileAppendData(@Desktop\word-list.txt|@Selected\n)- adds the selected word to a desktop list.Download(https://corz.org/blog/|@Desktop\blog.html)**Launch(|@Desktop\blog.html)- saves a web page to the desktop.
KeyBind.iniscripts_dir=@Desktop\KeyBind Scripts- keeps your script menu's files on the desktop.
See also: @DataDir, @Documents,
@HomeDir, @TempDir
@DesktopX
@DesktopWidth and
@DesktopHeight
- The width and height of your screen in pixels, straight from Windows.
- Use them in maths anywhere a coordinate or size goes; halve them for the middle.
- e.g.
WinMove(0|0|@DesktopWidth/2|@DesktopHeight)- puts the active window on the left half of the screen.Activate(Explorer)**WinMove(@DesktopWidth/2|0|@DesktopWidth/2|@DesktopHeight)- puts Explorer on the right half.
KeyBind.inistartup_task=FileAppendData(@DataDir\screen.txt|@DesktopWidth x @DesktopHeight\n)- records the screen size at startup.
See also: @Center, @WindowX,
@WorkAreaX
@DisplayCount
- The screen count when a DisplayChange trigger fires.
- Available in DisplayChange trigger tasks where ordinary text @Macros are accepted.
- e.g.
Speak(Screens changed to @DisplayCount)- announces the new count.
See also: @AudioDevice, @SSID,
@USBDrive, @USBID,
@USBLabel
@Documents
- The full path to your documents folder.
- e.g.
Launch(|@Documents)- opens your documents folder.FileList(@Documents|||docfiles)**ListView(@docfiles|Documents files)- lists everything in your documents, then shows it.MessageBox(Documents folder|@Documents)- shows where your documents folder is.
See also: @DataDir, @Desktop,
@HomeDir, @UserDir
@ExitValue
- The answer the previous command in the task gave back. Each command overwrites it as the task runs. Before anything has run it is empty, which If() reads as false, never the bare token.
- What it contains depends on the command: a file size, a download length, a date string, or nothing at all for commands that just do something.
- e.g.
FileSize(C:\Temp\movie.mkv|MB)**Speak(The film is @ExitValue megabytes.)- announces the size just measured.Input(Say Something!|Please enter some text to be spoken|spokentext)**Speak(@spokentext)- speaks the words just typed in (via a user variable rather than @ExitValue).
KeyBind.inistartup_task=FileSize(@DataDir\report.txt|KB)**Speak(@ExitValue KB)- announces the file size returned by the first command.
See also: @Count, @HttpStatus,
@Item
@ExplorerSelection
- The full paths of the files and folders selected in the Explorer window from which you run a task. Each path occupies one line, without surrounding quotes or a final line break. Separators use the
line_feedpreference (LF by default). UseListView(@ExplorerSelection|Selected files)to filter, select, copy or paste individual paths. The active tab supplies the selection. Virtual items without filesystem paths, such as This PC, are omitted. - Run the task with a HotKey while Explorer is active, or choose a saved script from KeyBind's tray menu. If KeyBind's own window or the tray has taken focus, it uses the Explorer window active before that. Activating another application clears that remembered window. Desktop icons and selections in other file managers are not included.
- KeyBind captures the list once at task start; tray scripts use the selection captured when the tray menu opens. Later changes to the selection do not change the list. Nested scripts, repeated items and
Wait()continuations use the same list. An independent task captures its own selection. The list is kept in memory, not saved to settings; a restart discards it. - No remembered Explorer window, no selected items, or only virtual items produces an empty list. If Explorer's selection cannot be read, a task that uses this token stops with a notification. Actions completed before that command remain completed. A task that does not use this token can continue.
- Use
ForEach()to act on each path;@Itemsupplies the current path. Files and folders can both appear, so choose commands appropriate to the selected items. Paths arrive in the order Explorer supplies; there is no added sorting. Filenames containing spaces, Unicode or @Tokens remain literal path data. - Prepare a test folder with two files:
Assign(explorer_demo|@TempDir\KeyBind-ExplorerSelection-@Year@Mon@Mday-@Hour@Min@Sec@MSec)**FolderCreate(@explorer_demo)**FileWriteData(@explorer_demo\one.txt|First Explorer selection test file.)**FileWriteData(@explorer_demo\two.txt|Second Explorer selection test file.)**MessageBox(Two test files created|one.txt and two.txt are ready in:\n@explorer_demo\n\nSelect both files in the folder that opens, then run your saved Explorer-selection task.)**Launch(|@explorer_demo)
- Save one of the following commands as a
.kcscript in your Scripts folder, or assign it a HotKey. Then select the two test files in Explorer and run that task:ListView(@ExplorerSelection|Explorer selection)- opens the selected paths as rows for filtering, selecting, copying and pasting.ForEach(@ExplorerSelection|MessageBox(Selected item|@Item))- shows one box per selected item.Copy(@ExplorerSelection)**ListView(@ExplorerSelection|Paths copied)- copies the path list and shows exactly what was copied.Assign(selection_log|@TempDir\KeyBind-selection-@Year@Mon@Mday-@Hour@Min@Sec@MSec.txt)**FileWriteData(@selection_log|@ExplorerSelection)**MessageBox(List saved|The selected paths were saved to:\n@selection_log)**Launch(|@selection_log)- saves the list to a new text file and opens it.
See also: @DroppedItem, @DroppedItemName,
@Item, @Selected,
@WatchedFile, @WatchedFileName
@HomeDir
- Your home folder, the full path.
- Combine it with the drive and path parts to build paths under your user profile without specifying the user's name.
- e.g.
Launch(|@HomeDir\Downloads)- opens your downloads folder.
KeyBind.iniscripts_dir=@HomeDir\KeyBind Scripts- keeps your script menu's files under your home folder.
See also: @DataDir, @Documents,
@HomeDrive, @HomePath,
@UserDir
@HomeDrive
- Your home folder's drive letter.
- e.g.
Text(Saving to drive @HomeDrive)- types the drive letter, usually C:.
@HomePath
- Your home folder's path after the drive letter.
- Combine it with the drive letter to build paths under your user profile without specifying the user's name.
See also: @HomeDir, @HomeDrive
@HttpStatus
- The status code of the most recent
HttpGET()orHttpPOST()request: 200, 404, 500 and the like. 0 means no response arrived. - Use it when the body alone cannot prove success. An empty response with a 200 status is a success;
If(@HttpStatus|200)tests exactly that. - e.g.
HttpPOST(https://corz.org/windows/software/keybind/example.php|name=KeyBind|reply)**If(@HttpStatus|200)**MessageBox(Echoed|@reply)**EndIf()- posts, then shows the echoed reply when the status is 200.
See also: @ExitValue
@Item
- The current nonempty entry being processed by
ForEach(List|Task). Spaces and backslashes remain part of the entry; its separating line break is excluded. - Each entry is available to the task and its nested scripts. Nested
ForEach()calls restore the outer entry when they return. Outside iteration, the value is empty. An unrelated triggered task does not inherit another task's entry. ForEach(one\ntwo|MessageBox(Current entry|@Item))- display one entry per message.
See also: @Count, @ExitValue,
@ExplorerSelection
@KeyBind
- The full path to the KeyBind program that is running right now.
- Mostly used for references to internal resources, such as icons.
KeyBind.inidoc_icon=@KeyBind- uses an icon inside the running KeyBind program for.kcfiles.
See also: @ProgramFiles, @ScriptsDir
@Me
- Your Windows login name.
- Use it to personalise speech or to build paths with your name in them.
- e.g.
Speak(Good morning @Me!)- greets you by name.Assign(name|Sam)**Speak(Good morning @name!)- same idea with your own variable instead.
KeyBind.inivoice_test_string=Hello @Me- greets the signed-in user when you test a voice.
See also: @Voice
@LookUp
- The most recent nonempty lookup phrase resolved by
Define(),DefineSelected()orWebSearchSelected(). Repeated spaces and line breaks are normalized. It is empty until a command resolves lookup text, is set before the page request, and remains available even if that request fails. It is not saved between launches. Define()can obtain this text from a literal word or phrase, the clipboard, a user variable or selected text.DefineSelected()andWebSearchSelected()always obtain it from selected text, falling back to the word at the caret when supported.- The
speak_task_define_urlandweb_search_urlsettings, and per-command URL overrides, must contain @LookUp where the lookup phrase belongs. KeyBind inserts UTF-8 URL-encoded text there. In other task text, this macro expands to the phrase without URL encoding. Using the macro alone does not capture a new selection or start a lookup. KeyBind.ini:speak_task_define_url=https://www.thesaurus.com/browse/@LookUp- shared URL template for both definition commands.web_search_url=https://www.google.com/search?q=@LookUp- URL template for selected-text web searches.
See also: @Selected, @ClipBoard,
Define(), DefineSelected(),
WebSearchSelected()
@MyDocuments
Alias of @Documents
@ProgramFiles
- The full path to the system's Program Files folder (add " (x86)" on 64-bit Windows for 32-bit programs).
- Use it to launch installed software without guessing where Windows put it.
- e.g.
Launch(@ProgramFiles\Mozilla Firefox\firefox.exe)- starts Firefox.
KeyBind.inieditor=@ProgramFiles\Notepad++\notepad++.exe- uses Notepad++ as the editor if it is installed there.
See also: @HomeDir, @KeyBind,
@ScriptsDir
@ScriptFullPath
Alias of @KeyBind
@ScriptsDir
- The full path to your KeyBind scripts folder, usually set in the config editor.
- Put
.kcscripts in here if you want them to appear in KeyBind's Scripts menu. Or store tem wherever you like! IIRC, you can open this folder from the tray. - e.g.
Launch(|@ScriptsDir)- opens the scripts folder.
KeyBind.iniscripts_dir=@DataDir\Scripts- resets to KeyBind's usual scripts folder.
See also: @DataDir, @KeyBind,
@ProgramFiles
@Selected
- The text most recently captured from your selection by SpeakSelected(), DefineSelected(), WebSearchSelected(), RunSelected() or another selection command. Using @Selected by itself reuses that text; it does not read your current selection.
- When a selection command captures text and nothing is selected, KeyBind selects the word around the caret and captures it instead. Selections of several words arrive whole, so phrases survive intact. Parked on empty space with nothing to grab, it stays empty.
- e.g.
SpeakSelected()- reads the selection aloud, or the word at the caret when nothing is selected.DefineSelected()- looks up the selected word or phrase and reads the definition; falls back to the word at the caret.WebSearchSelected()- searches the web for the selected word or phrase; falls back to the word at the caret when nothing is selected.SelectWord()**Copy()**FileAppendData(@Desktop\word-list.txt|@ClipBoard\n)- collects the live clipboard text after copying the selected word; this does not refresh @Selected.
See also: @LookUp, @ClipBoard, @ClipData,
@ExplorerSelection
@SSID
- The joined wifi network when a WifiChange trigger fires.
- Available in WifiChange trigger tasks where ordinary text @Macros are accepted. Empty when wifi dropped.
- e.g.
Speak(Wifi is @SSID)- announces the new network.
See also: @AudioDevice, @DisplayCount,
@USBDrive, @USBID,
@USBLabel
@TempDir
- The full path to your temporary folder, somewhere under AppData\Local\Temp.
- Use it for throwaway files a task creates and deletes.
- e.g.
Download(https://corz.org/blog/|@TempDir\blog.html)**Launch(|@Desktop\blog.html)- saves a page temporarily.
KeyBind.inidebug_log=@TempDir\KeyBind.log- writes the debug log to the temporary folder.
See also: @DataDir, @Desktop,
@Documents
@ThisApp
Alias of @KeyBind
@Time
- The current time, formatted however you set it up in your computer's regional settings, ready to speak or type.
- Use it whole, or pluck out @Hour/@Min/@Sec as required.
- e.g.
Speak(The time is @Time)- announces the time.Launch(notepad.exe)**Wait(Untitled - Notepad|5s)**Text(Started at @Time)- opens Notepad and notes when you started.
KeyBind.inivoice_test_string=The time is @Time- speaks the current time when you test a voice.
See also: @Date, @DateTimeX,
Time @Macros
Time @Macros
@Hour,
@Min,
@MSec and
@Sec
- The current time, broken into pieces: hours (00-23) (
@Hour), minutes (@Min), seconds (@Sec) and milliseconds (@MSec). - Use them to build your own timestamps or filenames.
- e.g.
Text(@Hour:@Min)- types the current time at the caret.FileAppendData(@Desktop\log.txt|@Hour:@Min:@Sec - @ClipBoard\n)- logs the clipboard with a timestamp.
KeyBind.inirandom_seed=@Hour*@Min*@Sec*@MSec- builds a seed from the current time.
@USBDrive
- The drive that tripped a USBIn or USBOut trigger, as a drive letter (e.g.
E:\). - Available in USB trigger tasks where ordinary text @Macros are accepted.
- e.g.
Speak(Drive @USBDrive connected)- announces the drive by letter.
See also: @AudioDevice, @DisplayCount,
@SSID, @USBID,
@USBLabel
@USBID
- The ID of the drive that tripped a USBIn or USBOut trigger.
- Available in USB trigger tasks where ordinary text @Macros are accepted. Empty when a drive is unplugged.
See also: @AudioDevice, @DisplayCount,
@SSID, @USBDrive,
@USBLabel
@USBLabel
- The name of the drive that tripped a USBIn or USBOut trigger.
- Available in USB trigger tasks where ordinary text @Macros are accepted. Empty when a drive is unplugged.
- e.g.
Speak(@USBLabel connected)- announces the drive by name.
See also: @AudioDevice, @DisplayCount,
@SSID, @USBDrive,
@USBID
@User
Alias of @Me
@UserDir
- The full path to your user profile folder.
- Use it to reach anything directly under your profile, like AppData.
- e.g.
Launch(|@UserDir\AppData)- opens your AppData folder.
KeyBind.iniscripts_dir=@UserDir\KeyBind Scripts- keeps your script menu's files under your profile.
See also: @DataDir, @Documents,
@HomeDir
@UserName
Alias of @Me
@UserProfileDir
Alias of @UserDir
@Voice
- The voice currently chosen for speech, filled in while a Speak() command runs.
- Only meaningful inside speech settings and the voice test string; elsewhere it stays as-is.
- e.g.
Speak(Good morning!|-|-|@Voice)- speaks in the current voice explicitly.
KeyBind.inivoice_test_string=Hello, I am @Voice- names the selected voice when you test it.
See also: @Me
@WindowX
@WindowX,
@WindowY,
@WindowWidth and
@WindowHeight
- The bounds of the window found by
GetWindow(): left edge, top edge, width and height. - Until
GetWindow()runs they describe the desktop: 0, 0,@DesktopWidthand@DesktopHeight. - e.g.
GetWindow(Untitled - Notepad)**WinMove(@WindowX|@WindowY|@WindowWidth|@WindowHeight)- puts Notepad back exactly where it was.GetWindow(Untitled - Notepad)**MessageBox(Notepad is @WindowWidth by @WindowHeight)- reports the size it found.
@WorkAreaX
@WorkAreaLeft,
@WorkAreaTop,
@WorkAreaRight and
@WorkAreaBottom
- The four usable edges of the monitor containing the centre of the active window when the tokens are expanded. An entirely off-screen window uses its nearest monitor. These KeyBind tokens work on secondary monitors as well as the primary monitor.
- Windows excludes space reserved by the taskbar and docked desktop toolbars, on any edge. A visible top taskbar increases the usable top coordinate; a bottom taskbar reduces the bottom coordinate. Auto-hide generally reserves much less space.
- Values are desktop coordinates, not width or height. A monitor left of or above the primary monitor can have negative coordinates. Usable width is
@WorkAreaRight-@WorkAreaLeft; usable height is@WorkAreaBottom-@WorkAreaTop. Right and bottom are the boundaries immediately beyond the usable pixels. - If monitor lookup fails, the values are the full virtual desktop boundaries, without taskbar exclusion. Each expansion queries the current window context; changing the active window can change the selected monitor.
- Examples:
WinMove(@WorkAreaLeft+10|@WorkAreaTop+10|600|400)- places the active window ten pixels inside its monitor's usable top-left corner.Text(Usable monitor: @WorkAreaLeft,@WorkAreaTop to @WorkAreaRight,@WorkAreaBottom)- types the four coordinates.
KeyBind.ini:countdown_x=@WorkAreaRight-208andcountdown_y=@WorkAreaBottom-105place a new timer near the usable bottom-right corner. These coordinates position the full GUI's top-left; the offsets leave space for the timer. No additional fixed taskbar allowance is required. Saved numeric positions remain exact.
See also: @Center, @DesktopX,
@WindowX
Sentinel @Macros
@Append
- Text appended to the original name for new file names when Sentinel files things away.
- Supported in ordinary Rename() patterns and in folder Sentinel Rename() patterns; not a general-purpose text macro.
- e.g.
Rename(@Append_sorted)- keeps each arrival's own name and adds the text before the extension.Rename(@Append@Random|18)- keeps each arrival's own name and adds 18 random characters.
See also: @DroppedItem, @DroppedItemName,
@LastRandom, @Random,
@Sequence, @Stamp,
@StampDate, @StampTime
@DroppedItem
- The full path of the item currently being processed by the folder Sentinel.
- Use it anywhere a task needs the file. For text before the extension, use
@Appendinstead: this keeps the extension glued on. - e.g.
FileCopy(@DroppedItem|D:\Backup\@DroppedItemName)- backs each arrival up under its own name.
- Smart readers may be wondering how we can use "\@" but fear not, \@-to-literal handling only happens inside Var* functions.
See also: @Append, @DroppedItemName,
@ExplorerSelection, @WatchedFile,
@WatchedFileName
@DroppedItemName
- The file name only of the item currently being processed by the folder Sentinel.
- Use it anywhere a task needs the file name. For text before the extension, use
@Appendinstead: this keeps the extension glued on. - e.g.
FileCopy(@DroppedItem|D:\Backup\@DroppedItemName)- backs each arrival up under its own name.
See also: @Append, @DroppedItem,
@ExplorerSelection, @WatchedFile,
@WatchedFileName
@LastRandom
- The full path that
@Randommost recently named, for later commands.
See also: @Random
@Random
- A random name (optional length) for new file names when Sentinel files things away.
- Supported in ordinary Rename() patterns and in folder Sentinel Rename() patterns; not a general-purpose text macro.
- Once
@Randomhas named something,@LastRandomcontains that full path for later commands. - e.g.
Rename(@Append@Random|18)- keeps each arrival's own name and adds 18 random characters.
See also: @Append, @LastRandom,
@Sequence, @Stamp,
@StampDate, @StampTime
@Sequence
- A running number (with optional zero-padding) for new file names when Sentinel files things away.
- Supported in ordinary Rename() patterns and in folder Sentinel Rename() patterns; not a general-purpose text macro.
- e.g.
Rename(@Desktop\photo-.jpg|@Append@Sequence|false|1)- renames an existing photo-.jpg to photo-1.jpg, photo-2.jpg, and so on, using the next sequence number.
See also: @Append, @LastRandom,
@Random, @Stamp,
@StampDate, @StampTime
@Stamp
- A date/time stamp (optional format) for new file names when Sentinel files things away.
- Supported in ordinary Rename() patterns and in folder Sentinel Rename() patterns; not a general-purpose text macro.
See also: @Append, @LastRandom,
@Random, @Sequence,
@StampDate, @StampTime
@StampDate
- A date stamp for new file names when Sentinel files things away.
- Supported in ordinary Rename() patterns and in folder Sentinel Rename() patterns; not a general-purpose text macro.
- e.g.
Rename(@Desktop\report.txt|@StampDate)**VarAssign(dated_report|@ExitValue)**If(@dated_report)**Rename(@dated_report|@Append-report)**EndIf()- renames an existing report.txt using today's date followed by -report, retaining its extension. The second rename runs only if the date-stamp rename succeeds.
KeyBind.inisentinel_task=Rename(@StampDate)**MoveTo(@Documents\Filed)- date-stamps incoming files before filing them.
See also: @Append, @LastRandom,
@Random, @Sequence,
@Stamp, @StampTime
@StampTime
- A time stamp for new file names when Sentinel files things away.
- Supported in ordinary Rename() patterns and in folder Sentinel Rename() patterns; not a general-purpose text macro.
See also: @Append, @LastRandom,
@Random, @Sequence,
@Stamp, @StampDate
@WatchedFile
- The full path of the file the Sentinel is watching.
- e.g.
FileCopy(@WatchedFile|D:\Backup\@WatchedFileName)- copies the monitored file when it changes.
See also: @DroppedItem, @DroppedItemName,
@ExplorerSelection, @WatchedFileName
@WatchedFileName
- The file name only of the file the Sentinel is watching.
- e.g.
FileCopy(@WatchedFile|D:\Backup\@WatchedFileName)- copies the monitored file when it changes.
See also: @DroppedItem, @DroppedItemName,
@ExplorerSelection, @WatchedFile
User @variables
Your own variables: @name
- Values saved with Input() or Assign() are available through their named @macro. Use letters, digits and underscores in variable names. Input() limits its variable-name argument to 16 characters; Assign() does not enforce that limit. Reserved macro names cannot be assigned.
- User variables get switched first, so they can themselves contain any of the other @macros, above. Within Var* assignment values, \@ prevents expansion at assignment time. This is not a general escape in ordinary task parameters; stored macro text can expand when the variable is subsequently used.
- Examples:
Input(Say Something!|Please enter some text to be spoken|spokentext)**Speak(@spokentext)- asks for words, then speaks them.FileReadData(C:\Temp\message.txt|message)**Speak(@message)- reads a file into a variable, then reads it aloud.Assign(name|Sam)**Speak(Good morning @name!)- greets whomever the variable names.Assign(greeting|Good morning \@Me)**Speak(@greeting)- saves@Mein a user variable, then greets the signed-in user.Assign(stamp|Today is \@Date and the time is \@Time)**Text(@stamp)- types the current date and time when you use@stamp.Assign(email|sam\@example.com)**Text(@email)- typessam@example.com, with a literal @ sign.
KeyBind.inistartup_task=Assign(name|Sam)**Speak(Hello @name)- sets and uses a KeyBind user variable at startup.