Add a debug mode checkbox
This commit is contained in:
parent
d9f33a420b
commit
3047c3e072
@ -1,11 +1,13 @@
|
|||||||
Stdout(output:="", sciteCheck := true){ ;output to console - sciteCheck reduces Stdout/Stdin performance,so where performance is necessary disable it accordingly
|
Stdout(output:="", sciteCheck := true){ ;output to console - sciteCheck reduces Stdout/Stdin performance,so where performance is necessary disable it accordingly
|
||||||
Global ___console___
|
Global ___console___, DEBUGMODE
|
||||||
If (sciteCheck && ProcessExist("SciTE.exe") && GetScriptParentProcess() = "SciTE.exe"){ ;if script parent is scite,output to scite console & return
|
If (sciteCheck && ProcessExist("SciTE.exe") && GetScriptParentProcess() = "SciTE.exe"){ ;if script parent is scite,output to scite console & return
|
||||||
FileAppend, %output%`n, *
|
FileAppend, %output%`n, *
|
||||||
Return
|
Return
|
||||||
} ;CONOUT$ is a special file windows uses to expose attached console output
|
} ;CONOUT$ is a special file windows uses to expose attached console output
|
||||||
|
if (DEBUGMODE) {
|
||||||
( output ? ( !___console___? (DllCall("AttachConsole", "int", -1) || DllCall("AllocConsole")) & (___console___:= true) : "" ) & FileAppend(output . "`n","CONOUT$") : DllCall("FreeConsole") & (___console___:= false) & StdExit() )
|
( output ? ( !___console___? (DllCall("AttachConsole", "int", -1) || DllCall("AllocConsole")) & (___console___:= true) : "" ) & FileAppend(output . "`n","CONOUT$") : DllCall("FreeConsole") & (___console___:= false) & StdExit() )
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Stdin(output:="", sciteCheck := true){ ;output to console & wait for input & return input
|
Stdin(output:="", sciteCheck := true){ ;output to console & wait for input & return input
|
||||||
Global ___console___
|
Global ___console___
|
||||||
@ -833,6 +835,9 @@ scriptSelectionBox := null
|
|||||||
buttonstart := null
|
buttonstart := null
|
||||||
buttonstop := null
|
buttonstop := null
|
||||||
cpBox := null
|
cpBox := null
|
||||||
|
debugBox := null
|
||||||
|
|
||||||
|
DEBUGMODE := false
|
||||||
|
|
||||||
scriptName := ""
|
scriptName := ""
|
||||||
|
|
||||||
@ -850,10 +855,20 @@ Gui, Add, Button,vbuttonstop gStopCraftingScript w90 ys, Stop
|
|||||||
Gui, Add, Text,section, CP:
|
Gui, Add, Text,section, CP:
|
||||||
Gui, Add, Edit,gmodifyCP ys w75
|
Gui, Add, Edit,gmodifyCP ys w75
|
||||||
Gui, Add, UpDown,vcpBox ys Range1-1000, %CPBASE%
|
Gui, Add, UpDown,vcpBox ys Range1-1000, %CPBASE%
|
||||||
|
Gui, Add, Text,xp+100 ys, Debug
|
||||||
|
Gui, Add, Checkbox,ys vdebugBox gmodifyDebug
|
||||||
Gui, Show
|
Gui, Show
|
||||||
|
|
||||||
GuiControl, Disable, buttonstop
|
GuiControl, Disable, buttonstop
|
||||||
|
|
||||||
|
modifyDebug() {
|
||||||
|
global debugBox, DEBUGMODE
|
||||||
|
debug := false
|
||||||
|
GuiControlGet, debug,,debugBox
|
||||||
|
DEBUGMODE := debug
|
||||||
|
Stdout("Set DEBUGMODE to " . DEBUGMODE)
|
||||||
|
}
|
||||||
|
|
||||||
modifyCP() {
|
modifyCP() {
|
||||||
global cpBox, CPBASE
|
global cpBox, CPBASE
|
||||||
boxcp := 0
|
boxcp := 0
|
||||||
|
BIN
autocraft.exe
BIN
autocraft.exe
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user