Announcement

Collapse

TGC Tour - Congratulations!

Congrats to @simmb (NET) and @simmb (GROSS) winning the TGC1 2020 CHRISTMAS TOUR - ProTee Tour Championship !

Join this weeks TGC1 2021 WINTER TOUR - Sony Open in Hawaii. Playing 2 rounds at Wailua Valley GC (ProTee Green Tees) - 6378y: https://golfsimulatorforum.com/forum...open-in-hawaii
See more
See less

OnTopRelica batch file for multiple screen segments

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • OnTopRelica batch file for multiple screen segments

    I am seeking a way to launch multiple ontopreplica instances through a batch file.

    I currently open ontopreplica and then position and define at least three windows everytime I open tgc2019 along with ignite (uneekor qed).

    OnTopReplica copies segments of a window and displays them wherever you choose, on top of another window or full screen game, and at different opacity.

    There is a need to capture several portions of a launch monitor window and overlay these snippets onto a specific location of tgc2019, repeatedly.

    These launch commands have to have the coordinates of the target launch window and the target screen position within tgc2019.
    Last edited by Will; 11-09-2020, 01:59 PM.
    Uneekor QED
    Epson L1300UNL / ELPLU03 Lens (8000 Lumen Laser 2160P, 0.69 Throw Ratio)
    Dell P4317Q (2160P) x2
    HP Omen 875-1022 (2080 TI / 9900k / 16GB)
    The Golf Club 2019
    Par2Pro Stealth Screens

  • #2
    I am trying to download and install OnTopReplica from GitHub. As a computer novice, I can't find the .exe file or other instructions. Can anyone provide a location to find step by step instructions for downloading, installing and setting up/using OTR?

    Thanks!

    Comment


    • #3
      Originally posted by Noob20 View Post
      I am trying to download and install OnTopReplica from GitHub. As a computer novice, I can't find the .exe file or other instructions. Can anyone provide a location to find step by step instructions for downloading, installing and setting up/using OTR?

      Thanks!
      I was going to install OTR today anyway. I have a monitor plus projector. I run Uneekor view on the monitor and TGC on the projector. Here's what I did:
      1) Download the OTR zip from https://github.com/LorenzCK/OnTopReplica/releases
      2) open the zip and double click the msi file
      3) once installed, find it in the windows menu and start it.
      4) a white window appears with text something like "right click here to start", right click it and select the program you want to view in the window. In my case "View"
      5) The whole program window is now replicated in the OTR window. Right click OTR again and select the "region" option, left click and drag to select the portion of the window you want replicated. For me this was the club replay
      6) left click on OTR and drag it to the position you want on the screen. Drag a corner to resize it to your liking.
      Click image for larger version  Name:	ontop.png Views:	0 Size:	424.5 KB ID:	299978
      Apologies to OP for hijacking this thread.
      Last edited by gojoholo; 11-28-2020, 05:46 PM.
      My Courses:
      North Hants UK(Lidar RCR)
      Remedy Oak (L)
      Bramshot 2020

      Comment


      • Noob20
        Noob20 commented
        Editing a comment
        Yes, apologies for hijacking. I can't seem to run the msi I guess. I have Windows 10, new computer. I'll PM you, if you don't mind.

      • Will
        Will commented
        Editing a comment
        Any comments about OnTopReplica are appreciated. This program really makes an informative presentation on the impact screen.

    • #4
      Batch file or macro would be awesome. I only do club head replay, which isn't bad if you save the size and position.

      Comment


      • Will
        Will commented
        Editing a comment
        I also placed the uneekor red "No Ball"/ green "Ready" text over the word "Ready" on the tgc2019 "Ready to Swing".

        The uneekor ignite's five bottom data tiles are nice to have just above the club cam.

        I'd like to make all of this in a batch because those tiles have data that can be rearranged. Therefore, I always really just want the 5 main data points that I am currently interested. I turn off the thc2019 club/ball info screen now that I have the club path and the 5 data points.

    • #5
      I've had a play with the command line and found that starting OTR from the shell with the --help option gives some useful info:

      --windowId=HWND Window handle (HWND) to be cloned.
      --windowTitle=TITLE Partial TITLE of the window to be cloned.
      --windowClass=CLASS CLASS of the window to be cloned.
      -v, --visible If set, only clones windows that are visible.
      --size=WIDTH,HEIGHT Target WIDTH,HEIGHT of the cloned thumbnail, or
      --width=VALUE Target WIDTH of cloned thumbnail, or
      --height=VALUE Target HEIGHT of cloned thumbnail.
      --position=X,Y Target X,Y of the OnTopReplica window.
      --screenPosition=TR|TL|C|BR|BL
      Resolution independent window position on
      current screen, with locking. Values:
      TR|TL|C|BR|BL.
      -r, --region=X,Y,W,H Region X,Y,W,H of the cloned window.
      -p, --padding=LEFT,TOP,RIGHT,BOTTOM
      Region padding LEFT,TOP,RIGHT,BOTTOM of the
      clone.
      -o, --opacity=0-255 Opacity of the window: 0-255.
      --clickForwarding Enables click forwarding.
      --clickThrough Enables click through.
      --chromeOff Disables the window's chrome (border).
      --fs, --fullscreen Starts up in fullscreen mode.
      -h, --help, -? Show command line help.


      So after a bit of experimentation I created this .bat file:

      cd "C:\Program Files (x86)\OnTopReplica\OnTopReplica"
      start OnTopReplica.exe --windowTitle=VIEW --region=1300,65,600,700 --width 200 --position=1700,800
      start OnTopReplica.exe --windowTitle=VIEW --region=525,875,1200,135 --width 600 --position=1300,0


      Save this somewhere as a .bat file e.g. "OTRx2.bat". Place a shortcut to the batch file on your desktop and double click it after you have started View and selected the "Club" tab. For IGNITE change the windowTitle parameter to the name of the Ignite window (presumably "IGNITE"). You will probably have to experiment with the coordinates and window sizes. I have VIEW running windowed, full screen, on a 1920 by 1080 monitor. The first OTR window (line 2 of the batch file) focuses on the clubhead replay&photo area of View, the second one shows the stats running across the bottom of the window (ball speed etc). The only thing I haven't worked out is how to place the OTR windows on the 2nd screen (the projector, where TGC is running). They always appear on the primary monitor (where View is running). So I have to manually place them on the TGC window.
      Last edited by gojoholo; 11-29-2020, 01:30 PM.
      My Courses:
      North Hants UK(Lidar RCR)
      Remedy Oak (L)
      Bramshot 2020

      Comment


      • Will
        Will commented
        Editing a comment
        @gojoholo

        That's the type of example I need to get started. I'll post my results when it's complete.

        Thank you.

      • Will
        Will commented
        Editing a comment
        cd "C:\Program Files (x86)\OnTopReplica\OnTopReplica"
        start OnTopReplica.exe --windowTitle=VIEW --region=1300,65,600,700 --width=200 --position=3620,800
        start OnTopReplica.exe --windowTitle=VIEW --region=525,875,1200,135 --width=600 --position=3220,0

        I added 1920 to your horizontal position. Does this get your OTR to the correct position? Also, I had to use "-size" instead of "-width" for the windows to scale correctly on mine. You were missing an equal sign and I left your width value.
        Last edited by Will; 11-30-2020, 12:06 AM.

    • #6



      cd "C:\Program Files (x86)\OnTopReplica\OnTopReplica"
      start OnTopReplica.exe --windowTitle=QED_Ignite --region=144,26,130,58 --size=132,58 --position=1758,259 --opacity=255 --chromeOff
      start OnTopReplica.exe --windowTitle=QED_Ignite --region=1160,1120,1360,290 --size=750,160 --position=3000,1341 --opacity=192 --chromeOff
      start OnTopReplica.exe --windowTitle=QED_Ignite --region=24,234,750,230 --size=750,230 --position=3000,1500 --opacity=192 --chromeOff


      This text for the bat file is only for TGC2019 at 2160P on the left primary monitor, and Ignite set to 2560x1440 in windowed mode(display right). The "region" is the target position within the Ignite software. The size, position, and opacity is all related to where and how it is displayed over TGC. So, if you are running TGC2019 at 2160p, these values should be good. If you are running Ignite at a different resolution, then you will have to redefine the region entries.

      These entries, in order, place the "READY" or "NOBALL" in the upper center of TGC. It finally made that "Ready for swing" area useful.
      Position and scale, 5 tiles of info to the lower right of TGC, opacity is at around 75% so you can see menu items.
      Postion and scale the swing path cam, just below the tiles, opacity 75% (192/255).

      Thanks again to @gojoholo for a great example!

      Here are the results that now launch automatically with TGC2019. (I just tapped a putt as an example.) Now I don't have to create, resize, and move these windows everytime.



      Click image for larger version  Name:	OnTopReplica_Ready.jpg Views:	0 Size:	205.2 KB ID:	300126 Click image for larger version  Name:	OnTopReplica_NoBall.jpg Views:	0 Size:	204.4 KB ID:	300127
      Last edited by Will; 11-30-2020, 12:19 AM.
      Uneekor QED
      Epson L1300UNL / ELPLU03 Lens (8000 Lumen Laser 2160P, 0.69 Throw Ratio)
      Dell P4317Q (2160P) x2
      HP Omen 875-1022 (2080 TI / 9900k / 16GB)
      The Golf Club 2019
      Par2Pro Stealth Screens

      Comment


      • Will
        Will commented
        Editing a comment
        ..................
        Last edited by Will; 11-29-2020, 05:45 PM. Reason: double post

      • Will
        Will commented
        Editing a comment
        I added the above text to my other batch file that launches TGC2019 and the TGC server service. Now, all launch together.


        start /min " " "c:\ProgramData\ProTee United\TGC Simulator\TGCSim_Data\Server\server.exe"
        Timeout /T 6
        start " " "C:\ProgramData\ProTee United\TGC Simulator\TGCSim.exe"

        cd "C:\Program Files (x86)\OnTopReplica\OnTopReplica"
        start OnTopReplica.exe --windowTitle=QED_Ignite --region=144,26,130,58 --size=132,58 --position=1758,259 --opacity=255 --chromeOff
        start OnTopReplica.exe --windowTitle=QED_Ignite --region=1160,1120,1360,290 --size=750,160 --position=3000,1341 --opacity=192 --chromeOff
        start OnTopReplica.exe --windowTitle=QED_Ignite --region=24,234,750,230 --size=750,230 --position=3000,1500 --opacity=192 --chromeOff

    • #7
      This post is for those people running both TGC2019 and QED_Ignite in a dual monitor setup, at both full screen 1080p.

      Here is the text for your batch file to open the same three windows that are displayed in my example above with OnTopReplica.

      cd "C:\Program Files (x86)\OnTopReplica\OnTopReplica"
      start OnTopReplica.exe --windowTitle=QED_Ignite --region=108,19,98,44 --size=66,29 --position=875,120 --opacity=255 --chromeOff
      start OnTopReplica.exe --windowTitle=QED_Ignite --region=870,840,1020,218 --size=375,80 --position=1500,658 --opacity=192 --chromeOff
      start OnTopReplica.exe --windowTitle=QED_Ignite --region=18,176,563,173 --size=375,115 --position=1500,740 --opacity=192 --chromeOff
      Uneekor QED
      Epson L1300UNL / ELPLU03 Lens (8000 Lumen Laser 2160P, 0.69 Throw Ratio)
      Dell P4317Q (2160P) x2
      HP Omen 875-1022 (2080 TI / 9900k / 16GB)
      The Golf Club 2019
      Par2Pro Stealth Screens

      Comment


      • Noob20
        Noob20 commented
        Editing a comment
        Hey Will I use OTR to watch TV while practicing. For the last month or so, OTR freezes when I go back to FS Golf or to TGC2019. You still hear the audio but the picture freezes. Do any of your adjustments fix that issue, or is this a use you do not experiment with?

      • Will
        Will commented
        Editing a comment
        @Noob20

        Currently, the only use I have for OTR is to display the three items from ignite software. It has video and has never locked up. Ignite is not minimized nor sharing the same monitor as a full screen app such as TGC2019. Either may be your issue.

        My second monitor has a roku stick plugged into it and simply plays under the monitor's own pip system. The default audio source for that monitor is also the roku. Ignite wouldn't even know the roku was present.

      • Will
        Will commented
        Editing a comment
        @Noob20

        https://github.com/LorenzCK/OnTopReplica/issues

        Use Microsoft edge and see if that works.

        Alternatively, there are some flags that may have to be changed in chrome.
        The following was copied from https://github.com/LorenzCK/OnTopReplica/issues/103

        go to chrome and type: chrome://flags/
        type --> occlusion <-- in the search box
        set "Calculate window occlusion on Windows" to "Disable"
        relaunch browser

    • #8
      Ty for doing this! Works great for me. I’d say I am a medium knowledge base and this was very easy to create and execute. I had to atweak the vertical value for the ball status OTR slightly, but very cool.

      Comment


      • #9
        Will is there any way to get this working if your primary monitor is to the right of the TGC monitor? Mine is a TV, so it makes sense to have the right monitor primary, but I can't figure out how to position the snippet to the left of my current screen. Negative values don't seem to work.

        Comment


        • SpookyCamzilla
          SpookyCamzilla commented
          Editing a comment
          Sorry, to be clear: I have a 4k TV on the left side of my 1080p PC Monitor. OTR launches on the monitor, which is the main display, but I run TGC on the TV right now. Adding horizontal moves the OTR to the right, off the screens. I need to move it to the left of the screen... But even using 0,0 places it at the top left of the PC monitor.

        • Will
          Will commented
          Editing a comment
          The "right monitor as Main Display" does not appear to be supported according to
          https://github.com/LorenzCK/OnTopReplica/issues .

          Negative values do not work and this free software has not been patched. You can move the TV to the right of the monitor within display properties or make it the main display.

        • SpookyCamzilla
          SpookyCamzilla commented
          Editing a comment
          Thanks Will!

      • #10
        I recently heard about OBS (open broadcaster software), would it work for this? I have no experience with it so I realize I might be way off base but I'm curious about taking pieces of Ignite and overlaying on GSP

        Comment

        Working...
        X