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

    Opening in a particular Window size

    General Discussion
    3
    8
    33
    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.
    • JRSF HomeJ
      JRSF Home
      last edited by JRSF Home

      Hi, is there something I can add to a command to launch a shorcut, webpage or .exe that gets it to open in a set way, e.g.

      1. Size: Maximised, Fullscreen, Normal windowed, Minimised or a Window of a specific size?
      2. At a particular zoom %, etc?
      3. To click a button within that window?

      I've been scratching my head for ages over this, so any help would be much appreciated!

      RussR 1 Reply Last reply Reply Quote 0
      • RussR
        Russ @JRSF Home
        last edited by

        @JRSF-Home, I asked ChatGPT about #1 because I remembered it's possible to launch an app minimized or maximized with the start command:
        https://chatgpt.com/share/68fcce56-9d20-8004-9046-8a96869e1b9f

        I suggest looking at AutoHotKey or AutoIT to automate the clicks.

        Russell VanderMey

        XanderX 1 Reply Last reply Reply Quote 0
        • XanderX
          Xander @Russ
          last edited by

          @Russ Could you create a shortcut with that parameter and start the program by calling the shortcut?

          RussR 1 Reply Last reply Reply Quote 0
          • RussR
            Russ @Xander
            last edited by

            @Xander, I'm finding that only some executables, like notepad.exe support starting them maximized, minimized or normal. If make a shortcut (.lnk file) that targets one of those executables, you can specify it in shortcut settings.

            a2d4e89a-cd64-4c15-af70-988ffaabd8ab-image.png

            Russell VanderMey

            XanderX 1 Reply Last reply Reply Quote 0
            • XanderX
              Xander @Russ
              last edited by

              @Russ The request for #1 was "launch a shorcut, webpage or .exe" so creating a shortcut this way covers it, no? The shortcut I just created opens a maximized window in Chrome to this page.
              My only point being that it might not be necessary to reinvent the wheel. OP would still need to work out the zoom (but remember that browsers remember the zoom level of a given website so that pretty much covers the second step).

              254715c2-a5c8-44f1-8f39-5aeb0e3404a9-image.png

              RussR 1 Reply Last reply Reply Quote 0
              • RussR
                Russ @Xander
                last edited by Russ

                @Xander, I thought by "shortcut" he was talking about a Windows shortcut like I screenshotted above, not a TRIGGERcmd shortcut. I think he wants to create a TRIGGERcmd command that makes sure the app (maybe Chrome?) launches maximized, starts with a particular zoom % (Chrome can be zoomed).

                Assuming it's Chrome, I have my script launch it maximized, then effectively type CTRL 0, then CTRL + once or twice to adjust the zoom.

                Here's a list of parameters Chrome takes, but none of them are the zoom level, so you'd have to simulate key presses with nircmd or an AutoIT script or similar.
                https://peter.sh/experiments/chromium-command-line-switches/

                Russell VanderMey

                XanderX 1 Reply Last reply Reply Quote 0
                • XanderX
                  Xander @Russ
                  last edited by Xander

                  @Russ My screenshot is a .lnk shortcut as well - of Chrome opening with the URL of this discussion in a maximized window.

                  Zoom level is pretty moot because, unless wants to change a commonly viewed site, pretty much all browsers remember the zoom level of all sites visited. He can go to whateversite.com, set the zoom to 175%, and when the shortcut opens the site, it will be at 175%.
                  The clicking or scrolling is another, more complicated matter.

                  RussR 1 Reply Last reply Reply Quote 0
                  • RussR
                    Russ @Xander
                    last edited by Russ

                    @Xander, got it. Sorry I thought you were suggesting he use Chrome to launch a shortcut. I get your original meaning now.

                    Just so it's clear to OP, he could put start c:\path\to\shortcut.lnk in the Command field or include it in his script that TRIGGERcmd could run for him. Example:

                    start C:\Users\russe\Desktop\Claude.lnk
                    

                    Then if he pre-configured the Run field of that .lnk shortcut, he could make it open Maximized.

                    870d6398-667f-48d1-a855-aebe81f945c5-image.png

                    As for OP's 3rd request - to click a button within that window, I'd ask ChatGPT. Just asked it "how to click a button on a web page with a script." here:
                    https://chatgpt.com/share/68fe7888-36f8-8004-9c72-e7c6385f927b

                    Russell VanderMey

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post