From 6bc9001915a52c2022d6a9d0fb355ab01cf251b7 Mon Sep 17 00:00:00 2001 From: bBSempai Date: Wed, 18 Nov 2020 13:30:59 +0530 Subject: [PATCH 01/11] added ahk scripts --- easyRP.ahk | 48 +++++++++++++++++++++++++++++++++++++++++ show_exe (FAILSAFE).ahk | 8 +++++++ 2 files changed, 56 insertions(+) create mode 100644 easyRP.ahk create mode 100644 show_exe (FAILSAFE).ahk diff --git a/easyRP.ahk b/easyRP.ahk new file mode 100644 index 0000000..796c0ce --- /dev/null +++ b/easyRP.ahk @@ -0,0 +1,48 @@ +#NoTrayIcon +#Persistent +#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. +; #Warn ; Enable warnings to assist with detecting common errors. +SendMode Input ; Recommended for new scripts due to its superior speed and reliability. +SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. + +Time := A_NowUTC +EnvSub, Time, 19700101000000, Seconds + +Run, C:\Program Files\AutoHotkey\SciTE\SciTE.exe +WinWait, ahk_class SciTEWindow + + +if WinExist(ahk_class SciTEWindow) + { + FileDelete, C:\Discord-Rich Presence\RP-SciTE4 AHK\config.ini + + FileAppend, + ( + [Identifiers] + ClientID=764184934192513044 + + [State] + State=AHK File + Details=Editing a Script + StartTimestamp= %Time% + EndTimestamp= + + [Images] + LargeImage=scite4 + LargeImageTooltip=Updating AutoHotKey + SmallImage=ahk + SmallImageTooltip=AHK + ), C:\Discord-Rich Presence\RP-SciTE4 AHK\config.ini + + Run, C:\Discord-Rich Presence\RP-SciTE4 AHK\scite.exe, ,Hide + } + + +WinWaitClose, ahk_class SciTEWindow + +WinShow, ahk_class ConsoleWindowClass ahk_exe scite.exe +WinClose, ahk_class ConsoleWindowClass ahk_exe scite.exe + +WinWaitClose, ahk_class ConsoleWindowClass ahk_exe scite.exe + +ExitApp \ No newline at end of file diff --git a/show_exe (FAILSAFE).ahk b/show_exe (FAILSAFE).ahk new file mode 100644 index 0000000..c31dff0 --- /dev/null +++ b/show_exe (FAILSAFE).ahk @@ -0,0 +1,8 @@ +#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. +; #Warn ; Enable warnings to assist with detecting common errors. +SendMode Input ; Recommended for new scripts due to its superior speed and reliability. +SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. + +WinShow, ahk_class ConsoleWindowClass ahk_exe scite.exe +WinClose, ahk_class ConsoleWindowClass ahk_exe scite.exe +ExitApp \ No newline at end of file From f35d88b2d08624a6ee0bb37a0ce3ef95ff430c0a Mon Sep 17 00:00:00 2001 From: Bhavya Gosai Date: Wed, 18 Nov 2020 23:10:47 +0530 Subject: [PATCH 02/11] Update easyRP.ahk Groomed the code with instructions and comments made the code more User-friendly --- easyRP.ahk | 60 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/easyRP.ahk b/easyRP.ahk index 796c0ce..1462db7 100644 --- a/easyRP.ahk +++ b/easyRP.ahk @@ -1,48 +1,66 @@ -#NoTrayIcon -#Persistent +;-------------------------------------------------------------**SCRIPT WON'T WORK UNTIL YOU EDIT IT ACCORDING TO YOUR NEEDS!**---------------------------------------------------------- +;-------------------------------------------------------------------**PLEASE READ THE INSTRUCTIONS PROVIDED CAREFULLY**----------------------------------------------------------------- +;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +#NoTrayIcon ;Used for removing script icon in the Taskbar System tray. +#Persistent ;Used for persistent background running of script unless stated otherwise. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. +;-------------------------------------------------------------------------------**MAIN CODE STARTS HERE**-------------------------------------------------------------------------------- + Time := A_NowUTC -EnvSub, Time, 19700101000000, Seconds +EnvSub, Time, 19700101000000, Seconds ;Creates a variable named "Time" and stores the current time when the script was run. + +;Append or add/change path directory of whatever app you want to show the RP of below. Example, for Photoshop the code line below would be something like this: Run, C:\Program Files\Adobe\Adobe Photoshop 2021\Photoshop.exe +Run, ;Runs the specified application in the path directory. -Run, C:\Program Files\AutoHotkey\SciTE\SciTE.exe -WinWait, ahk_class SciTEWindow +;Give the .exe file name of the app you just put the directory of above. Example, for Photoshop the code line below would be something like this: WinWait, ahk_exe Photoshop.exe +;The Process name is basically the name of the .exe file that you run. You can always run the app and check it out in the 'Details' Tab in the 'Task Manager' window if you want. +WinWait, ahk_exe <.exe file name> ;Script waits until the specified process starts running. -if WinExist(ahk_class SciTEWindow) +;Provide the same .exe name in the brackets. +if WinExist(ahk_exe <.exe file name>) ;Checks if the specified window exists. { - FileDelete, C:\Discord-Rich Presence\RP-SciTE4 AHK\config.ini + FileDelete, ;Specify the path of your .ini file here. FileAppend, ( [Identifiers] - ClientID=764184934192513044 + ClientID= [State] - State=AHK File - Details=Editing a Script + State= + Details= StartTimestamp= %Time% EndTimestamp= [Images] - LargeImage=scite4 - LargeImageTooltip=Updating AutoHotKey - SmallImage=ahk - SmallImageTooltip=AHK - ), C:\Discord-Rich Presence\RP-SciTE4 AHK\config.ini + LargeImage= + LargeImageTooltip= + SmallImage= + SmallImageTooltip= + ), ;Specify the path of your .ini file here. - Run, C:\Discord-Rich Presence\RP-SciTE4 AHK\scite.exe, ,Hide + Run, , ,Hide ;Runs the easyrp.exe file in a hidden mode. } -WinWaitClose, ahk_class SciTEWindow +WinWaitClose, ahk_exe <.exe file name> ;Script waits until your main Application closes. -WinShow, ahk_class ConsoleWindowClass ahk_exe scite.exe -WinClose, ahk_class ConsoleWindowClass ahk_exe scite.exe +WinShow, ahk_exe easyrp.exe ;Specify the .exe filename of your easyrp.exe(which is the default filename)-Activates the hidden easyrp.exe file which was running in hidden mode. +WinClose, ahk_exe easyrp.exe ;Specify the .exe filename of your easyrp.exe(which is the default filename)-Closes the easyrp.exe file as it is no longer needed to show the RP on discord. -WinWaitClose, ahk_class ConsoleWindowClass ahk_exe scite.exe +WinWaitClose, ahk_exe scite.exe ;Specify the .exe filename of your easyrp.exe(which is the default filename)-Script waits till the easyrp.exe file has closed. -ExitApp \ No newline at end of file +ExitApp ;Terinates the Script. + +;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + +;---------------------------------------------------------------**THE CODE WONT WORK WITHOUT INSTALLING AUTOHOTKEY (AHK)**-------------------------------------------------------------- From e61ddc349c578ed6cad79640edf3bd89142f30f9 Mon Sep 17 00:00:00 2001 From: Bhavya Gosai Date: Wed, 18 Nov 2020 23:13:37 +0530 Subject: [PATCH 03/11] Update easyRP.ahk minor fix --- easyRP.ahk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easyRP.ahk b/easyRP.ahk index 1462db7..69255a5 100644 --- a/easyRP.ahk +++ b/easyRP.ahk @@ -55,7 +55,7 @@ WinWaitClose, ahk_exe <.exe file name> ;Script waits until your main Application WinShow, ahk_exe easyrp.exe ;Specify the .exe filename of your easyrp.exe(which is the default filename)-Activates the hidden easyrp.exe file which was running in hidden mode. WinClose, ahk_exe easyrp.exe ;Specify the .exe filename of your easyrp.exe(which is the default filename)-Closes the easyrp.exe file as it is no longer needed to show the RP on discord. -WinWaitClose, ahk_exe scite.exe ;Specify the .exe filename of your easyrp.exe(which is the default filename)-Script waits till the easyrp.exe file has closed. +WinWaitClose, ahk_exe easyrp.exe ;Specify the .exe filename of your easyrp.exe(which is the default filename)-Script waits till the easyrp.exe file has closed. ExitApp ;Terinates the Script. From a0f8f09d3579873aa47474c772f253dffbabdf6c Mon Sep 17 00:00:00 2001 From: Bhavya Gosai Date: Wed, 18 Nov 2020 23:14:23 +0530 Subject: [PATCH 04/11] Update easyRP.ahk minor typo fix --- easyRP.ahk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easyRP.ahk b/easyRP.ahk index 69255a5..e1b1e8b 100644 --- a/easyRP.ahk +++ b/easyRP.ahk @@ -57,7 +57,7 @@ WinClose, ahk_exe easyrp.exe ;Specify the .exe filename of your easyrp.exe(whic WinWaitClose, ahk_exe easyrp.exe ;Specify the .exe filename of your easyrp.exe(which is the default filename)-Script waits till the easyrp.exe file has closed. -ExitApp ;Terinates the Script. +ExitApp ;Terminates the Script. ;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- From c6032d3b313a7b9e8dccc6dcda39f7eb967c1acc Mon Sep 17 00:00:00 2001 From: Bhavya Gosai Date: Wed, 18 Nov 2020 23:26:42 +0530 Subject: [PATCH 05/11] Update show_exe (FAILSAFE).ahk Groomed the code by adding instructions and comments made the code more user-friendly --- show_exe (FAILSAFE).ahk | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/show_exe (FAILSAFE).ahk b/show_exe (FAILSAFE).ahk index c31dff0..587191e 100644 --- a/show_exe (FAILSAFE).ahk +++ b/show_exe (FAILSAFE).ahk @@ -1,8 +1,21 @@ -#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. +;-------------------------------------------------------------**SCRIPT WON'T WORK UNTIL YOU EDIT IT ACCORDING TO YOUR NEEDS!**---------------------------------------------------------- +;Basically what this script does is that if you get your RP or scripts messed up and wanna close the easyrp.exe file running in hidden mode, the script unhides it for you so that you can close it or whatever. +;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. -WinShow, ahk_class ConsoleWindowClass ahk_exe scite.exe -WinClose, ahk_class ConsoleWindowClass ahk_exe scite.exe -ExitApp \ No newline at end of file +;-------------------------------------------------------------------------------**MAIN CODE STARTS HERE**-------------------------------------------------------------------------------- + +WinShow, ahk_exe easyrp.exe ;Specify the .exe filename of your easyrp.exe(which is the default filename)-Activates the hidden easyrp.exe file which was running in hidden mode. + +ExitApp ;Terminates the Script. + +;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + +;---------------------------------------------------------------**THE CODE WONT WORK WITHOUT INSTALLING AUTOHOTKEY (AHK)**-------------------------------------------------------------- From c16b13d9be0977c505475c948ffe91ac2e032e21 Mon Sep 17 00:00:00 2001 From: Bhavya Gosai Date: Wed, 18 Nov 2020 23:27:20 +0530 Subject: [PATCH 06/11] Update show_exe (FAILSAFE).ahk minor fix --- show_exe (FAILSAFE).ahk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/show_exe (FAILSAFE).ahk b/show_exe (FAILSAFE).ahk index 587191e..3c9d627 100644 --- a/show_exe (FAILSAFE).ahk +++ b/show_exe (FAILSAFE).ahk @@ -1,5 +1,5 @@ ;-------------------------------------------------------------**SCRIPT WON'T WORK UNTIL YOU EDIT IT ACCORDING TO YOUR NEEDS!**---------------------------------------------------------- -;Basically what this script does is that if you get your RP or scripts messed up and wanna close the easyrp.exe file running in hidden mode, the script unhides it for you so that you can close it or whatever. +;Basically what this script does is that if you get your RP or scripts messed up and wanna MANUALLY close the easyrp.exe file running in hidden mode, the script unhides it for you so that you can close it or whatever. ;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- From d277e1d61a91f7d0d888ec0d1d93234a8972d9d0 Mon Sep 17 00:00:00 2001 From: Bhavya Gosai Date: Thu, 19 Nov 2020 02:39:39 +0530 Subject: [PATCH 07/11] Update README.md Added Automation instructions Added PNGs other minor changes --- README.md | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 47c79de..de7ccad 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ EasyRP is a small program to use the discord-rpc, to make a custom rich presence/game on discord. using just an easy config file. -**Usage** +## Usage - First you need to register a Rich Presence application with discord - Go here https://discordapp.com/developers/applications/me - Make a new application **The name of the app will be the main name for the rich presence** @@ -25,7 +25,34 @@ For elapsed time set only the StartTimestamp. For remaining time set both. Though discord seems to only care about hours/minutes/seconds. As it doesnt go above 24hrs either way ¯\\\_(ツ)\_/¯ -**Building** +## Automation (Provided by [bBSempai](https://github.com/bBSempai)) + +- Upon running an AHK script you can automate your tasks. In order to do this follow the steps above but you don't need to edit the config file yet. +- Install [AHK](https://www.autohotkey.com/) (Takes up <15 Mb worth of space). Your .ahk scripts would not work without installing this. +- After downloading the [EasyRP release](https://github.com/Pizzabelly/EasyRP/releases) with the AHK scripts **configure the .ahk scripts according to the guidelines provided in each one of them. Please make sure you edit the scripts properly.**

