• Seedclip.bat batch file to seed Windows clipboard with known text (for subsequent pasting)

    From Wolf Greenblatt@wolf@greenblatt.net to alt.msdos.batch,alt.comp.microsoft.windows,alt.msdos.batch.nt on Wed Oct 16 17:40:08 2024
    From Newsgroup: alt.msdos.batch

    Below is a process for seeding the Windows clipboard with text
    such that the clipboard can easily be pasted into new text files.

    The code was kindly proposed by Herbert Kleebauer on the Windows newsgroup
    in response to this "New | Text Document" context thread earlier this week. <https://www.novabbs.com/computers/article-flat.php?id=82159&group=alt.comp.os.windows-10#82159>

    1. Create this sample/template "seedclip.bat.exe" exactly as shown below:
    @echo off
    REM seedclip.bat seeds the Windows clipboard for subsequent pastes
    (for /l %%i in (1,1,10) do @echo =====================&echo.)|clip

    2. Rightclick "seedclip.bat.exe" & select "Pin to taskbar".

    3. Rightclick on the pinned icon & rightclick again to select "Properties"
    & click the "Change icon" button to choose any desired available icon.

    4. In the Windows file explorer, rename the batch file from
    "seedclip.bat.exe" to "seedclip.bat" by removing the ".exe".

    This step was needed because you can't pin a batch file to the taskbar.

    5. Rightclick on the pinned icon & rightclick again to select "Properties"
    to change the pinned icons's TARGET from "C:\whatever\seedclip.bat.exe"
    to "C:\whatever\seedclip.bat".

    6. Click on the pinned taskbar icon to seed the clipboard with text.
    Then open a new text file and paste the clipboard to that file.

    You're done.
    Now you can see any new text file with the desired contents.

    If desired, create a custom "seedclip" command for the Windows RunBox.

    a. Rightclick on the App Paths key in the system registry.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
    b. Create a new key called "seedclip.exe" & set the string value
    Value =
    c. To seed the Windows clipboard, just press the "Windows+R" sequence
    to bring up the Windows RunBox and type "seedclip" & then hit Enter.

    Please test this out and let me know what improvements you suggest.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Wolf Greenblatt@wolf@greenblatt.net to alt.msdos.batch,alt.comp.microsoft.windows,alt.msdos.batch.nt on Thu Oct 17 10:23:24 2024
    From Newsgroup: alt.msdos.batch

    On Wed, 16 Oct 2024 17:40:08 -0400, Wolf Greenblatt wrote:

    If desired, create a custom "seedclip" command for the Windows RunBox.

    a. Rightclick on the App Paths key in the system registry.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
    b. Create a new key called "seedclip.exe" & set the string value
    Value =
    c. To seed the Windows clipboard, just press the "Windows+R" sequence
    to bring up the Windows RunBox and type "seedclip" & then hit Enter.

    Oops. I had saved a spot for pasting the value but forgot to paste it.

    If desired, create a custom "seedclip" command for the Windows RunBox.

    a. Rightclick on the App Paths key in the system registry.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
    b. Create a new key called "seedclip.exe" & set the string value
    Key = seedclip.exe (note that the keyword must end with ".exe"
    Value = C:\whatever\seedclip.bat
    c. To seed the Windows clipboard, just press the "Windows+R" sequence
    to bring up the Windows RunBox and type "seedclip" & then hit Enter.

    Note that the "App Paths" key can point to more than just a batch file.
    It can point to a shortcut or executable or any registered document type.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
    Key = keyword1.exe (note that the keyword must end with ".exe"
    Value = C:\whatever\file.lnk (the file doesn't have to match the keyword)

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
    Key = keyword2.exe (note that the keyword must end with ".exe"
    Value = C:\whatever\file.exe (the file doesn't have to match the keyword)

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\
    Key = keyword1.exe (note that the keyword must end with ".exe"
    Value = C:\whatever\file.docx (the file type should be registered)

    <https://helgeklein.com/blog/how-the-app-paths-registry-key-makes-windows-both-faster-and-safer/>
    <https://docs.revenera.com/installshield22helplib/helplibrary/IHelpAddAppPathsToComponent.htm>
    <https://superuser.com/questions/1642149/what-does-hklm-software-microsoft-windows-currentversion-app-paths-actually-do>
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Tom Del Rosso@fizzbintuesday@that-google-mail-domain.com to alt.msdos.batch,alt.comp.microsoft.windows,alt.msdos.batch.nt on Sat Oct 26 19:45:27 2024
    From Newsgroup: alt.msdos.batch

    Wolf Greenblatt wrote:
    Below is a process for seeding the Windows clipboard with text
    such that the clipboard can easily be pasted into new text files.

    I have sometimes wanted to copy the whole contents of a command window
    and save it in a file. A "tee" program is usually not sufficient. I
    managed to do it with a mouse macro program, but a single command would
    be ideal.


    The code was kindly proposed by Herbert Kleebauer on the Windows
    newsgroup in response to this "New | Text Document" context thread
    earlier this week. https://www.novabbs.com/computers/article-flat.php?id=82159&group=alt.comp.os.windows-10#82159


    I wondered where Herbert went. He used to post in alt.msdos.batch.nt.
    --
    Defund the Thought Police


    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Herbert Kleebauer@klee@unibwm.de to alt.msdos.batch,alt.comp.microsoft.windows,alt.msdos.batch.nt on Sun Oct 27 08:53:33 2024
    From Newsgroup: alt.msdos.batch

    On 27.10.2024 01:45, Tom Del Rosso wrote:


    I have sometimes wanted to copy the whole contents of a command window
    and save it in a file. A "tee" program is usually not sufficient. I
    managed to do it with a mouse macro program, but a single command would
    be ideal.

    But with the new terminal window in WIN11 it is as simple as in
    any GUI Windows program. Do a <SHIFT> mouse click on the
    first character you want to copy, then scroll down the window
    and do a <SHIFT> mouse click on the last character you want to
    copy and then a <CTRL>-C to store it in the clipboard.


    I wondered where Herbert went. He used to post in alt.msdos.batch.nt.

    alt.msdos.batch.nt is dead which is true also for the whole
    usenet. Sad but true.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From gazelle@gazelle@shell.xmission.com (Kenny McCormack) to alt.msdos.batch,alt.comp.microsoft.windows,alt.msdos.batch.nt on Sun Oct 27 09:59:23 2024
    From Newsgroup: alt.msdos.batch

    In article <vfkrhu$5is5$1@dont-email.me>,
    Herbert Kleebauer <klee@unibwm.de> wrote:
    ...
    alt.msdos.batch.nt is dead which is true also for the whole
    usenet. Sad but true.

    It can't be that dead, considering that you just posted to it.

    (And so did I...)

    (And by "It", I can (and am) referring both to this ng and to Usenet in general...)
    --
    "Only a genius could lose a billion dollars running a casino."
    "You know what they say: the house always loses."
    "When life gives you lemons, don't pay taxes."
    "Grab 'em by the p***y!"
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Wolf Greenblatt@wolf@greenblatt.net to alt.msdos.batch,alt.comp.microsoft.windows,alt.msdos.batch.nt on Thu Nov 7 22:38:50 2024
    From Newsgroup: alt.msdos.batch

    On Sun, 27 Oct 2024 08:53:33 +0100, Herbert Kleebauer wrote:

    I have sometimes wanted to copy the whole contents of a command window
    and save it in a file. A "tee" program is usually not sufficient. I
    managed to do it with a mouse macro program, but a single command would
    be ideal.

    But with the new terminal window in WIN11 it is as simple as in
    any GUI Windows program. Do a <SHIFT> mouse click on the
    first character you want to copy, then scroll down the window
    and do a <SHIFT> mouse click on the last character you want to
    copy and then a <CTRL>-C to store it in the clipboard.

    Thanks to Herbert Kleebauer's prior suggestions, I have a series of template-creating batch files now, all invoked easily in a Runbox.

    When I want template #1 for example, I type "1" in the Runbox.
    When I want template #2, I type "2"; "3" for template #3, etc.

    All the batch files are the same - they just seed a different template into the Windows clipboard using the "pipe to clip" Herbert had suggested.

    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\1.exe
    @Default = c:\path\seedclip_template1.bat HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\2.exe
    @Default = c:\path\seedclip_template2.bat HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\3.exe
    @Default = c:\path\seedclip_template3.bat

    Where the general form of the "seed to clip" for templates is

    @echo off
    REM This seeds the Windows clipboard for subsequent pastes
    type C:\path\template.txt|clip

    When you are in any file, you just type "1" into the Runbox,
    and then you Control+V the template from the clipboard into it.

    The nice thing is you can create delimiter templates of any length with subsequent pastes, so you only really need one set of delimiters.
    @echo off
    REM seedclip.bat seeds the Windows clipboard for subsequent pastes
    (for /l %%i in (1,1,10) do @echo =============================================================================&echo.)|clip

    I am still using Herbert's spelling alt.msdos.bat program which
    verbally challenges you to spell all the words that you misspell!
    ~
    ~
    --- Synchronet 3.21d-Linux NewsLink 1.2