You are here

PeerBlock Portable did not close properly last time, AHK workaround

2 posts / 0 new
Last post
Sprinterdriver
Offline
Last seen: 3 days 21 hours ago
Joined: 2014-12-01 15:17
PeerBlock Portable did not close properly last time, AHK workaround

Hi.

Have decided to put a link to PeerBlockPortable.exe in the start meny/startup directory to make it start up with windows. Unfortunately about every time Windows starts up, I got this annoying errormessage. and the tedious process to manually start the program over again begins.

Since I have played around with this amazing script language called AutoHotkey I figured out a solution. I made a script that launch PeerBlockPortable.exe (the script file must reside in same directory as this exe file), and wait for the error message to appear.
If the errormessage appear, the script automatically makes the mouse pointer click on the OK button, wait a second and then tries to launch the exe file once again.
This repeats until PeerBlock portable starts up without the error message.

The contents of the script file is to be found here:
http://pastebin.com/0MhGziNX

To make it work:
* Install Autohotkey on your computer (get it from ahkscript.org)
* Create a new ahk file in same directory as PeerBlockPortable.exe (name of file can be whatever you want it to be)
* Edit the ahk file. In most cases this mean Notepad open.
* Go to the above link (pastebin), copy the code and paste it into the ahk file and then save.
* Make a shortcut to your new ahk file.

Have fun...

Sprinterdriver
Offline
Last seen: 3 days 21 hours ago
Joined: 2014-12-01 15:17
Autohotkey script updated

Updated script here.
http://pastebin.com/u0dRcFhq

Updated since last:
* More reliable (waits longer so it detect the error boxes that use long time - at Windows startup)
* Detect several possible variations of error messages and nag-boxes.

Log in or register to post comments