Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: How to Auto Run Keyboard Shortcuts at Windows Sartup after a pause  (Read 8725 times)

0 Members and 1 Guest are viewing this topic.

c627627

    Topic Starter


    Newbie

    • Experience: Expert
    • OS: Windows 8
    What .bat file command run at startup accomplishes the following:

    1. Pause 60 seconds to give time for a program to auto start at Windows Startup.
    2. Run combo key command CTRL and ` pressed simultaneously.
    3. Pause 5 seconds.
    4. Run key combo key command CTRL and Enter pressed simultaneously.

    Thank you.

    Gizmo



      Rookie

      Thanked: 12
      • Experience: Experienced
      • OS: Windows 10
      Re: How to Auto Run Keyboard Shortcuts at Windows Sartup after a pause
      « Reply #1 on: March 20, 2021, 01:00:37 AM »
      I started looking into this for you -  by the way I have limited knowledge of DOS + basic programming in various languages.

      This command will pause for 60 seconds: timeout /t 60 /nobreak > NUL
      I have tested it out and it works ok (the nobreak command prevents interruptions if a key gets pressed)

      Then I started looking for the next part, combo key command CTRL and `
      From what I have read, batch script cannot send keys to external windows, and there are reports that Microsoft removed SendKeys from Windows PowerShell in Windows 10.

      Also, I didn't notice you had not said what those key commands were going to control - a program of some sort?

      I think your best bet would be to use something like AutoIt - https://www.autoitscript.com/site/autoit

      This can do what you require and more.