Dim info As String = "
Печать-проверка глобальных переменных.
Разработчик: Дудин Дмитрий. Vizart co.
Версия 1.0 (11 февраля 2014)"

Dim is_printControl, is_printControl5, is_printFill, is_printAll As Boolean
Dim s As String

sub OnInitParameters()
	RegisterParameterBool("control", "Print control", TRUE)
	RegisterParameterBool("control5", "Print control = 5", TRUE)
	RegisterParameterBool("fill", "Print fill", TRUE)
	RegisterParameterBool("all", "Print all", FALSE)
end sub

sub OnInit()
	is_printControl = GetParameterBool("control")
	is_printControl5 = GetParameterBool("control5")
	is_printFill = GetParameterBool("fill")
	is_printAll = GetParameterBool("all")
	
	System.Map.RegisterChangedCallback("")
	this.ScriptPluginInstance.SetParameterString("console", info)
end sub
sub OnParameterChanged(parameterName As String)
	OnInit()
end sub

Sub OnSharedMemoryVariableChanged(map As SharedMemory, mapKey As String)
	If is_printAll Then
		println(mapKey & " = " & map[mapKey])
		exit sub
	End If
	
	If mapKey.Right(8) = "_control" AND is_printControl Then
		If is_printControl5 OR CInt(map[mapKey]) <> 5 then
			println(mapKey & " = " & map[mapKey])
		End If
	ElseIf mapKey.Right(5) = "_fill" AND is_printFill Then
		println(mapKey & " = " & map[mapKey])
    End If
End Sub