![]() Var strTime = zfill2(today.getHours()) + "." + zfill2(today.getMinutes()) ![]() Var strDate = today.getFullYear() + "." + zfill2(today.getMonth() + 1) + "." + zfill2(today.getDate()) Hi! Here is the code that will do exactly this: function zfill2(n) // This function puts "0" prefix to any single-digit number. I want a DirOpus run key combination produce the text "2020.09.04 17.44 - " You then need to set it up on a system-wide Opus hotkey so that pressing that hotkey when Opus is running triggers the script.īut again, and I can't stress this enough, this is not a function that Opus has built-in, it's not something Opus was designed to do, and if you expect it to be possible through a "one word command" you're going to be disappointed. So if you really want to do this through Opus, instead of AHK, you need to take the scripting example that Leo pointed you to, and adapt it to send the key presses corresponding to the text that you want to insert. When a text field is active, generating key presses (which makes it appear that you are typing on the keyboard) has the effect of inserting text at the cursor position. (The WScript object is also not part of Opus. The one way you can do it through Opus, which is what the thread Leo pointed you to described, is to use a bit of scripting to use the WScript object's SendKeys method to generate key presses. ![]() You seem to be under the impression that "inserting text at the cursor anywhere in the system" is a built-in function of Opus. I just wanted to try to clarify this issue since it still seems to be causing confusion. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |