Compare commits

...

3 Commits

Author SHA1 Message Date
Lamp ffdc00c55d repair readme 2022-10-02 00:35:29 -05:00
Lamp 3ace2de744 create readme 2022-10-01 22:33:08 -07:00
Lamp 1731519a80 fix thing preventing chatting 2022-10-01 21:15:26 -07:00
4 changed files with 21 additions and 3 deletions

View File

@ -72,11 +72,22 @@ namespace VrcAfkStatus {
Application.Run(new TrayApplicationContext());
}
private static bool active = false;
private static void OnTimerElapse(Object source, ElapsedEventArgs e) {
try {
string activeAppName = GetActiveAppName();
Console.WriteLine(activeAppName);
string chatMessage = activeAppName == "VRChat.exe" ? "" : "AFK: using " + activeAppName;
string chatMessage;
if (activeAppName == "VRChat.exe") {
if (active) {
chatMessage = "";
active = false;
} else return;
} else {
chatMessage = "AFK: using " + activeAppName;
active = true;
};
oscsender.Send(new OscMessage("/chatbox/input", chatMessage, true));
} catch (Exception exception) {
Console.WriteLine(exception);

View File

@ -33,6 +33,6 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.1")]
[assembly: AssemblyFileVersion("1.1")]
[assembly: NeutralResourcesLanguage("en-US")]

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 KiB

7
readme.md Normal file
View File

@ -0,0 +1,7 @@
If you like to hang out in VRChat in desktop mode while using other apps, you can use this super simple tray app to display your currently active application in the VRChat chatbox.
![image](doc/img/VRChat_1920x1080_2022-10-01_22-17-14.940.png)
You will need to have OSC enabled in VRChat. Download the latest build from the [releases](https://gitea.moe/lamp/VRChat-AFK-Status/releases) page and run the exe. A tray icon will let you know it's running and you can right-click it to stop it.
Every two seconds, it will get the active application and if it's not VRChat, it will send chatbox input to VRChat's default OSC port 9000. Once you're back on VRChat though, it'll clear the chatbox and then you can use it normally.