Created
December 13, 2021 02:01
-
-
Save riicchhaarrd/c62c2d5ebab91548068cfdaadc5b600c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Change the number between the parentheses after APP_ID to the game you want to idle. | |
| Then run the program and when you're done idling press a key. | |
| */ | |
| //730 is the AppID for CSGO | |
| //480 for Spacewar | |
| #define APP_ID (730) | |
| //Imported functions from libraries that are needed. | |
| //Go to any installed steam game file directory and copy steam_api.dll from there into the same directory as this script. | |
| //steam_api.dll | |
| int SteamAPI_Init(); | |
| int SteamAPI_RestartAppIfNecessary(int id); | |
| /* These two libraries should ship with your installation of Windows. */ | |
| //kernel32.dll | |
| int SetEnvironmentVariableA(const char *name, const char *buffer); | |
| //msvcrt.dll | |
| int printf(const char *format, ...); | |
| int getchar(); | |
| void exit(int status); | |
| int sprintf(char *s, const char *format, ...); | |
| int main() | |
| { | |
| char szAppId[128]; | |
| sprintf(szAppId, "%d", APP_ID); | |
| SetEnvironmentVariableA("SteamGameId", szAppId); | |
| SetEnvironmentVariableA("SteamAppId", szAppId); | |
| SteamAPI_Init(); | |
| printf("Press any key to stop idling.\n"); | |
| getchar(); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment