Skip to content

Commit

Permalink
Merge pull request #14 from offhub/fix001
Browse files Browse the repository at this point in the history
Update SandboxToys2.ahk (Minor bug fixes)
  • Loading branch information
blap authored Sep 18, 2023
2 parents 40dbdb2 + 6b1c243 commit 221de23
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions SandboxToys2.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#Persistent
#SingleInstance Ignore

version = 2.5.2
version = 2.5.3
; SandboxToys: Main Menu
; Author: r0lZ updated by blap and others
; Developed and compiled with AHK2Exe(Unicode 64-bit.bin) with no compression v 1.1.36.02.
Expand Down Expand Up @@ -209,16 +209,17 @@ else {
; find Sandboxie's INI file in %A_WinDir% and in Sandboxie's install dir
RegRead, IniPathO, HKLM\SYSTEM\CurrentControlSet\Services\SbieDrv, IniPath ; check custom config location in registry
IniPath = %IniPathO%
if ((IniPath != "") && (SubStr(IniPath, 1, 4) == "\??\") && (SubStr(IniPath, 8) != "") && (!FileExist(SubStr(IniPath, 5)))) {
ini =
if ((IniPath != "") && (SubStr(IniPath, 1, 4) == "\??\") && (SubStr(IniPath, 8) != "") && (FileExist(SubStr(IniPath, 5)))) {
IniPath := (SubStr(IniPath, 5))
ini = %IniPath%
}
else {
IniPath =
ini = %A_WinDir%\Sandboxie.ini
ini = %sbdir%\Sandboxie.ini
if (! FileExist(ini))
{
ini = %sbdir%\Sandboxie.ini
ini = %A_WinDir%\Sandboxie.ini
if (! FileExist(ini))
{
MsgBox, 16, %title%, Can't find Sandboxie.ini.
Expand Down Expand Up @@ -302,10 +303,10 @@ if (! FileExist(regconfig))
exist := sandboxes_array[b,"exist"]
benabled := sandboxes_array[b,"Enabled"]
bneverdelete := sandboxes_array[b,"NeverDelete"]
buseimagefile := sandboxes_array[b,"UseImageFile"]
busefileimage := sandboxes_array[b,"UseFileImage"]
buseramdisk := sandboxes_array[b,"UseRamDisk"]

if (benabled != 1 || bneverdelete != 0 || buseimagefile != 0 || buseramdisk != 0) { ; Skip disabled, neverdelete, useimagefile, or useramdisk boxes
if (benabled != 1 || bneverdelete != 0 || busefileimage != 0 || buseramdisk != 0) { ; Skip disabled, neverdelete, usefileimage, or useramdisk boxes
Continue
}

Expand Down Expand Up @@ -769,7 +770,7 @@ getSandboxesArray(array,ini)
FileEncoding, %old_encoding%

; fills the array
Loop, Parse, boxes, CSV
Loop, Parse, boxes, CSV
{
array[0] := A_Index
array[A_Index,"name"] := A_LoopField
Expand Down Expand Up @@ -836,13 +837,13 @@ getSandboxesArray(array,ini)
else {
array[A_LoopField,"NeverDelete"] := 0
}
; checks if the box has UseImageFile=y in the INI
IniRead, buseimagefile, %ini%, %A_LoopField%, UseImageFile, n
if (buseimagefile == "y") {
array[A_LoopField,"UseImageFile"] := 1
; checks if the box has UseFileImage=y in the INI
IniRead, busefileimage, %ini%, %A_LoopField%, UseFileImage, n
if (busefileimage == "y") {
array[A_LoopField,"UseFileImage"] := 1
}
else {
array[A_LoopField,"UseImageFile"] := 0
array[A_LoopField,"UseFileImage"] := 0
}
; checks if the box has UseRamDisk=y in the INI
IniRead, buseramdisk, %ini%, %A_LoopField%, UseRamDisk, n
Expand Down

0 comments on commit 221de23

Please sign in to comment.