PictureLoKiT v1.0 Guide - Customise events
PictureLoKiT includes a hidden feature that lets you add your own commands. It monitors three events: Start, End, and the all-important Session completion.…
PictureLoKiT includes a hidden feature that lets you add your own commands. It monitors three events: Start, End, and the all-important Session completion. Whenever the program hits one of these milestones, it looks in the Piclokit folder for a file. If found, it runs the commands inside; if not, business continues as usual. This setup allows users to integrate other software during play or trigger extra functions.
The Piclokit folder sits within user data, which Windows considers safe for storing information. For instance, on an English XP machine, you’ll find it at “c:\Documents and settings\Lokit\piclokit”. Naturally, this path shifts if you’re using a regional version of Windows or specifying the User=path command. To keep things simple in these examples, I just call it the Piclokit folder 8)
Adding an event command is straightforward: open Notepad and save a file with a specific name into the Piclokit folder. You have three filenames to choose from for different events (though you can set up all three if you like). They are “start.bat”, “end.bat” and “prize.bat”
Let’s say you want Solitaire to pop up when PictureLoKiT starts. Open Notepad, type “Sol.exe” on the first line, and save it in the Piclokit folder as “start.bat”. When the program launches, it checks for “start.bat”, finds it there, and executes every command listed. In this case, Solitaire kicks off.
Here are two simple rules to make sure your commands run smoothly..
- Use the full path name for files (e.g., “c:\windows\system\sol.exe”) unless the program is already in your system path.
- Wrap commands in quotes if they include spaces (e.g., “c:\Documents and settings\LoKiT\Whipping machine.exe”:D)
Here’s another easy example: I want to start up Solitaire (since nearly all Windows machines have it) once the Session time is done. The script for this completion event is “prize.bat”, so I open Notepad, add a line… Code: Select all
C:\WINDOWS\system32\sol.exe
…and save. Run a one-minute PictureLoKiT test before the Release picture appears and you’ll see Solitaire.
You can also use three embedded commands within your bat file: “hide”, “show” and “quit”. So if I tweak my “prize.bat”… Code: Select all
hide
C:\WINDOWS\system32\sol.exe
show
When the session finishes, PictureLoKiT will hide (disappear), run Solitaire, and then reappear with the release picture.:shock: Alternatively, you could quit PictureLoKiT without showing that final picture, leaving your launched program running… Code: Select all
C:\WINDOWS\system32\sol.exe
quit
PictureLoKiT has some built-in commands to help script programs without displaying the GUI. I’ll explain those LokPic commands in a later post, but you can do things like ejecting a CD. You just need to know the full path to PictureLoKiT.exe and include it in your “prize.bat”. Code: Select all
"C:\Program Files\PictureLoKiT\PictureLoKiT.exe eject"
C:\WINDOWS\system32\sol.exe
This will pop open the CD tray (if you have one) when the session ends, then start Solitaire. These are just simple examples to get you started. I’m sure those clever kinkster minds will find brilliant ways to use this feature:twisted: Play safe and enjoy.