+- Basically the main script [easyRP.ahk](https://github.com/Pizzabelly/EasyRP/blob/master/easyRP.ahk) does something like this: + - Upon running the script it first opens up the application for you of which you want to show the RP of. + - Next it rewrites the config.ini file with the information provided by you in the script about the app. **This task is necessary because upon doing this easyRP will automatically display the Timestamp to your RP on discord and it will reset everytime you re-run the script. Something which previously had to be done manually through the Epoch timestamp thingy.** + - After setting up the config.ini it runs the easyrp.exe file in hidden mode which ultimately is responsible for your app RP display on discord. + - Finally the script waits till you close your app. As soon as you do that the script closes the easyrp.exe file which was running in hidden mode and terminates the script. + - The script itself runs in a hidden mode so you don't have to worry about anything now!

Just make different scripts for different apps and then run THOSE SCRIPTS INSTEAD OF INDIVIDUALLY RUNNING YOUR APPS, CONFIGURING THE ini FILE, RUNNING THE easyrp.exe AND THEN CLOSING IT MANUALLY AFTER YOU CLOSE YOUR APP. That ONE Script will do all of that for you!

+- The [Failsafe.ahk](https://github.com/Pizzabelly/EasyRP/blob/master/show_exe%20(FAILSAFE).ahk) is provided to you as a precaution. If for some reason you want to close the exe file running in the hidden mode, you won't be able to normally cuz DUH, its hidden lol. So you could go Task Manager and End Task it. Instead you can also simply run this script and it will unhide that exe file for you. **The script can preferably also be used to check if any IDLE EXEs are running around, it that ever happpnes.** + +

+ + + +

+ +Now, running the AHK script instead of your App can be confusing and cumbersome. What you can do is change the ICONS of the individual scripts to those of your apps so that it would look like you are actually running that app itself. +

+ +
Something like this +

+ +**Note: You can always manually control the easyrp.exe and the .ahk files from the Task Manager window if any issues occur.** + +## Building To build EasyRP from source you need the following - any c++ compiler (cl, g++, clang++, etc) - Meson @@ -49,3 +76,10 @@ To build EasyRP (in the root of the repo) - ``` ninja -C build ``` Now the EasyRP executable will be under the build directory! +

+ +

Feel free to contact us regarding anything you need help with!

+ +

+ Feel free to open an issue and communicate!
+

From 4f18a5b05098a27fb57853640d990525c8ca59f1 Mon Sep 17 00:00:00 2001 From: bBSempai Date: Thu, 19 Nov 2020 03:00:02 +0530 Subject: [PATCH 08/11] updated readme.txt --- easyRP.ahk | 16 ++++++------ easyRP.ahk.bak | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++ readme.txt | 44 +++++++++++++++++++++++---------- 3 files changed, 105 insertions(+), 21 deletions(-) create mode 100644 easyRP.ahk.bak diff --git a/easyRP.ahk b/easyRP.ahk index e1b1e8b..24a297c 100644 --- a/easyRP.ahk +++ b/easyRP.ahk @@ -1,7 +1,7 @@ -;-------------------------------------------------------------**SCRIPT WON'T WORK UNTIL YOU EDIT IT ACCORDING TO YOUR NEEDS!**---------------------------------------------------------- -;-------------------------------------------------------------------**PLEASE READ THE INSTRUCTIONS PROVIDED CAREFULLY**----------------------------------------------------------------- -;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +;-------------------------------------------------------------**SCRIPT WON'T WORK UNTIL YOU EDIT IT ACCORDING TO YOUR NEEDS!**------------------------------------------------ +;-------------------------------------------------------------------**PLEASE READ THE INSTRUCTIONS PROVIDED CAREFULLY**------------------------------------------------------- +;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #NoTrayIcon ;Used for removing script icon in the Taskbar System tray. #Persistent ;Used for persistent background running of script unless stated otherwise. @@ -10,7 +10,7 @@ SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. -;-------------------------------------------------------------------------------**MAIN CODE STARTS HERE**-------------------------------------------------------------------------------- +;-------------------------------------------------------------------------------**MAIN CODE STARTS HERE**--------------------------------------------------------------------- Time := A_NowUTC EnvSub, Time, 19700101000000, Seconds ;Creates a variable named "Time" and stores the current time when the script was run. @@ -59,8 +59,8 @@ WinWaitClose, ahk_exe easyrp.exe ;Specify the .exe filename of your easyrp.exe( ExitApp ;Terminates the Script. -;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -;--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -;---------------------------------------------------------------**THE CODE WONT WORK WITHOUT INSTALLING AUTOHOTKEY (AHK)**-------------------------------------------------------------- +;---------------------------------------------------------------**THE CODE WONT WORK WITHOUT INSTALLING AUTOHOTKEY (AHK)**---------------------------------------------------- diff --git a/easyRP.ahk.bak b/easyRP.ahk.bak new file mode 100644 index 0000000..24a297c --- /dev/null +++ b/easyRP.ahk.bak @@ -0,0 +1,66 @@ +;-------------------------------------------------------------**SCRIPT WON'T WORK UNTIL YOU EDIT IT ACCORDING TO YOUR NEEDS!**------------------------------------------------ +;-------------------------------------------------------------------**PLEASE READ THE INSTRUCTIONS PROVIDED CAREFULLY**------------------------------------------------------- +;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + +#NoTrayIcon ;Used for removing script icon in the Taskbar System tray. +#Persistent ;Used for persistent background running of script unless stated otherwise. +#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. +; #Warn ; Enable warnings to assist with detecting common errors. +SendMode Input ; Recommended for new scripts due to its superior speed and reliability. +SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. + +;-------------------------------------------------------------------------------**MAIN CODE STARTS HERE**--------------------------------------------------------------------- + +Time := A_NowUTC +EnvSub, Time, 19700101000000, Seconds ;Creates a variable named "Time" and stores the current time when the script was run. + +;Append or add/change path directory of whatever app you want to show the RP of below. Example, for Photoshop the code line below would be something like this: Run, C:\Program Files\Adobe\Adobe Photoshop 2021\Photoshop.exe +Run, ;Runs the specified application in the path directory. + +;Give the .exe file name of the app you just put the directory of above. Example, for Photoshop the code line below would be something like this: WinWait, ahk_exe Photoshop.exe +;The Process name is basically the name of the .exe file that you run. You can always run the app and check it out in the 'Details' Tab in the 'Task Manager' window if you want. +WinWait, ahk_exe <.exe file name> ;Script waits until the specified process starts running. + + +;Provide the same .exe name in the brackets. +if WinExist(ahk_exe <.exe file name>) ;Checks if the specified window exists. + { + FileDelete, ;Specify the path of your .ini file here. + + FileAppend, + ( + [Identifiers] + ClientID= + + [State] + State= + Details= + StartTimestamp= %Time% + EndTimestamp= + + [Images] + LargeImage= + LargeImageTooltip= + SmallImage= + SmallImageTooltip= + ), ;Specify the path of your .ini file here. + + Run, , ,Hide ;Runs the easyrp.exe file in a hidden mode. + } + + +WinWaitClose, ahk_exe <.exe file name> ;Script waits until your main Application closes. + +WinShow, ahk_exe easyrp.exe ;Specify the .exe filename of your easyrp.exe(which is the default filename)-Activates the hidden easyrp.exe file which was running in hidden mode. +WinClose, ahk_exe easyrp.exe ;Specify the .exe filename of your easyrp.exe(which is the default filename)-Closes the easyrp.exe file as it is no longer needed to show the RP on discord. + +WinWaitClose, ahk_exe easyrp.exe ;Specify the .exe filename of your easyrp.exe(which is the default filename)-Script waits till the easyrp.exe file has closed. + +ExitApp ;Terminates the Script. + +;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + +;---------------------------------------------------------------**THE CODE WONT WORK WITHOUT INSTALLING AUTOHOTKEY (AHK)**---------------------------------------------------- diff --git a/readme.txt b/readme.txt index 79b0a4f..4fffe99 100644 --- a/readme.txt +++ b/readme.txt @@ -1,13 +1,31 @@ -EasyRP (Custom Discord Rich Presence) https://github.com/Pizzabelly/EasyRP -1. First you need to register a Rich Presence application with discord - - Go here https://discordapp.com/developers/applications/me - - Make a new application **The name of the app will be the main name for the rich presence** - - Enable rich presence for your app and add some assets -2 Download the latest release of EasyRP from here https://github.com/Pizzabelly/EasyRP/releases -3 Edit the config file with the information from your newly registered app -4 Run easyrp (it should open a cmd window) - - It *should* report errors from your config file (if there are any) -5 Discord should show the game on your profile - - if not, add the exe as a game on discord and the file path should change to your presence - -You can edit the config any time while the program is running to change the presence (make sure to save the file) +-------------------------------------------EasyRP (Custom Discord Rich Presence)https://github.com/Pizzabelly/EasyRP---------------------------------------- +1. First you need to register a Rich Presence application with discord + - Go here https://discordapp.com/developers/applications/me + - Make a new application **The name of the app will be the main name for the rich presence** + - Enable rich presence for your app and add some assets +2 Download the latest release of EasyRP from here https://github.com/Pizzabelly/EasyRP/releases +3 Edit the config file with the information from your newly registered app +4 Run easyrp (it should open a cmd window) + - It *should* report errors from your config file (if there are any) +5 Discord should show the game on your profile + - if not, add the exe as a game on discord and the file path should change to your presence + +You can edit the config any time while the program is running to change the presence (make sure to save the file) + + + +------------------------------------------------------Automation (Provided by bBSempai)https://github.com/bBSempai------------------------------------------------ +1.Upon running an AHK script you can automate your tasks. In order to do this follow the steps above but you don't need to edit the config file yet. +2.Install AHK (Takes up <15 Mb worth of space). Your .ahk scripts would not work without installing this. +3.After downloading the EasyRP release with the AHK scripts configure the .ahk scripts according to the guidelines provided in each one of them. Please make sure you edit the scripts properly. + +=>Basically the main script easyRP.ahk does something like this: +1)Upon running the script it first opens up the application for you of which you want to show the RP of. +2)Next it rewrites the config.ini file with the information provided by you in the script about the app. This task is necessary because upon doing this easyRP will automatically display the Timestamp to your RP on discord and it will reset everytime you re-run the script. Something which previously had to be done manually through the Epoch timestamp thingy. +3)After setting up the config.ini it runs the easyrp.exe file in hidden mode which ultimately is responsible for your app RP display on discord. +4)Finally the script waits till you close your app. As soon as you do that the script closes the easyrp.exe file which was running in hidden mode and terminates the script. +The script itself runs in a hidden mode so you don't have to worry about anything now! + +Just make different scripts for different apps and then run THOSE SCRIPTS INSTEAD OF INDIVIDUALLY RUNNING YOUR APPS, CONFIGURING THE ini FILE, RUNNING THE easyrp.exe AND THEN CLOSING IT MANUALLY AFTER YOU CLOSE YOUR APP. That ONE Script will do all of that for you! + +The Failsafe.ahk is provided to you as a precaution. If for some reason you want to close the exe file running in the hidden mode, you won't be able to normally cuz DUH, its hidden lol. So you could go Task Manager and End Task it. Instead you can also simply run this script and it will unhide that exe file for you. The script can preferably also be used to check if any IDLE EXEs are running around, it that ever happpnes. From 772361ad53977100a9f5887be0ca14e47ffa7760 Mon Sep 17 00:00:00 2001 From: Bhavya Gosai Date: Thu, 19 Nov 2020 03:24:15 +0530 Subject: [PATCH 09/11] Update README.md minor updates --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index de7ccad..153e40c 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Now, running the AHK script instead of your App can be confusing and cumbersome.
Something like this

-**Note: You can always manually control the easyrp.exe and the .ahk files from the Task Manager window if any issues occur.** +**Note: You can always manually control the easyrp.exe and the .ahk files from the Task Manager window if any issues occur.**

Also AHK isn't still supported by Linux :(

## Building To build EasyRP from source you need the following From 37e8866846f5e3879d7f1648c2829443e683f0cf Mon Sep 17 00:00:00 2001 From: Bhavya Gosai Date: Thu, 1 Apr 2021 02:40:00 +0530 Subject: [PATCH 10/11] Added further comments to config.ini --- config.ini | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config.ini b/config.ini index 582b53a..b69273a 100644 --- a/config.ini +++ b/config.ini @@ -21,13 +21,13 @@ ClientID=123456789012345678 [State] -State= -Details= -StartTimestamp= -EndTimestamp= +State= ;Provide the text to display above the Timestamp. (Secondary to DETAILS). Input text spaces allowed +Details= ;Provide the text to display above the STATE. (Primary to STATE). Input text spaces allowed +StartTimestamp= ;provide *Unix time* to display the time since app started. UNIX TIME +EndTimestamp= ;provide *Unix time* to display the end time. (optional). UNIX TIME [Images] -LargeImage= -LargeImageTooltip= -SmallImage= -SmallImageTooltip= +LargeImage= ;Main image. Just input the name of the image you had on your discord dev portal (without extension) +LargeImageTooltip= ;display text on hovering the large image (optional). Input text spaces allowed +SmallImage= ;displays the corner image (optional). Same as LargeImage attributes +SmallImageTooltip= ;display text on hovering the small image (optional). Input text spaces allowed From 68dcafa8ad95e8614b459aa25700b818fa75d381 Mon Sep 17 00:00:00 2001 From: Bhavya Gosai Date: Sun, 24 Apr 2022 18:49:42 +0530 Subject: [PATCH 11/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 153e40c..fe4aa70 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ For elapsed time set only the StartTimestamp. For remaining time set both. Though discord seems to only care about hours/minutes/seconds. As it doesnt go above 24hrs either way ¯\\\_(ツ)\_/¯ -## Automation (Provided by [bBSempai](https://github.com/bBSempai)) +## Automation (Provided by [bhavyagosai](https://github.com/bhavyagosai)) - Upon running an AHK script you can automate your tasks. In order to do this follow the steps above but you don't need to edit the config file yet. - Install [AHK](https://www.autohotkey.com/) (Takes up <15 Mb worth of space). Your .ahk scripts would not work without installing this.