Skip to content

Feature: Output encounter to text file for OBS display #3

Description

@agaertner

Make a setting (check box) and let the user choose a destination where text files should be stored for the open broadcaster software to pull values from for display on stream.

I recommend these values (taken from my own TemCounter:

encounter_total.txt
encounter_session.txt
luma_encounter.txt
<specific temtem>_encounter_total.txt
<specific temtem>_encounter_session.txt

Also allow for prefix or suffix text to be added for easier aligning in OBS.

You can do that with regex by removing all non-digits with regex ("\D+"). Then parse the rest into integer and save the updated value back with the prefix and suffix.

Example written in autohotkey:

file := FileOpen("out\" . fileName . ".txt", "rw") ; read/write - create new  if no existo
if (IsObject(file)) {
    content := file.Read()
    counter := RegExReplace(content, "\D")
    if (!counter)
        counter = 0
    newText := prefix . counter + incr . suffix
    file.Seek(0), file.Write(newText), file.length := StrLen(newText)
    file.Close()
}

If you want you can update your program's icon with the ones from my autohotkey script. It's not shared anywhere and not updated.

icon

*.ico format: https://ufile.io/obtb6908

uninstall icon (in registry):
temcounter

*.ico format: https://ufile.io/ccigeo5g

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions