Page 1 of 1

Sandboxie Hotkey

Posted: Fri Mar 25, 2016 6:37 pm
by PaulaTheKoala
Due to the lack of support for a hotkey to terminate all running applications, I ended up doing it myself.
At first, I wrote a small tool to solve this problem, but it wasn't really necessary since I had Auto Hotkey installed, so I ended up turning it into an AHK script instead:

Code: Select all

	Sandboxie := NULL
	
	IfExist, C:\Program Files\Sandboxie\Start.exe
	{
		Sandboxie := "C:\Program Files\Sandboxie"
	}
	
	IfExist, C:\Program Files (x86)\Sandboxie\Start.exe
	{
		Sandboxie := "C:\Program Files (x86)\Sandboxie"
	}
	
	if (Sandboxie == NULL)
	{
		ExitApp
	}
	
	Menu, Tray, Icon, %Sandboxie%\SbieCtrl.exe, 11
	Menu, Tray, Tip, Sandboxie Hotkey (CTRL + F1)
	
	Menu, Tray, NoStandard
	Menu, Tray, Add, Exit
	
	^F1::
		Run, %Sandboxie%\Start.exe /terminate_all
	return
	
	Exit:
		ExitApp
	return
You must have AHK installed to use the script.
To use the script, paste the above code into notepad and save it as Sandboxie.ahk, double click the file to run it, use CTRL + F1 to terminate all running applications.

The script can be compiled into an EXE but since I'm new here and I don't know the rules on posting EXEs I decided not to.

Re: Sandboxie Hotkey

Posted: Fri Mar 25, 2016 11:31 pm
by Craig@Invincea
Thank you very much!

Re: Sandboxie Hotkey

Posted: Fri Mar 25, 2016 11:53 pm
by PaulaTheKoala
Craig@Invincea wrote:Thank you very much!
Sorry about making you have to approve it again, didn't know editing the post would do that. >_<

Re: Sandboxie Hotkey

Posted: Fri Mar 25, 2016 11:56 pm
by Craig@Invincea
Not a problem!