TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How i can put a delay in a open command?

    Scheduled Pinned Locked Moved General Discussion
    5 Posts 2 Posters 2.3k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      Lucas Marcelino
      last edited by

      Hello everyone.

      I've create a routine on my alexa to open a lot of stuffs on my pc. So for exemple, I'm trying to open my steam and my counterstrike, the problem is my csgo open so fast, and my faceit anti-cheat or gamesgclub don't have time to start.

      So I need to put a delay on my csgo command to get in the time to my anti cheat open and sync and be ready to open csgo, I think 5 - 10 seconds is good.

      My routine in alexa is:

      Open Gamersclub ("C:\Users\KRATUUZ\AppData\Local\Programs\gcac-launcher\Gamers Club AC Launcher.exe")
      Open Steam ("C:\Program Files (x86)\Steam\steam.exe")
      Close Wallpaper (taskkill /f /im wallpaper32.exe /t)
      Close TaskbarX (taskkill /f /im TaskbarX.exe /t)
      Open Discord (C:\Users\KRATUUZ\AppData\Local\Discord\Update.exe --processStart Discord.exe)
      Open CS:GO ("C:\Program Files (x86)\Steam\steam.exe" "steam://rungameid/730")

      RussR 1 Reply Last reply Reply Quote 0
      • RussR Offline
        Russ @Lucas Marcelino
        last edited by Russ

        @Lucas-Marcelino, you could put all of those commands in one batch file script called c:\scripts\games.bat like this:

        echo Running games script.
        "C:\Users\KRATUUZ\AppData\Local\Programs\gcac-launcher\Gamers Club AC Launcher.exe"
        "C:\Program Files (x86)\Steam\steam.exe"
        taskkill /f /im wallpaper32.exe /t
        taskkill /f /im TaskbarX.exe /t
        C:\Users\KRATUUZ\AppData\Local\Discord\Update.exe --processStart Discord.exe
        timeout 5
        "C:\Program Files (x86)\Steam\steam.exe" "steam://rungameid/730"
        echo Done.
        

        And make one command that runs it like this:
        71e68976-39d5-42b9-a8bc-51bd225ead72-image.png

        Russell VanderMey

        1 Reply Last reply Reply Quote 0
        • L Offline
          Lucas Marcelino
          last edited by

          Heyyyyy much thanks! I made some modifications on your code: (I need to put to run with admin powers)

          @echo off
          
          if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
          
          echo Running gamersclub script.
          "C:\Windows\System32\ctfmon"
          "C:\Users\KRATUUZ\AppData\Local\Programs\gcac-launcher\Gamers Club AC Launcher.exe"
          "C:\Program Files (x86)\Steam\steam.exe"
          taskkill /f /im wallpaper32.exe /t
          taskkill /f /im TaskbarX.exe /t
          "C:\Users\KRATUUZ\AppData\Local\Programs\Opera GX\launcher.exe" "https://www.gamersclub.com.br/lobby"
          timeout 15
          "C:\Program Files (x86)\Steam\steam.exe" "steam://rungameid/730"
          timeout 15
          "C:\Users\KRATUUZ\AppData\Local\Discord\app-1.0.9002\Discord.exe"
          timeout 15
          quit
          
          

          The new problem is my discord reporting something on my cmd, I put a timout in the end as well, but didn't resolve the problem

          9a2dc9c5-f25a-4976-a3a3-11fc66b7c7b8-image.png

          I hope you can help me once again XD.

          RussR 1 Reply Last reply Reply Quote 0
          • RussR Offline
            Russ @Lucas Marcelino
            last edited by Russ

            @Lucas-Marcelino, I saw the same thing when I tried running Discord.exe like you did.

            If you run discord like this you'll avoid that:

            "C:\Users\KRATUUZ\AppData\Local\Discord\Update.exe" --processStart Discord.exe
            

            Russell VanderMey

            1 Reply Last reply Reply Quote 0
            • L Offline
              Lucas Marcelino
              last edited by

              @Russ said in How i can put a delay in a open command?:

              "C:\Users\KRATUUZ\AppData\Local\Discord\Update.exe" --processStart Discord.exe

              Okay!!!
              I will try! Thanks so much!

              1 Reply Last reply Reply Quote 1

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post