|
I think I see where you're going with this and the idea is pretty neat. I does take out the joy of getting right in to a game if you have to go through the uninstall of one game and then the install of the game you want to play, but that's neither here nor there.
Here's what I would do ... theoretically:
I would create an csv or ini database of all games that you want to work with this. The database would included the executable (or rather) autorun filename (and possible the volume name of the disc... since a lot of games use autorun.exe or setup.exe), the amount of drive space the game uses after installation, a path to the AHK installer script and AHK unistaller script, the executable name of the main exe to play the game, (seperately) the full path of the main exe (to check if game is installed already), and a spot for the number of playes.
My best thoughts here are that you may need 2 scripts running at all times for this to work.
The first would be used to check for the autorun process/volume ID of your games every second or two. This script will be your main script for detect which game you've inserted and what course of action to take by checking the drive space, comparing the database of times the games have been played and then telling your system to uninstall a game or to just install the new game, if needed and then launch the game.
The second script would be for detection of a game being played. It would detect to see the the main exe is actually running and if so will increment the play count in your database file.
This is how I would set it up. Commands you might be interested in would be PROCESS, DRIVEGET, DRIVESPACEFREE, LOOP (or GOTO), GOSUB, IF (of course), and probably others that I'm over looking
on a side note: I would probably make a twist on your idea of uninstalling the least played game by changing how you check for it. Instead of the number times it is played, I would instead for how long it was played. I would set up a timer to time how long the exe is in use and when it is no longer running, add that time to the total time in the database. I'm just thinking along the lines that I could play one game for a LONG period of time, but not actually open it much and then turn around and play a game a lot, for a short amount of time, but still spend more time in the first one.
Anyways, I know I didn't program one for you. I don't have the limitation of drive space when you have 3TB of it. I hope this all helps and good luck
|
|