How can I write batch output to a text cursor?

On Windows 7, ultimately, I want to bind a shortcut ( CTRL + ALT + D ) to the date-date stamp of the form "20120913 1232".

The step where I hung up has a batch file that writes something to my text cursor. I am currently connecting it to clip.exe , then pasting it , but I would like to exclude the middle step of the clipboard. If this is not possible, is there any other way to solve my problem?

echo %date:~-4%%date:~4,2%%date:~7,2% %time:~0,2%%time:~3,2% | clip 
+4
source share
1 answer

Wow a little over 3 years old and there’s no answer to that !? As my first official post here he is as good as any place to start ...

For OP / anyone interested: http://ahkscript.org

An automatic hotkey can be what you were. Either the vanilla supplement cmd.bat or a stand-alone AHK script should be able to extract data from STDOUT and set the date syntax, and set all the hot keys from 1 script.

The hotkey section of this question may be related to the fact that it was not answered before, and not something that can be done in the Windows CLI afaik, you need "software for reassigning shortcut keys", which is exactly that what Auto Hotkey is for :)

It has been a long time since I investigated the reassignment of keyboard shortcuts in Windows, but I remember that AHK are just a few programs that can reassign shortcut combinations with hard code, such as WinKey + R, if you yourself do not encode them (in C ++ or similar)

I also recommend that you carefully examine Rob van der Voode's website, in particular 2 articles on redirects:

http://www.robvanderwoude.com/battech_redirection.php

and below is a link to the redirect overview page, which is a particularly good cheat sheet for redirection commands / syntax.

Hope this helps anyone who might be curious

-1
source

Source: https://habr.com/ru/post/1434039/


All Articles