![]() Set a keyboard shortcut for this macro to call it and change start dates of selected TaskPaper items. You will need to change the 3rd line of the Custom HTML Prompt action from “UserName” to your specific User Name. It provides a jquery date picker to be used for setting TaskPaper start dates. Then download the Keyboard Maestro macro below that I made based on iNiks’s library. You’ll need to download his library and put the html-elements folder in your ~/Library/Application Support/Keyboard Maestro/ folder. This macro relies on iNik’s Keyboard Marstro “Fancy Mac-Like HTML Prompts Library” here: Fancy Mac-Like HTML Prompts Library - Macro Library - Keyboard Maestro Discourse. All modifications are now done via code (no UI scripting), it can change start dates for multiple selected lines simultaneously, and it is prettier and easier to use than the original date picker. I called it crude because it relied on UI scripting, it only worked for a single task at a time, and the date picker UI was buggy and ugly. Variables are created on demand, but you can add, delete, see or change variables in the Variables preference pane, and you can read and write variables from AppleScript, see the Scripting section.I previously made a crude date picker for setting start dates. You can add a variable to an action using the Variable command in the Insert Function sub-menu in the Edit menu or Variable command in the Insert Token sub-menu in the Edit menu, or by selecting from the popup menu next to some variable fields, or by using Type Completion. USB Device Name replaced by the %TriggerValue% token. Select Menu Result replaced by the %ActionResult% token. Press Button Result replaced by the %ActionResult% token. Mouse Click Result replaced by the %ActionResult% token. The following special variables were: Mounted Volume Name replaced by the %TriggerValue% token. Note that these variables can easily be overwritten by other actions, so you need to use caution when depending on them. Result Button the name of the button clicked in a Prompt For User Input dialog. There are various variables used by Keyboard Maestro to convey information, including: Alert Button the name of the button clicked in an alert. This is also a good idea to do after a variable has contained sensitive information (like a password) or a large value (like a file or web page contents). You can also set a variable value to %Delete% to avoid having it show up in variable popup menus. Variables values can be accessed from shell scripts or JavaScript for Applications via environment variables, and from AppleScript via environment variables or using AppleScript commands to the Keyboard Maestro Engine, and from JavaScript using the document.kmvar dictionary, see the Scripting section. ![]() Mouse positions, window frames and the like can then be stored and manipulated in variables, and you can access the fields with "struct" like forms like Variable Name.width (field names include: x, y, left, right, top, bottom, width, height, midx, midy, and fuzz). Variable values are text, but they can contain comma separated numbers, and can then be accessed as arrays (eg Variable Name). ![]() The Prompt For User Input dialog will display such variables in a password field. Variables with names that start or end with “Password” or “PW” are considered passwords – their values will not be stored (except in memory) and they cannot be read directly by shell scripts or AppleScripts, though their consequences can easily be extracted, eg with the Set Clipboard to Text action. Variable names should not include a function or operator name with spaces around it (eg " MOD ", so "A MOD B" would not be a valid variable, although "MODULE" would be fine). Variable names are case insensitive, but their case is remembered. Variable names must start with a letter, and then can contain letters, numbers, spaces, or underscores. Keyboard Maestro includes permanently stored variables that you can use or set in many actions, as well as in Calculations or Text Tokens which can be used in almost any field in Keyboard Maestro.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |