diff --git a/README.md b/README.md
index 47c79de..fe4aa70 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 [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.
+- 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.**
Also AHK isn't still supported by Linux :(
+
+## 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!
+
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
diff --git a/easyRP.ahk b/easyRP.ahk
new file mode 100644
index 0000000..24a297c
--- /dev/null
+++ b/easyRP.ahk
@@ -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/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.
diff --git a/show_exe (FAILSAFE).ahk b/show_exe (FAILSAFE).ahk
new file mode 100644
index 0000000..3c9d627
--- /dev/null
+++ b/show_exe (FAILSAFE).ahk
@@ -0,0 +1,21 @@
+;-------------------------------------------------------------**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 MANUALLY 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.
+
+;-------------------------------------------------------------------------------**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)**--------------------------------------------------------------