diff --git a/Run_TradeMacro.ahk b/Run_TradeMacro.ahk
index e34b092f..45c3eb92 100644
--- a/Run_TradeMacro.ahk
+++ b/Run_TradeMacro.ahk
@@ -1,6 +1,9 @@
; #####################################################################################################################
; # This script checks if the right AHK version is installed and runs the TradeMacro merge script.
; #####################################################################################################################
+#SingleInstance, Force
+#NoEnv
+SetWorkingDir, %A_ScriptDir%
versionFilePath := A_ScriptDir "\resources\VersionTrade.txt"
FileRead, versionFile, %versionFilePath%
diff --git a/lib/Class_SplashUI.ahk b/lib/Class_SplashUI.ahk
new file mode 100644
index 00000000..93883fb8
--- /dev/null
+++ b/lib/Class_SplashUI.ahk
@@ -0,0 +1,117 @@
+class SplashUI
+{
+ __New(params*)
+ {
+ c := params.MaxIndex()
+ If (c > 6) {
+ throw "Too many parameters passed to SplashUI.New()"
+ }
+
+ ; set defaults
+ this.state := (params[1] = "" or not params[1]) ? "on" : params[1]
+ this.title := (params[2] = "" or not params[2]) ? "Splash Screen" : params[2]
+ this.message := (params[3] = "" or not params[3]) ? "Initializing script" : params[3]
+ this.submessage := (params[4] = "" or not params[4]) ? "" : params[4]
+ this.scriptVersion := (params[5] = "" or not params[5]) ? "" : params[5]
+ this.borderImage := (params[6] = "" or not params[6]) ? "" : params[6]
+
+ ; initialize
+ this.CreateUI()
+ }
+
+ CreateUI() {
+ Global SplashMessage, SplashSubMessage
+
+ ;Destroy GUIs in case they still exist
+ Gui, SplashUI:Destroy
+
+ Gui, SplashUI:New, +Border -resize -SysMenu -Caption +HwndSplashHwnd
+ Gui, SplashUI:Margin, 10, 2
+ Gui, SplashUI:Color, FFFFFF, 000000
+
+ Gui, SplashUI:Add, Progress, w900 h28 x0 y0 c505256 Background505256
+
+ Gui, SplashUI:Font, s12 cFFFFFF bold, Verdana
+ Gui, SplashUI:Add, Text, x10 y5 h20 w450 +Center BackgroundTrans, % this.title
+ Gui, SplashUI:Font, s7 cFFFFFF norm, Verdana
+ Gui, SplashUI:Add, Text, x+-90 yp+6 h20 w90 +Right BackgroundTrans, % this.scriptVersion
+
+ Gui, SplashUI:Font, s10 c000000, Verdana
+ Gui, SplashUI:Add, Text, x10 y+5 w450 +Center BackgroundTrans vSplashMessage, % this.message
+
+ Gui, SplashUI:Font, s8 c000000, Consolas
+ Gui, SplashUI:Add, Text, x10 y+10 w450 r4 +Left BackgroundTrans vSplashSubMessage, % StrLen(this.submessage) ? "- " this.submessage : this.submessage
+
+ Gui, SplashUI:Font, s7 c000000, Verdana
+ Gui, SplashUI:Add, Text, x10 y+5 h20 w450 +Right BackgroundTrans, % "AHK v" . A_AHKVersion
+
+ Gui, SplashUI:+LastFound
+ Gui, SplashUI:Show, Center w470 NA, % this.title
+
+ WinGetPos, _TTX, _TTY, _TTW, _TTH, ahk_id %SplashHwnd%
+ image := this.borderImage
+ If (FileExist(image)) {
+ WinGetPos, _TTX, _TTY, _TTW, _TTH, ahk_id %SplashHwnd%
+
+ Gui, SplashUI:Add, Picture, w1000 h1 x0 y0, %image%
+ Gui, SplashUI:Add, Picture, w1000 h1 x0 y0, %image%
+
+ Gui, SplashUI:Add, Picture, w1 h1000 x0 y0, %image%
+ Gui, SplashUI:Add, Picture, w1 h1000 x0 y0, %image%
+
+ _TTH := _TTH -1
+ _TTW := _TTW -1
+ Gui, SplashUI:Add, Picture, w1000 h1 x0 y%_TTH%, %image%
+ Gui, SplashUI:Add, Picture, w1000 h1 x0 y%_TTH%, %image%
+
+ Gui, SplashUI:Add, Picture, w1 h1000 x%_TTW% y1, %image%
+ Gui, SplashUI:Add, Picture, w1 h1000 x%_TTW% y1, %image%
+ }
+
+ If (state = "off") {
+ Gui, SplashUI:Show, Hide
+ }
+ }
+
+ ShowUI() {
+ this.state := "on"
+ If (this.state = "dead") {
+ this.CreateUI()
+ } Else {
+ Gui, SplashUI:Show
+ }
+ }
+
+ HideUI() {
+ Gui, SplashUI:Show, Hide
+ this.state := "off"
+ }
+
+ DestroyUI() {
+ Gui, SplashUI:Destroy
+ this.state := "dead"
+ }
+
+ SetMessage(message) {
+ this.message := message
+ GuiControl,,SplashMessage, % this.message
+ Sleep, 1 ; add a small sleep to prevent text field overlapping caused by too fast updates
+ }
+ SetSubMessage(message) {
+ If (StrLen(message)) {
+ this.submessage := StrLen(this.submessage) ? this.submessage "`n" : ""
+ this.submessage .= "- " message
+ } Else {
+ this.submessage := this.submessage "`n" ""
+ }
+
+ arr := StrSplit(this.submessage, "`n")
+ mI := arr.MaxIndex()
+ If (mI > 3) {
+ this.submessage := Trim(arr[mI - 2] "`n" arr[mI - 1] "`n" arr[mI])
+ }
+
+ GuiControl,,SplashSubMessage, % this.submessage
+ Sleep, 1 ; add a small sleep to prevent text field overlapping caused by too fast updates
+ }
+}
\ No newline at end of file
diff --git a/lib/IEComObjectTestCall.ahk b/lib/IEComObjectTestCall.ahk
index 25a4876d..240f26cf 100644
--- a/lib/IEComObjectTestCall.ahk
+++ b/lib/IEComObjectTestCall.ahk
@@ -12,7 +12,9 @@ If (FileExist(userFolderPath "\IEComObjectCall.txt")) {
}
url := "https://poe-trademacro.github.io/userCount/index.html"
-Try {
+killIElowutil := false
+Try {
+ ;killIElowutil := CheckForRunningIElowutil()
wb1 := ComObjCreate("InternetExplorer.Application")
wb1.Visible := False
wb1.Navigate(url)
@@ -30,6 +32,18 @@ Try {
}
}
+If (killIElowutil) {
+ DetectHiddenWindows, On
+ SetTitleMatchMode, 2
+
+ Process, Exist, ielowutil.exe ; Sets errorlevel to process PID
+ pid := ErrorLevel
+ Process, Close, %pid%
+ Process, Close, ielowutil.ex
+ WinClose, % "ahk_pid " pid
+ WinKill, % "ahk_pid " pid
+}
+
CleanIE() {
Try {
wb1.Quit
@@ -38,7 +52,25 @@ CleanIE() {
}
ExitApp
-}
+}
+
+CheckForRunningIElowutil() {
+ DetectHiddenWindows, On
+ SetTitleMatchMode, 2
+ Loop
+ {
+ Process, Exist, ielowutil.exe ; Sets errorlevel to process PID
+ pid := ErrorLevel
+ IfWinNotExist, % "ahk_pid " pid ; Expression for ahk_pid
+ {
+ Return 0
+ }
+ IfWinExist, % "ahk_pid " pid ; Expression for ahk_pid
+ {
+ Return 1
+ }
+ }
+}
IELoad(wb, ByRef loaded = false, path = "", visible = false) ;You need to send the IE handle to the function unless you define it as global.
{
diff --git a/lib/PoEScripts_CheckInvalidScriptFolder.ahk b/lib/PoEScripts_CheckInvalidScriptFolder.ahk
index 3fc202b3..a6d83d42 100644
--- a/lib/PoEScripts_CheckInvalidScriptFolder.ahk
+++ b/lib/PoEScripts_CheckInvalidScriptFolder.ahk
@@ -23,6 +23,7 @@
Msgbox, 0x1030, %project% Problematic Installation Path, % msg
} Else {
SplashTextOff
+ SplashUI.DestroyUI()
msg .= "`n`n" "Do not report this, it is intended behaviour! Move your script folder to somewhere else!"
Msgbox, 0x1010, %project% Invalid Installation Path, % msg
}
diff --git a/lib/PoEScripts_CompareUserFolderWithScriptFolder.ahk b/lib/PoEScripts_CompareUserFolderWithScriptFolder.ahk
index cc663f5d..316652ef 100644
--- a/lib/PoEScripts_CompareUserFolderWithScriptFolder.ahk
+++ b/lib/PoEScripts_CompareUserFolderWithScriptFolder.ahk
@@ -6,6 +6,7 @@
msg .= exit ? "`n`nScript will be closed." : ""
SplashTextOff
+ SplashUI.DestroyUI()
If (exit) {
MsgBox, 16, Invalid %project% Script Location, % msg
ExitApp
diff --git a/lib/PoEScripts_CreateTempFolder.ahk b/lib/PoEScripts_CreateTempFolder.ahk
index 5d33478b..2ef02d02 100644
--- a/lib/PoEScripts_CreateTempFolder.ahk
+++ b/lib/PoEScripts_CreateTempFolder.ahk
@@ -28,6 +28,7 @@
MsgBox, 5, %project%, % msg
IfMsgBox, Cancel
{
+ SplashUI.DestroyUI()
SplashTextOn, , 20, %project%, Exiting script...
Sleep, 2000
SplashTextOff
diff --git a/resources/Updates_Trade.txt b/resources/Updates_Trade.txt
index 4cdba9b5..b836134d 100644
--- a/resources/Updates_Trade.txt
+++ b/resources/Updates_Trade.txt
@@ -1,5 +1,11 @@
The following is a list of what has been updated, starting with 1.1.0
+2.13.1
+================================================================================================
+* Added a new splash screen.
+* Further improved handling of various (runtime) errors.
+* Various small improvements/fixes.
+
2.12.5
================================================================================================
* Improved feedback for issues with poe.trade http requests.
diff --git a/resources/VersionTrade.txt b/resources/VersionTrade.txt
index 4d34bac3..212f1960 100644
--- a/resources/VersionTrade.txt
+++ b/resources/VersionTrade.txt
@@ -1,2 +1,2 @@
-TradeReleaseVersion := "v2.12.5"
+TradeReleaseVersion := "v2.13.1"
TradeAHKVersionRequired := "1.1.26.00"
diff --git a/resources/ahk/Merge_ItemInfo.ahk b/resources/ahk/Merge_ItemInfo.ahk
index 3b4f0b18..2a14fb28 100644
--- a/resources/ahk/Merge_ItemInfo.ahk
+++ b/resources/ahk/Merge_ItemInfo.ahk
@@ -46,8 +46,8 @@ PoEScripts_CompareUserFolderWithScriptFolder(userDirectory, scriptDir, projectNa
/*
merge all scripts into `_ItemInfoMain.ahk` and execute it.
*/
-info := ReadFileToMerge(scriptDir "\resources\ahk\POE-ItemInfo.ahk")
-addMacros := ReadFileToMerge(scriptDir "\resources\ahk\AdditionalMacros.ahk")
+info := ReadFileToMerge(file01 := scriptDir "\resources\ahk\POE-ItemInfo.ahk")
+addMacros := ReadFileToMerge(file02 := scriptDir "\resources\ahk\AdditionalMacros.ahk")
info := info . "`n`r`n`r"
addMacros := "`n`r#IfWinActive ahk_group PoEWindowGrp" . "`n`r`n`r" . addMacros
@@ -57,6 +57,8 @@ CloseScript("ItemInfoMain.ahk")
FileDelete, %scriptDir%\_ItemInfoMain.ahk
FileCopy, %scriptDir%\resources\ahk\POE-ItemInfo.ahk, %scriptDir%\_ItemInfoMain.ahk
+; additional macros
+FileAppend, % "`r`n`r`n/* ###--- Merged File: " file02 " ---### `r`n*/`r`n", %scriptDir%\_TradeMacroMain.ahk
FileAppend, %addMacros% , %scriptDir%\_ItemInfoMain.ahk
; set script hidden
@@ -103,7 +105,7 @@ RunAsAdmin()
AppendCustomMacros(userDirectory)
{
- If(!InStr(FileExist(userDirectory "\CustomMacros"), "D")) {
+ If (!InStr(FileExist(userDirectory "\CustomMacros"), "D")) {
FileCreateDir, %userDirectory%\CustomMacros\
}
@@ -113,8 +115,8 @@ AppendCustomMacros(userDirectory)
{
If A_LoopFileExt in %extensions%
{
- FileRead, tmp, %A_LoopFileFullPath%
- appendedMacros .= "; appended custom macro file: " A_LoopFileName " ---------------------------------------------------"
+ FileRead, tmp, %A_LoopFileFullPath%
+ appendedMacros .= "`r`n`r`n/* ###--- Merged File: " A_LoopFileFullPath " ---### `r`n*/`r`n"
appendedMacros .= "`n" tmp "`n`n"
}
}
diff --git a/resources/ahk/Merge_TradeMacro.ahk b/resources/ahk/Merge_TradeMacro.ahk
index 44d4b426..fcb5a0a8 100644
--- a/resources/ahk/Merge_TradeMacro.ahk
+++ b/resources/ahk/Merge_TradeMacro.ahk
@@ -10,10 +10,12 @@
#Include, %A_ScriptDir%\..\..\lib\PoEScripts_CreateTempFolder.ahk
#Include, %A_ScriptDir%\..\..\lib\PoEScripts_HandleUserSettings.ahk
#Include, %A_ScriptDir%\..\..\lib\PoEScripts_CheckInvalidScriptFolder.ahk
+#Include, %A_ScriptDir%\..\..\lib\Class_SplashUI.ahk
+#Include, %A_ScriptDir%\..\..\resources\VersionTrade.txt
arguments := ""
arg1 = %1%
-scriptDir := FileExist(arg1) ? arg1 : RegExReplace(A_ScriptDir, "(.*)\\[^\\]+\\.*", "$1")
+global scriptDir := FileExist(arg1) ? arg1 : RegExReplace(A_ScriptDir, "(.*)\\[^\\]+\\.*", "$1")
Loop, %0% ; For each parameter
{
If (not FileExist(%A_Index%)) { ; we don't want the first argument which is the project scriptdir here
@@ -29,7 +31,7 @@ If (InStr(arguments, "-nosplash", 0)) {
skipSplash := 1
} Else {
skipSplash := 0
- StartSplashScreen()
+ StartSplashScreen(TradeReleaseVersion)
}
If (InStr(arguments, "-mergeonly", 0)) {
@@ -68,10 +70,12 @@ PoEScripts_CompareUserFolderWithScriptFolder(userDirectory, scriptDir, projectNa
/*
merge all scripts into `_TradeMacroMain.ahk` and execute it.
*/
-info := ReadFileToMerge(scriptDir "\resources\ahk\POE-ItemInfo.ahk")
-tradeInit := ReadFileToMerge(scriptDir "\resources\ahk\TradeMacroInit.ahk")
-trade := ReadFileToMerge(scriptDir "\resources\ahk\TradeMacro.ahk")
-addMacros := ReadFileToMerge(scriptDir "\resources\ahk\AdditionalMacros.ahk")
+SplashUI.SetSubMessage("Merging and starting Scripts...")
+
+tradeInit := ReadFileToMerge(file01 := scriptDir "\resources\ahk\TradeMacroInit.ahk")
+info := ReadFileToMerge(file02 := scriptDir "\resources\ahk\POE-ItemInfo.ahk")
+addMacros := ReadFileToMerge(file03 := scriptDir "\resources\ahk\AdditionalMacros.ahk")
+trade := ReadFileToMerge(file04 := scriptDir "\resources\ahk\TradeMacro.ahk")
info := "`n`r`n`r" . info . "`n`r`n`r"
addMacros := "`n`r#IfWinActive ahk_group PoEWindowGrp" . "`n`r`n`r" . addMacros . "`n`r`n`r"
@@ -79,27 +83,66 @@ addMacros .= AppendCustomMacros(userDirectory)
CloseScript("_TradeMacroMain.ahk")
CloseScript("_ItemInfoMain.ahk")
-FileDelete, %scriptDir%\_TradeMacroMain.ahk
-FileDelete, %scriptDir%\_ItemInfoMain.ahk
-FileCopy, %scriptDir%\resources\ahk\TradeMacroInit.ahk, %scriptDir%\_TradeMacroMain.ahk
-FileAppend, %info% , %scriptDir%\_TradeMacroMain.ahk
-FileAppend, %addMacros% , %scriptDir%\_TradeMacroMain.ahk
-FileAppend, %trade% , %scriptDir%\_TradeMacroMain.ahk
+global outputFile := scriptDir "\_TradeMacroMain.ahk"
+FileDelete, %outputFile%
+FileDelete, %scriptDir%\_ItemInfoMain.ahk
+; trademacro init
+FileCopy, %scriptDir%\resources\ahk\TradeMacroInit.ahk, %outputFile%
+; iteminfo
+FileAppend, % "`r`n`r`n/* ###--- Merged File: " file02 " ---~~~ `r`n*/`r`n", %outputFile%
+FileAppend, %info% , %outputFile%
+; additional macros
+FileAppend, % "`r`n`r`n/* ###--- Merged File: " file03 " ---~~~ `r`n*/`r`n", %outputFile%
+FileAppend, %addMacros% , %outputFile%
+; trademacro
+FileAppend, % "`r`n`r`n/* ###--- Merged File: " file04 " ---~~~ `r`n*/`r`n", %outputFile%
+FileAppend, %trade% , %outputFile%
; set script hidden
-FileSetAttrib, +H, %scriptDir%\_TradeMacroMain.ahk
-; pass some parameters to TradeMacroInit
+FileSetAttrib, +H, %outputFile%
+
+/*
+ Kill the merged script if it's running already. This prevents the error parser to read text from the wrong window which could be from the already running script.
+ Pass some parameters so the script.
+ Parse runtime errors and show a GUI to help players with handling and reporting issues.
+*/
If (not onlyMergeFiles) {
- SplashTextOff
- RunWait, "%A_AhkPath%" "%scriptDir%\_TradeMacroMain.ahk" "%projectName%" "%userDirectory%" "%isDevelopmentVersion%" "%overwrittenFiles%" "isMergedScript" "%skipSplash%" "%A_ScriptFullPath%", , UseErrorLevel
- If (ErrorLevel) {
- Menu, Tray, Icon, %scriptDir%\resources\images\poe-trade-bl.ico
- GoSub, ShowErrorUI
- }
- Else {
- ExitApp
- }
+ DetectHiddenWindows, On
+ SetTitleMatchMode, 1
+ WinClose, %scriptDir%\_TradeMacroMain.ahk ahk_class AutoHotkey, , 0
+ WinKill, %scriptDir%\_TradeMacroMain.ahk ahk_class AutoHotkey, , 0
+
+ SplashUI.DestroyUI()
+ Run, "%A_AhkPath%" "%scriptDir%\_TradeMacroMain.ahk" "%projectName%" "%userDirectory%" "%isDevelopmentVersion%" "%overwrittenFiles%" "isMergedScript" "%skipSplash%" "%A_ScriptFullPath%", , UseErrorLevel, OutputVarPID
+
+ ; Check whether the called script is still running to detect script crashes, in favour of using runwait + errorlevel
+ ; The advantage here is that we can read the text from the crash error window.
+ ; This requires the merge script being closed by the called script though.
+ scriptRunning := true
+ global errorWindowText := ""
+
+ Loop {
+ Sleep, 100
+ Process, Exist, %OutputVarPID%
+ If (ErrorLevel = 0) {
+ scriptRunning := false
+ }
+
+ DetectHiddenWindows, On
+ SetTitleMatchMode, 1
+ IfWinNotExist, %outputFile% ahk_class AutoHotkey
+ {
+ ;scriptRunning := false
+ }
+ } Until (not scriptRunning)
+
+ SetTitleMatchMode, 1
+ DetectHiddenText, On
+ WinGetText, errorWindowText, % "_TradeMacroMain.ahk"
+
+ Menu, Tray, Icon, %scriptDir%\resources\images\poe-trade-bl.ico
+ GoSub, ShowErrorUI
} Else {
ExitApp
}
@@ -143,8 +186,8 @@ RunAsAdmin(arguments)
Return arguments
}
-StartSplashScreen() {
- SplashTextOn, , 20, PoE-TradeMacro, Merging and starting Scripts...
+StartSplashScreen(version) {
+ global SplashUI := new SplashUI("on", "PoE-TradeMacro", "Initializing PoE-TradeMacro...", "- Checking permission and access to some folders...", version, scriptDir "\resources\images\greydot.png")
}
AppendCustomMacros(userDirectory)
@@ -159,8 +202,8 @@ AppendCustomMacros(userDirectory)
{
If A_LoopFileExt in %extensions%
{
- FileRead, tmp, %A_LoopFileFullPath%
- appendedMacros .= "; appended custom macro file: " A_LoopFileName " ---------------------------------------------------"
+ FileRead, tmp, %A_LoopFileFullPath%
+ appendedMacros .= "`r`n`r`n/* ###--- Merged File: " A_LoopFileFullPath " ---~~~ `r`n*/`r`n"
appendedMacros .= "`n" tmp "`n`n"
}
}
@@ -226,11 +269,105 @@ ShowErrorUI:
Gui, Add, Link, x25 y+5 cBlue BackgroundTrans, - Discord
Gui, Add, Link, x25 y+5 cBlue BackgroundTrans, - Forum
+ If (StrLen(errorWindowText)) {
+ Gui, Font, bold s8 c000000, Verdana
+ Gui, Add, Text, x15 y+15 BackgroundTrans, % "Parsed runtime error:"
+ errorMsg := ParseRuntimeError(errorWindowText, outputFile, errorFile)
+ Gui, Font, bold norm
+ Gui, Add, Text, x15 y+7 BackgroundTrans, % errorMsg
+
+ solution := GetSolution(errorMsg, errorFile)
+ If (solution) {
+ Gui, Font, bold s8 c000000, Verdana
+ Gui, Add, Text, x15 y+15 BackgroundTrans, % "Possible solution:"
+ Gui, Font, bold norm
+ Gui, Add, Text, x15 y+7 BackgroundTrans, % solution
+ }
+
+ Gui, Font, bold s8 c000000, Verdana
+ Gui, Add, Text, x15 y+15 BackgroundTrans, % "Original runtime error:"
+ Gui, Font, bold norm
+ originalMsg := Trim(RegExReplace(errorWindowText, "i)^Ok(\r\n)?"))
+ originalMsg := Trim(RegExReplace(originalMsg, "i)(\r\n)?The program will exit\.$"))
+ Gui, Add, Edit, x16 y+7 w600 r6 ReadOnly BackgroundTrans, % originalMsg
+
+ Gui, Add, Button, x15 y+10 gCopyError, Copy error to clipboard
+ }
+
Gui, Add, Text, x0 y0 w0 h0, % "dummycontrol"
Gui, Show, AutoSize, PoE-TradeMacro run error
ControlFocus, dummycontrol, PoE-TradeMacro run error
Return
+CopyError:
+ ClipBoard := errorWindowText
+ ToolTip, Copied
+ SetTimer, RemoveToolTip, 1500
+Return
+
+RemoveToolTip:
+ SetTimer, RemoveToolTip, Off
+ ToolTip
+Return
+
+ParseRuntimeError(e, mergedFile, ByRef errorFile) {
+ errorLine :=
+ If (RegExMatch(e, "i)Error at line (\d+)\.", lineNr)) {
+ errorLine := lineNr1
+ }
+
+ FileRead, rF, %mergedFile%
+ files:= []
+
+ lines := []
+ Loop, Parse, rF, `n, `r
+ {
+ lines.push(A_LoopField)
+ }
+
+ For key, val in lines {
+ If (RegExMatch(val, "i)###---\sMerged File:\s(.*)\s---\~\~\~", mf)) {
+ If (mf) {
+ f := {}
+ ;f.name := RegExReplace(mf1, "i)(.*)(CustomMacros\\.*)$|(.*)(resources\\ahk\\.*)$", "$2$4")
+ f.name := mf1
+ f.start := A_Index
+ files.push(f)
+ }
+ }
+ }
+
+ errorFile := ""
+ Loop, % files.MaxIndex() {
+ If (A_Index = 1 and errorLine < files[A_Index].start) {
+ errorFile := scriptDir "\resources\ahk\TradeMacroInit.ahk"
+ Break
+ }
+ If (errorLine > files[A_Index].start) {
+ If (A_Index = files.MaxIndex()) {
+ errorFile := files[A_Index].name
+ }
+ Else If (errorLine < files[A_Index + 1].start) {
+ errorFile := files[A_Index].name
+ }
+ Else {
+ errorFile := files[A_Index + 1].name
+ }
+ }
+ }
+
+ errorMsg := "Error at line " errorLine ". This should be caused by the source file: `n" errorFile
+ Return errorMsg
+}
+
+GetSolution(msg, file) {
+ solution := ""
+ If (RegExMatch(file, "i)customMacros_example\.txt$")) {
+ solution := "Try deleting the source file:`n" file
+ Return solution
+ }
+}
+
GuiClose:
ExitApp
Return
\ No newline at end of file
diff --git a/resources/ahk/POE-ItemInfo.ahk b/resources/ahk/POE-ItemInfo.ahk
index a2d687b6..d3dad96d 100644
--- a/resources/ahk/POE-ItemInfo.ahk
+++ b/resources/ahk/POE-ItemInfo.ahk
@@ -23,6 +23,7 @@ GroupAdd, PoEWindowGrp, Path of Exile ahk_class POEWindowClass ahk_exe PathOfExi
#Include, %A_ScriptDir%\lib\ConvertKeyToKeyCode.ahk
#Include, %A_ScriptDir%\lib\Class_GdipTooltip.ahk
#Include, %A_ScriptDir%\lib\Class_ColorPicker.ahk
+#Include, %A_ScriptDir%\lib\Class_SplashUI.ahk
#Include, %A_ScriptDir%\lib\AdvancedHotkey.ahk
IfNotExist, %A_ScriptDir%\temp
FileCreateDir, %A_ScriptDir%\temp
@@ -228,11 +229,11 @@ class Fonts {
{
Options .= "s" FontSize_
}
- Gui Font, %Options%, Arial
- Gui Font, %Options%, Tahoma
- Gui Font, %Options%, Segoe UI
- Gui Font, %Options%, Verdana
- Gui Add, Text, HwndHidden h0 w0 x0 y0,
+ Gui, SettingsUI:Font, %Options%, Arial
+ Gui, SettingsUI:Font, %Options%, Tahoma
+ Gui, SettingsUI: Font, %Options%, Segoe UI
+ Gui, SettingsUI: Font, %Options%, Verdana
+ Gui, SettingsUI: Add, Text, HwndHidden h0 w0 x0 y0,
SendMessage, 0x31,,,, ahk_id %Hidden%
return ErrorLevel
}
@@ -478,6 +479,7 @@ Sleep, 100
; "SkipItemInfoUpdateCall" should be set outside by other scripts.
global firstUpdateCheck := true
If (!SkipItemInfoUpdateCall) {
+ global SplashUI := new SplashUI("on", "PoE-ItemInfo", "Initializing PoE-ItemInfo...", "", ReleaseVersion, A_ScriptDir "\resources\images\greydot.png")
GoSub, CheckForUpdates
}
firstUpdateCheck := false
@@ -487,6 +489,7 @@ If (StrLen(overwrittenUserFiles)) {
ShowChangedUserFiles()
}
GoSub, AM_AssignHotkeys
+SplashUI.SetSubMessage("Fetching currency data from poe.ninja for all leagues...")
GoSub, FetchCurrencyData
GoSub, InitGDITooltip
@@ -498,6 +501,7 @@ GoSub, InitGDITooltip
If (false) {
global currentLocale := ""
_Debug := true
+ SplashUI.SetSubMessage("Downloading language files...")
global translationData := PoEScripts_DownloadLanguageFiles(currentLocale, false, "PoE-ItemInfo", "Updating and parsing language files...", _Debug)
}
@@ -541,7 +545,7 @@ If (Opts.Lutbot_CheckScript) {
SetTimer, StartLutbot, 2000
}
-SplashTextOff ; init finished
+SplashUI.DestroyUI() ; init finished
; ----------------------------------------------------------- Functions and Labels ----------------------------------------------------------------
@@ -9680,7 +9684,8 @@ CreateSettingsUI()
{
Global
- Gui, Color, ffffff, ffffff
+ Gui, SettingsUI:Color, ffffff, ffffff
+ Gui, SettingsUI:Default
; ItemInfo is not included in other scripts
If (not SkipItemInfoUpdateCall) {
@@ -9693,145 +9698,145 @@ CreateSettingsUI()
}
StringTrimRight, TabNames, TabNames, 1
- Gui, Add, Tab3, Choose1 h660 x0, %TabNames%
+ Gui, SettingsUI:Add, Tab3, Choose1 h660 x0, %TabNames%
}
; Note: window handles (hwnd) are only needed if a UI tooltip should be attached.
generalHeight := SkipItemInfoUpdateCall ? "150" : "240" ; "180" : "270" with ParseItemHotKey
- topGroupBoxYPos := SkipItemInfoUpdateCall ? "y53" : "y30"
+ topGroupBoxYPos := SkipItemInfoUpdateCall ? "y51" : "y30"
; General
- GuiAddGroupBox("General", "x7 " topGroupBoxYPos " w310 h" generalHeight " Section")
- GuiAddCheckbox("Only show tooltip if PoE is frontmost", "xs10 yp+20 w250 h30", Opts.OnlyActiveIfPOEIsFront, "OnlyActiveIfPOEIsFront", "OnlyActiveIfPOEIsFrontH")
+ GuiAddGroupBox("General", "x7 " topGroupBoxYPos " w310 h" generalHeight " Section", "", "", "", "", "SettingsUI")
+ GuiAddCheckbox("Only show tooltip if PoE is frontmost", "xs10 yp+20 w250 h30", Opts.OnlyActiveIfPOEIsFront, "OnlyActiveIfPOEIsFront", "OnlyActiveIfPOEIsFrontH", "", "", "SettingsUI")
AddToolTip(OnlyActiveIfPOEIsFrontH, "When checked the script only activates while you are ingame`n(technically while the game window is the frontmost)")
;GuiAddHotkey(Opts.ParseItemHotKey, "xs75 yp+37 w120 h20", "ParseItemHotKey")
;GuiAddText("Hotkey:", "xs27 yp+2 w50 h20 0x0100", "LblParseItemHotKey")
; Change next from yp+30 to yp+25 when this is implemented.
- GuiAddCheckbox("Put tooltip results on clipboard", "xs10 yp+30 w250 h30", Opts.PutResultsOnClipboard, "PutResultsOnClipboard", "PutResultsOnClipboardH")
+ GuiAddCheckbox("Put tooltip results on clipboard", "xs10 yp+30 w250 h30", Opts.PutResultsOnClipboard, "PutResultsOnClipboard", "PutResultsOnClipboardH", "", "", "SettingsUI")
AddToolTip(PutResultsOnClipboardH, "Put tooltip result text into the system clipboard`n(overwriting the raw text PoE itself put there to begin with)")
- GuiAddCheckbox("Enable Map Mod Warnings", "xs10 yp+30 w250 h30", Opts.EnableMapModWarnings, "EnableMapModWarnings", "EnableMapModWarningsH")
+ GuiAddCheckbox("Enable Map Mod Warnings", "xs10 yp+30 w250 h30", Opts.EnableMapModWarnings, "EnableMapModWarnings", "EnableMapModWarningsH", "", "", "SettingsUI")
AddToolTip(EnableMapModWarningsH, "Enables or disables the entire Map Mod Warnings function.")
If (!SkipItemInfoUpdateCall) {
- GuiAddCheckbox("Update: Show Notifications", "xs10 yp+30 w250 h30", Opts.ShowUpdateNotification, "ShowUpdateNotification", "ShowUpdateNotificationH")
+ GuiAddCheckbox("Update: Show Notifications", "xs10 yp+30 w250 h30", Opts.ShowUpdateNotification, "ShowUpdateNotification", "ShowUpdateNotificationH", "", "", "SettingsUI")
AddToolTip(ShowUpdateNotificationH, "Notifies you when there's a new release available.")
- GuiAddCheckbox("Update: Skip folder selection", "xs10 yp+30 w250 h30", Opts.UpdateSkipSelection, "UpdateSkipSelection", "UpdateSkipSelectionH")
+ GuiAddCheckbox("Update: Skip folder selection", "xs10 yp+30 w250 h30", Opts.UpdateSkipSelection, "UpdateSkipSelection", "UpdateSkipSelectionH", "", "", "SettingsUI")
AddToolTip(UpdateSkipSelectionH, "Skips selecting an update location.`nThe current script directory will be used as default.")
- GuiAddCheckbox("Update: Skip backup", "xs10 yp+30 w250 h30", Opts.UpdateSkipBackup, "UpdateSkipBackup", "UpdateSkipBackupH")
+ GuiAddCheckbox("Update: Skip backup", "xs10 yp+30 w250 h30", Opts.UpdateSkipBackup, "UpdateSkipBackup", "UpdateSkipBackupH", "", "", "SettingsUI")
AddToolTip(UpdateSkipBackupH, "Skips making a backup of the install location/folder.")
}
; GDI+
GDIShift := SkipItemInfoUpdateCall ? 210 : 300
- GuiAddGroupBox("GDI+", "x7 ym+" GDIShift " w310 h320 Section")
+ GuiAddGroupBox("GDI+", "x7 ym+" GDIShift " w310 h320 Section", "", "", "", "", "SettingsUI")
- GuiAddCheckBox("Enable GDI+", "xs10 yp+20 w115", Opts.UseGDI, "UseGDI", "UseGDIH", "SettingsUI_ChkUseGDI")
+ GuiAddCheckBox("Enable GDI+", "xs10 yp+20 w115", Opts.UseGDI, "UseGDI", "UseGDIH", "SettingsUI_ChkUseGDI", "", "SettingsUI")
AddToolTip(UseGDIH, "Enables rendering of tooltips using Windows gdip.dll`n(allowing limited styling options).")
- GuiAddCheckBox("Rendering Fix", "xs10 yp+30 w115", Opts.GDIRenderingFix, "GDIRenderingFix", "GDIRenderingFixH")
+ GuiAddCheckBox("Rendering Fix", "xs10 yp+30 w115", Opts.GDIRenderingFix, "GDIRenderingFix", "GDIRenderingFixH", "", "", "SettingsUI")
AddToolTip(GDIRenderingFixH, "In the case that rendered graphics (window, border and text) are`nunsharp/blurry this should fix the issue.")
- GuiAddText("(Restart script after disabling GDI+. Enabling might cause general FPS drops.)", "xs120 ys+20 w185 cRed", "")
-
- GuiAddButton("Edit Window", "xs9 ys80 w80 h23", "SettingsUI_BtnGDIWindowColor", "BtnGDIWindowColor")
- GuiAddText("Color (hex RGB):", "xs100 ys85 w200", "LblGDIWindowColor")
- GuiAddEdit(Opts.GDIWindowColor, "xs240 ys82 w60", "GDIWindowColor", "GDIWindowColorH")
- GuiAddText("Opactiy (0-100):", "xs100 ys115 w200", "LblGDIWindowOpacity")
- GuiAddEdit(Opts.GDIWindowOpacity, "xs240 ys112 w60", "GDIWindowOpacity", "GDIWindowOpacityH")
- GuiAddButton("Edit Border", "xs9 ys140 w80 h23", "SettingsUI_BtnGDIBorderColor", "BtnGDIBorderColor")
- GuiAddText("Color (hex RGB):", "xs100 ys145 w200", "LblGDIBorderColor")
- GuiAddEdit(Opts.GDIBorderColor, "xs240 ys142 w60", "GDIBorderColor", "GDIBorderColorH")
- GuiAddText("Opacity (0-100):", "xs100 ys175 w200", "LblGDIBorderOpacity")
- GuiAddEdit(Opts.GDIBorderOpacity, "xs240 ys172 w60", "GDIBorderOpacity", "GDIBorderOpacityH")
- GuiAddButton("Edit Text", "xs9 ys200 w80 h23", "SettingsUI_BtnGDITextColor", "BtnGDITextColor")
- GuiAddText("Color (hex RGB):", "xs100 ys205 w200", "LblGDITextColor")
- GuiAddEdit(Opts.GDITextColor, "xs240 ys202 w60", "GDITextColor", "GDITextColorH")
- GuiAddText("Opacity (0-100):", "xs100 ys235 w200", "LblGDITextOpacity")
- GuiAddEdit(Opts.GDITextOpacity, "xs240 ys232 w60", "GDITextOpacity", "GDITextOpacityH")
- GuiAddCheckBox("Style border depending on checked item.", "xs10 ys260 w260", Opts.GDIConditionalColors, "GDIConditionalColors", "GDIConditionalColorsH")
-
- GuiAddButton("GDI Defaults", "xs9 ys290 w100 h23", "SettingsUI_BtnGDIDefaults", "BtnGDIDefaults", "BtnGDIDefaultsH")
- GuiAddButton("Preview", "xs210 ys290 w80 h23", "SettingsUI_BtnGDIPreviewTooltip", "BtnGDIPreviewTooltip", "BtnGDIPreviewTooltipH")
+ GuiAddText("(Restart script after disabling GDI+. Enabling might cause general FPS drops.)", "xs120 ys+20 w185 cRed", "", "", "", "", "SettingsUI")
+
+ GuiAddButton("Edit Window", "xs9 ys80 w80 h23", "SettingsUI_BtnGDIWindowColor", "BtnGDIWindowColor", "", "", "SettingsUI")
+ GuiAddText("Color (hex RGB):", "xs100 ys85 w200", "LblGDIWindowColor", "", "", "", "SettingsUI")
+ GuiAddEdit(Opts.GDIWindowColor, "xs240 ys82 w60", "GDIWindowColor", "GDIWindowColorH", "", "", "SettingsUI")
+ GuiAddText("Opactiy (0-100):", "xs100 ys115 w200", "LblGDIWindowOpacity", "", "", "", "SettingsUI")
+ GuiAddEdit(Opts.GDIWindowOpacity, "xs240 ys112 w60", "GDIWindowOpacity", "GDIWindowOpacityH", "", "", "SettingsUI")
+ GuiAddButton("Edit Border", "xs9 ys140 w80 h23", "SettingsUI_BtnGDIBorderColor", "BtnGDIBorderColor", "", "", "SettingsUI")
+ GuiAddText("Color (hex RGB):", "xs100 ys145 w200", "LblGDIBorderColor", "", "", "", "SettingsUI")
+ GuiAddEdit(Opts.GDIBorderColor, "xs240 ys142 w60", "GDIBorderColor", "GDIBorderColorH", "", "", "SettingsUI")
+ GuiAddText("Opacity (0-100):", "xs100 ys175 w200", "LblGDIBorderOpacity", "", "", "", "SettingsUI")
+ GuiAddEdit(Opts.GDIBorderOpacity, "xs240 ys172 w60", "GDIBorderOpacity", "GDIBorderOpacityH", "", "", "SettingsUI")
+ GuiAddButton("Edit Text", "xs9 ys200 w80 h23", "SettingsUI_BtnGDITextColor", "BtnGDITextColor", "", "", "SettingsUI")
+ GuiAddText("Color (hex RGB):", "xs100 ys205 w200", "LblGDITextColor", "", "", "", "SettingsUI")
+ GuiAddEdit(Opts.GDITextColor, "xs240 ys202 w60", "GDITextColor", "GDITextColorH", "", "", "SettingsUI")
+ GuiAddText("Opacity (0-100):", "xs100 ys235 w200", "LblGDITextOpacity", "", "", "", "SettingsUI")
+ GuiAddEdit(Opts.GDITextOpacity, "xs240 ys232 w60", "GDITextOpacity", "GDITextOpacityH", "", "", "SettingsUI")
+ GuiAddCheckBox("Style border depending on checked item.", "xs10 ys260 w260", Opts.GDIConditionalColors, "GDIConditionalColors", "GDIConditionalColorsH", "", "", "SettingsUI")
+
+ GuiAddButton("GDI Defaults", "xs9 ys290 w100 h23", "SettingsUI_BtnGDIDefaults", "BtnGDIDefaults", "BtnGDIDefaultsH", "", "SettingsUI")
+ GuiAddButton("Preview", "xs210 ys290 w80 h23", "SettingsUI_BtnGDIPreviewTooltip", "BtnGDIPreviewTooltip", "BtnGDIPreviewTooltipH", "", "SettingsUI")
; Tooltip
- GuiAddGroupBox("Tooltip", "x327 " topGroupBoxYPos " w310 h140 Section")
+ GuiAddGroupBox("Tooltip", "x327 " topGroupBoxYPos " w310 h140 Section", "", "", "", "", "SettingsUI")
- GuiAddEdit(Opts.MouseMoveThreshold, "xs250 yp+22 w50 h20 Number", "MouseMoveThreshold", "MouseMoveThresholdH")
- GuiAddText("Mouse move threshold (px):", "xs27 yp+3 w200 h20 0x0100", "LblMouseMoveThreshold", "LblMouseMoveThresholdH")
+ GuiAddEdit(Opts.MouseMoveThreshold, "xs250 yp+22 w50 h20 Number", "MouseMoveThreshold", "MouseMoveThresholdH", "", "", "SettingsUI")
+ GuiAddText("Mouse move threshold (px):", "xs27 yp+3 w200 h20 0x0100", "LblMouseMoveThreshold", "LblMouseMoveThresholdH", "", "", "SettingsUI")
AddToolTip(LblMouseMoveThresholdH, "Hide tooltip when the mouse cursor moved x pixel away from the initial position.`nEffectively permanent tooltip when using a value larger than the monitor diameter.")
- GuiAddEdit(Opts.ToolTipTimeoutSeconds, "xs250 yp+27 w50 Number", "ToolTipTimeoutSeconds")
- GuiAddCheckBox("Use tooltip timeout (seconds)", "xs10 yp+3 w200", Opts.UseTooltipTimeout, "UseTooltipTimeout", "UseTooltipTimeoutH", "SettingsUI_ChkUseTooltipTimeout")
+ GuiAddEdit(Opts.ToolTipTimeoutSeconds, "xs250 yp+27 w50 Number", "ToolTipTimeoutSeconds", "", "", "", "SettingsUI")
+ GuiAddCheckBox("Use tooltip timeout (seconds)", "xs10 yp+3 w200", Opts.UseTooltipTimeout, "UseTooltipTimeout", "UseTooltipTimeoutH", "SettingsUI_ChkUseTooltipTimeout", "", "SettingsUI")
AddToolTip(UseTooltipTimeoutH, "Hide tooltip automatically after defined time.")
- GuiAddCheckbox("Display at fixed coordinates", "xs10 yp+30 w280", Opts.DisplayToolTipAtFixedCoords, "DisplayToolTipAtFixedCoords", "DisplayToolTipAtFixedCoordsH", "SettingsUI_ChkDisplayToolTipAtFixedCoords")
+ GuiAddCheckbox("Display at fixed coordinates", "xs10 yp+30 w280", Opts.DisplayToolTipAtFixedCoords, "DisplayToolTipAtFixedCoords", "DisplayToolTipAtFixedCoordsH", "SettingsUI_ChkDisplayToolTipAtFixedCoords", "", "SettingsUI")
AddToolTip(DisplayToolTipAtFixedCoordsH, "Show tooltip in virtual screen space at the fixed`ncoordinates given below. Virtual screen space means`nthe full desktop frame, including any secondary`nmonitors. Coords are relative to the top left edge`nand increase going down and to the right.")
- GuiAddEdit(Opts.ScreenOffsetX, "xs50 yp+22 w50", "ScreenOffsetX")
- GuiAddEdit(Opts.ScreenOffsetY, "xs130 yp+0 w50", "ScreenOffsetY")
- GuiAddText("X", "xs35 yp+3 w15", "LblScreenOffsetX")
- GuiAddText("Y", "xs115 yp+0 w15", "LblScreenOffsetY")
+ GuiAddEdit(Opts.ScreenOffsetX, "xs50 yp+22 w50", "ScreenOffsetX", "", "", "", "SettingsUI")
+ GuiAddEdit(Opts.ScreenOffsetY, "xs130 yp+0 w50", "ScreenOffsetY", "", "", "", "SettingsUI")
+ GuiAddText("X", "xs35 yp+3 w15", "LblScreenOffsetX", "", "", "", "SettingsUI")
+ GuiAddText("Y", "xs115 yp+0 w15", "LblScreenOffsetY", "", "", "", "SettingsUI")
; Display
- GuiAddGroupBox("Display", "x327 ym+" 200 " w310 h295 Section")
+ GuiAddGroupBox("Display", "x327 ym+" 200 " w310 h295 Section", "", "", "", "", "SettingsUI")
- GuiAddCheckbox("Show header for affix overview", "xs10 yp+20 w260 h30", Opts.ShowHeaderForAffixOverview, "ShowHeaderForAffixOverview", "ShowHeaderForAffixOverviewH")
+ GuiAddCheckbox("Show header for affix overview", "xs10 yp+20 w260 h30", Opts.ShowHeaderForAffixOverview, "ShowHeaderForAffixOverview", "ShowHeaderForAffixOverviewH", "", "", "SettingsUI")
AddToolTip(ShowHeaderForAffixOverviewH, "Include a header above the affix overview:`n TierRange ilvl Total ilvl Tier")
- GuiAddCheckbox("Show explanation for used notation", "xs10 yp+30 w260 h30", Opts.ShowExplanationForUsedNotation, "ShowExplanationForUsedNotation", "ShowExplanationForUsedNotationH")
+ GuiAddCheckbox("Show explanation for used notation", "xs10 yp+30 w260 h30", Opts.ShowExplanationForUsedNotation, "ShowExplanationForUsedNotation", "ShowExplanationForUsedNotationH", "", "", "SettingsUI")
AddToolTip(ShowExplanationForUsedNotationH, "Explain abbreviations and special notation symbols at`nthe end of the tooltip when they are used")
- GuiAddEdit(Opts.AffixTextEllipsis, "xs260 y+5 w40 h20", "AffixTextEllipsis")
- GuiAddText("Affix text ellipsis:", "xs10 yp+3 w170 h20 0x0100", "LblAffixTextEllipsis", "AffixTextEllipsisH")
+ GuiAddEdit(Opts.AffixTextEllipsis, "xs260 y+5 w40 h20", "AffixTextEllipsis", "", "", "", "SettingsUI")
+ GuiAddText("Affix text ellipsis:", "xs10 yp+3 w170 h20 0x0100", "LblAffixTextEllipsis", "AffixTextEllipsisH", "", "", "SettingsUI")
AddToolTip(AffixTextEllipsisH, "Symbol used when affix text is shortened, such as:`n50% increased Spell…")
- GuiAddEdit(Opts.AffixColumnSeparator, "xs260 y+7 w40 h20", "AffixColumnSeparator")
- GuiAddText("Affix column separator:", "xs10 yp+3 w170 h20 0x0100", "LblAffixColumnSeparator", "AffixColumnSeparatorH")
+ GuiAddEdit(Opts.AffixColumnSeparator, "xs260 y+7 w40 h20", "AffixColumnSeparator", "", "", "", "SettingsUI")
+ GuiAddText("Affix column separator:", "xs10 yp+3 w170 h20 0x0100", "LblAffixColumnSeparator", "AffixColumnSeparatorH", "", "", "SettingsUI")
AddToolTip(AffixColumnSeparatorH, "Select separator (default: 2 spaces) for the \\ spots:`n50% increased Spell…\\50-59 (46)\\75-79 (84)\\T4 P")
- GuiAddEdit(Opts.DoubleRangeSeparator, "xs260 y+7 w40 h20", "DoubleRangeSeparator")
- GuiAddText("Double range separator:", "xs10 yp+3 w170 h20 0x0100", "LblDoubleRangeSeparator", "DoubleRangeSeparatorH")
+ GuiAddEdit(Opts.DoubleRangeSeparator, "xs260 y+7 w40 h20", "DoubleRangeSeparator", "", "", "", "SettingsUI")
+ GuiAddText("Double range separator:", "xs10 yp+3 w170 h20 0x0100", "LblDoubleRangeSeparator", "DoubleRangeSeparatorH", "", "", "SettingsUI")
AddToolTip(DoubleRangeSeparatorH, "Select separator (default: | ) for double ranges from 'added damage' mods:`na-b to c-d is displayed as a-b|c-d")
- GuiAddCheckbox("Use compact double ranges", "xs10 y+3 w210 h30", Opts.UseCompactDoubleRanges, "UseCompactDoubleRanges", "UseCompactDoubleRangesH", "SettingsUI_ChkUseCompactDoubleRanges")
+ GuiAddCheckbox("Use compact double ranges", "xs10 y+3 w210 h30", Opts.UseCompactDoubleRanges, "UseCompactDoubleRanges", "UseCompactDoubleRangesH", "SettingsUI_ChkUseCompactDoubleRanges", "", "SettingsUI")
AddToolTip(UseCompactDoubleRangesH, "Show double ranges from 'added damage' mods as one range,`ne.g. a-b to c-d becomes a-d")
- GuiAddCheckbox("Only compact for 'Total' column", "xs30 yp+30 w210 h30", Opts.OnlyCompactForTotalColumn, "OnlyCompactForTotalColumn", "OnlyCompactForTotalColumnH")
+ GuiAddCheckbox("Only compact for 'Total' column", "xs30 yp+30 w210 h30", Opts.OnlyCompactForTotalColumn, "OnlyCompactForTotalColumn", "OnlyCompactForTotalColumnH", "", "", "SettingsUI")
AddToolTip(OnlyCompactForTotalColumnH, "Only use compact double ranges for the second range column`nin the affix overview (with the header 'total')")
- GuiAddEdit(Opts.MultiTierRangeSeparator, "xs260 y+6 w40 h20", "MultiTierRangeSeparator")
- GuiAddText("Multi tier range separator:", "xs10 yp+3 w170 h20 0x0100", "LblMultiTierRangeSeparator", "MultiTierRangeSeparatorH")
+ GuiAddEdit(Opts.MultiTierRangeSeparator, "xs260 y+6 w40 h20", "MultiTierRangeSeparator", "", "", "", "SettingsUI")
+ GuiAddText("Multi tier range separator:", "xs10 yp+3 w170 h20 0x0100", "LblMultiTierRangeSeparator", "MultiTierRangeSeparatorH", "", "", "SettingsUI")
AddToolTip(MultiTierRangeSeparatorH, "Select separator (default: … ) for a multi tier roll range with uncertainty:`n83% increased Light… 73-85…83-95 102-109 (84) T1-4 P + T1-6 S`n There--^")
- GuiAddEdit(Opts.FontSize, "xs260 y+6 w40 h20 Number", "FontSize")
- GuiAddText("Font Size:", "xs10 yp+3 w180 h20 0x0100")
+ GuiAddEdit(Opts.FontSize, "xs260 y+6 w40 h20 Number", "FontSize", "", "", "", "SettingsUI")
+ GuiAddText("Font Size:", "xs10 yp+3 w180 h20 0x0100", "", "", "", "", "SettingsUI")
; Buttons
ButtonsShiftX := "x659 "
- GuiAddText("Mouse over settings or see the GitHub Wiki page for comments on what these settings do exactly.", ButtonsShiftX " y63 w290 h30 0x0100")
+ GuiAddText("Mouse over settings or see the GitHub Wiki page for comments on what these settings do exactly.", ButtonsShiftX " y63 w290 h30 0x0100", "", "", "", "", "SettingsUI")
- GuiAddButton("Defaults", ButtonsShiftX "y+8 w90 h23", "SettingsUI_BtnDefaults")
- GuiAddButton("OK", "Default x+5 yp+0 w90 h23", "SettingsUI_BtnOK")
- GuiAddButton("Cancel", "x+5 yp+0 w90 h23", "SettingsUI_BtnCancel")
+ GuiAddButton("Defaults", ButtonsShiftX "y+8 w90 h23", "SettingsUI_BtnDefaults", "", "", "", "SettingsUI")
+ GuiAddButton("OK", "Default x+5 yp+0 w90 h23", "SettingsUI_BtnOK", "", "", "", "SettingsUI")
+ GuiAddButton("Cancel", "x+5 yp+0 w90 h23", "SettingsUI_BtnCancel", "", "", "", "SettingsUI")
If (SkipItemInfoUpdateCall) {
- GuiAddText("Use these buttons to change ItemInfo and AdditionalMacros settings (TradeMacro has it's own buttons).", ButtonsShiftX "y+10 w250 h50 cRed")
- GuiAddText("", "x10 y10 w250 h10")
- }
+ GuiAddText("Use these buttons to change ItemInfo and AdditionalMacros settings (TradeMacro has it's own buttons).", ButtonsShiftX "y+10 w250 h50 cRed", "", "", "", "", "SettingsUI")
+ GuiAddText("", "x10 y10 w250 h10", "", "", "", "", "SettingsUI")
+ }
; Begin Additional Macros Tab
If (SkipItemInfoUpdateCall) {
- Gui, Tab, 3
+ Gui, SettingsUI:Tab, 3
} Else {
- Gui, Tab, 2
+ Gui, SettingsUI:Tab, 2
}
; AM Hotkeys
- GuiAddGroupBox("[AdditionalMacros] Hotkeys", "x7 " topGroupBoxYPos " w630 h625")
+ GuiAddGroupBox("[AdditionalMacros] Hotkeys", "x7 " topGroupBoxYPos " w630 h625", "", "", "", "", "SettingsUI")
If (not AM_Config) {
GoSub, AM_Init
@@ -9846,19 +9851,19 @@ CreateSettingsUI()
If (sectionName != "General") {
; hotkey checkboxes (enable/disable)
HKCheckBoxID := "AM_" sectionName "_State"
- GuiAddCheckbox(sectionName ":", "x17 yp+" chkBoxShiftY " w" chkBoxWidth " h20 0x0100", AM_Config[sectionName].State, HKCheckBoxID, HKCheckBoxID "H")
+ GuiAddCheckbox(sectionName ":", "x17 yp+" chkBoxShiftY " w" chkBoxWidth " h20 0x0100", AM_Config[sectionName].State, HKCheckBoxID, HKCheckBoxID "H", "", "", "SettingsUI")
AddToolTip(%HKCheckBoxID%H, RegExReplace(AM_ConfigDefault[sectionName].Description, "i)(\(Default = .*\))|\\n", "`n$1")) ; read description from default config
For keyIndex, keyValue in StrSplit(AM_Config[sectionName].Hotkeys, ", ") {
HotKeyID := "AM_" sectionName "_HotKeys_" keyIndex
LV_shiftY := keyIndex > 1 ? 1 : 0
- GuiAddListView("1|2", "x+10 yp+" LV_shiftY " h20 w" LVWidth, HotKeyID, HotKeyID "H", "", "r1 -Hdr -LV0x20 r1 C454444 Backgroundf0f0f0")
+ GuiAddListView("1|2", "x+10 yp+" LV_shiftY " h20 w" LVWidth, HotKeyID, HotKeyID "H", "", "r1 -Hdr -LV0x20 r1 C454444 Backgroundf0f0f0", "SettingsUI")
LV_ModifyCol(1, 0)
LV_ModifyCol(2, LVWidth - 5)
LV_Delete(1)
LV_Add("","", keyValue)
- GuiAddButton("Edit", "xp+" LVWidth " yp-1 w30 h22 v" HotKeyID "_Trigger", "LV_HotkeyEdit")
+ GuiAddButton("Edit", "xp+" LVWidth " yp-1 w30 h22 v" HotKeyID "_Trigger", "LV_HotkeyEdit", "", "", "", "SettingsUI")
}
For keyIndex, keyValue in AM_Config[sectionName] {
@@ -9866,35 +9871,35 @@ CreateSettingsUI()
If (RegExMatch(sectionName, "i)HighlightItems|HighlightItemsAlt")) {
If (keyIndex = "Arg2") {
CheckBoxID := "AM_" sectionName "_Arg2"
- GuiAddCheckbox("Leave search field.", "x" 17 + chkBoxWidth + 10 " yp+" chkBoxShiftY, keyValue, CheckBoxID, CheckBoxID "H")
+ GuiAddCheckbox("Leave search field.", "x" 17 + chkBoxWidth + 10 " yp+" chkBoxShiftY, keyValue, CheckBoxID, CheckBoxID "H", "", "", "SettingsUI")
}
If (keyIndex = "Arg3") {
CheckBoxID := "AM_" sectionName "_Arg3"
- GuiAddCheckbox("Enable hideout stash search.", "x+10 yp+0", keyValue, CheckBoxID, CheckBoxID "H")
+ GuiAddCheckbox("Enable hideout stash search.", "x+10 yp+0", keyValue, CheckBoxID, CheckBoxID "H", "", "", "SettingsUI")
}
If (keyIndex = "Arg4") {
EditID := "AM_" sectionName "_" keyIndex
- GuiAddText("Decoration stash search field coordinates: ", "x" 17 + chkBoxWidth + 10 " yp+" chkBoxShiftY " w260 h20 0x0100", "LblHighlighting", "LblHighlightingH")
+ GuiAddText("Decoration stash search field coordinates: ", "x" 17 + chkBoxWidth + 10 " yp+" chkBoxShiftY " w260 h20 0x0100", "LblHighlighting", "LblHighlightingH", "", "", "SettingsUI")
AddToolTip(LblHighlightingH, "Refers to the decoration stash on the right side`nof the screen, not the master vendor window.`n`nCoordinates are relative to the PoE game window and`nare neccessary to click into/focus the search field.")
- GuiAddPicture(A_ScriptDir "\resources\images\info-blue.png", "x+-15 yp+0 w15 h-1 0x0100", "HighlightInfo", "HighlightH", "")
- GuiAddText("x= ", "x+5 yp+0 w20 h20 0x0100")
- GuiAddEdit(keyValue, "x+0 yp-2 w40 h20", EditID)
+ GuiAddPicture(A_ScriptDir "\resources\images\info-blue.png", "x+-15 yp+0 w15 h-1 0x0100", "HighlightInfo", "HighlightH", "", "", "SettingsUI")
+ GuiAddText("x= ", "x+5 yp+0 w20 h20 0x0100", "", "", "", "", "SettingsUI")
+ GuiAddEdit(keyValue, "x+0 yp-2 w40 h20", EditID, "", "", "", "SettingsUI")
}
If (keyIndex = "Arg5") {
EditID := "AM_" sectionName "_" keyIndex
- GuiAddText("y=", "x+5 yp+2 w20 h20 0x0100")
- GuiAddEdit(keyValue, "x+0 yp-2 w40 h20", EditID)
+ GuiAddText("y=", "x+5 yp+2 w20 h20 0x0100", "", "", "", "", "SettingsUI")
+ GuiAddEdit(keyValue, "x+0 yp-2 w40 h20", EditID, "", "", "", "SettingsUI")
}
}
Else If (RegExMatch(sectionName, "i)JoinChannel|KickYourself")) {
EditID := "AM_" sectionName "_" keyIndex
- GuiAddText(keyIndex ":", "x+10 yp+4 w85 h20 0x0100")
- GuiAddEdit(keyValue, "x+0 yp-2 w99 h20", EditID)
+ GuiAddText(keyIndex ":", "x+10 yp+4 w85 h20 0x0100", "", "", "", "", "SettingsUI")
+ GuiAddEdit(keyValue, "x+0 yp-2 w99 h20", EditID, "", "", "", "SettingsUI")
}
Else {
EditID := "AM_" sectionName "_" keyIndex
- GuiAddText(keyIndex ":", "x" 17 + chkBoxWidth + 10 " yp+" chkBoxShiftY " w85 h20 0x0100")
- GuiAddEdit(keyValue, "x+0 yp-2 w99 h20", EditID)
+ GuiAddText(keyIndex ":", "x" 17 + chkBoxWidth + 10 " yp+" chkBoxShiftY " w85 h20 0x0100", "", "", "", "", "SettingsUI")
+ GuiAddEdit(keyValue, "x+0 yp-2 w99 h20", EditID, "", "", "", "SettingsUI")
}
}
}
@@ -9903,17 +9908,17 @@ CreateSettingsUI()
; AM General
- GuiAddGroupBox("[AdditionalMacros] General", "x647 " topGroupBoxYPos " w310 h60")
+ GuiAddGroupBox("[AdditionalMacros] General", "x647 " topGroupBoxYPos " w310 h60", "", "", "", "", "SettingsUI")
_i := 0
For keyIndex, keyValue in AM_Config.General {
If (not RegExMatch(keyIndex, ".*_Description$")) {
elementYPos := _i > 0 ? 20 : 30
-
+
If (RegExMatch(keyIndex, ".*State$") and not (InStr(keyIndex, "KeyToSC", 0))) {
RegExMatch(AM_ConfigDefault.General[keyIndex "_Description"], ".*Short\$(.*)Long\$(.*)""", _description) ; read description from default config
ControlID := "AM_General_" keyIndex
- GuiAddCheckbox(Trim(_description1), "x657 yp+" elementYPos " w250 h30", AM_Config.General[keyIndex], ControlID, ControlID "H")
+ GuiAddCheckbox(Trim(_description1), "x657 yp+" elementYPos " w250 h30", AM_Config.General[keyIndex], ControlID, ControlID "H", "", "", "SettingsUI")
AddToolTip(%ControlID%H, Trim(_description2))
}
_i++
@@ -9922,73 +9927,78 @@ CreateSettingsUI()
; AM Buttons
- GuiAddText("Mouse over settings or see the GitHub Wiki page for comments on what these settings do exactly.", ButtonsShiftX "yp+60 w290 h30 0x0100")
- GuiAddButton("Defaults", "xp-5 y+8 w90 h23", "SettingsUI_AM_BtnDefaults")
- GuiAddButton("OK", "Default x+5 yp+0 w90 h23", "SettingsUI_BtnOK")
- GuiAddButton("Cancel", "x+5 yp+0 w90 h23", "SettingsUI_BtnCancel")
- GuiAddText("Any change here currently requires a script restart!", ButtonsShiftX "y+10 w280 h50 cGreen")
+ GuiAddText("Mouse over settings or see the GitHub Wiki page for comments on what these settings do exactly.", ButtonsShiftX "yp+60 w290 h30 0x0100", "", "", "", "", "SettingsUI")
+ GuiAddButton("Defaults", "xp-5 y+8 w90 h23", "SettingsUI_AM_BtnDefaults", "", "", "", "SettingsUI")
+ GuiAddButton("OK", "Default x+5 yp+0 w90 h23", "SettingsUI_BtnOK", "", "", "", "SettingsUI")
+ GuiAddButton("Cancel", "x+5 yp+0 w90 h23", "SettingsUI_BtnCancel", "", "", "", "SettingsUI")
+ GuiAddText("Any change here currently requires a script restart!", ButtonsShiftX "y+10 w280 h50 cGreen", "", "", "", "", "SettingsUI")
If (SkipItemInfoUpdateCall) {
- GuiAddText("Use these buttons to change ItemInfo and AdditionalMacros settings (TradeMacro has it's own buttons).", ButtonsShiftX "y+5 w280 h50 cRed")
+ GuiAddText("Use these buttons to change ItemInfo and AdditionalMacros settings (TradeMacro has it's own buttons).", ButtonsShiftX "y+5 w280 h50 cRed", "", "", "", "", "SettingsUI")
}
- GuiAddText("Experimental Feature!", ButtonsShiftX "y+35 w280 h200 cRed")
+ GuiAddText("Experimental Feature!", ButtonsShiftX "y+35 w280 h200 cRed", "", "", "", "", "SettingsUI")
experimentalNotice := "This new feature to assign hotkeys may cause issues for users with non-latin keyboard layouts."
experimentalNotice .= "`n`n" . "AHKs default UI element for selecting hotkeys doesn't support any special keys and mouse buttons."
experimentalNotice .= "`n`n" . "Please report any issues that you are experiencing."
experimentalNotice .= " You can still assign your settings directly using the AdditionalMacros.ini like before."
experimentalNotice .= " (Right-click system tray icon -> Edit Files)."
- GuiAddText(experimentalNotice, ButtonsShiftX "yp+25 w290")
+ GuiAddText(experimentalNotice, ButtonsShiftX "yp+25 w290", "", "", "", "", "SettingsUI")
; Begin Lutbot Tab
If (SkipItemInfoUpdateCall) {
- Gui, Tab, 4
+ Gui, SettingsUI:Tab, 4
} Else {
- Gui, Tab, 3
+ Gui, SettingsUI:Tab, 3
}
- GuiAddGroupBox("[Lutbot Logout]", "x7 " topGroupBoxYPos " w630 h625")
+ GuiAddGroupBox("[Lutbot Logout]", "x7 " topGroupBoxYPos " w630 h625", "", "", "", "", "SettingsUI")
lb_desc := "Lutbot's macro is a collection of features like TCP disconnect logout, whisper replies, ladder tracker and more.`n"
lb_desc .= "The included logout macro is the most advanced logout feature currently out there."
- GuiAddText(lb_desc, "x17 yp+28 w600 h40 0x0100", "", "")
+ GuiAddText(lb_desc, "x17 yp+28 w600 h40 0x0100", "", "", "", "", "SettingsUI")
lb_desc := "Since running the main version of this script alongside " Globals.Get("Projectname") " can cause some issues`n"
lb_desc .= "and hotkey conflicts, Lutbot also released a lite version that only contains the logout features."
- GuiAddText(lb_desc, "x17 y+10 w600 h35 0x0100", "", "")
+ GuiAddText(lb_desc, "x17 y+10 w600 h35 0x0100", "", "", "", "", "SettingsUI")
- Gui, Add, Link, x17 y+5 cBlue, Website and download
+ Gui, SettingsUI:Add, Link, x17 y+5 cBlue, Website and download
lb_desc := Globals.Get("Projectname") " can manage running this lite version for you, keeping it an independant script."
- GuiAddText(lb_desc, "x17 y+20 w600 h20 0x0100", "", "")
+ GuiAddText(lb_desc, "x17 y+20 w600 h20 0x0100", "", "", "", "", "SettingsUI")
- GuiAddCheckbox("Run lutbot on script start if the lutbot macro exists (requires you to have run it once before).", "x17 yp+20 w600 h30", Opts.Lutbot_CheckScript, "Lutbot_CheckScript", "Lutbot_CheckScriptH")
+ GuiAddCheckbox("Run lutbot on script start if the lutbot macro exists (requires you to have run it once before).", "x17 yp+20 w600 h30", Opts.Lutbot_CheckScript, "Lutbot_CheckScript", "Lutbot_CheckScriptH", "", "", "SettingsUI")
- GuiAddCheckbox("Warn in case of hotkey conflicts", "x17 yp+30 w290 h30", Opts.Lutbot_WarnConflicts, "Lutbot_WarnConflicts", "Lutbot_WarnConflictsH")
+ GuiAddCheckbox("Warn in case of hotkey conflicts", "x17 yp+30 w290 h30", Opts.Lutbot_WarnConflicts, "Lutbot_WarnConflicts", "Lutbot_WarnConflictsH", "", "", "SettingsUI")
AddToolTip(Lutbot_CheckScriptH, "Check if the lutbot macro exists and run it.")
- GuiAddButton("Open Lutbot folder", "Default x17 y+10 w130 h23", "OpenLutbotDocumentsFolder")
+ GuiAddButton("Open Lutbot folder", "Default x17 y+10 w130 h23", "OpenLutbotDocumentsFolder", "", "", "", "SettingsUI")
lb_desc := "If you have any issues related to"
- GuiAddText(lb_desc, "x17 y+40 w600 h20 0x0100", "", "")
+ GuiAddText(lb_desc, "x17 y+40 w600 h20 0x0100", "", "", "", "", "SettingsUI")
lb_desc := "- " Globals.Get("Projectname") " starting the lutbot script or checking for conflicts report here:"
- GuiAddText(lb_desc, "x17 y+0 w600 h20 0x0100", "", "")
- Gui, Add, Link, x35 y+5 cBlue h20, - Github
- Gui, Add, Link, x35 y+0 cBlue h20, - Discord
- Gui, Add, Link, x35 y+0 cBlue h20, - Forum
+ GuiAddText(lb_desc, "x17 y+0 w600 h20 0x0100", "", "", "", "", "SettingsUI")
+ Gui, SettingsUI:Add, Link, x35 y+5 cBlue h20, - Github
+ Gui, SettingsUI:Add, Link, x35 y+0 cBlue h20, - Discord
+ Gui, SettingsUI:Add, Link, x35 y+0 cBlue h20, - Forum
lb_desc := "- Lutbots script not working correctly in any way report here:"
- GuiAddText(lb_desc, "x17 y+5 w600 h20 0x0100", "", "")
- Gui, Add, Link, x35 y+5 cBlue h20, - Discord
+ GuiAddText(lb_desc, "x17 y+5 w600 h20 0x0100", "", "", "", "", "SettingsUI")
+ Gui, SettingsUI:Add, Link, x35 y+5 cBlue h20, - Discord
; Lutbot Buttons
- GuiAddText("Mouse over settings to see what these settings do exactly.", ButtonsShiftX "y60 w290 h30 0x0100")
- GuiAddButton("OK", "Default xp-5 y+8 w90 h23", "SettingsUI_BtnOK")
- GuiAddButton("Cancel", "x+5 yp+0 w90 h23", "SettingsUI_BtnCancel")
+ GuiAddText("Mouse over settings to see what these settings do exactly.", ButtonsShiftX "y60 w290 h30 0x0100", "", "", "", "", "SettingsUI")
+ GuiAddButton("OK", "Default xp-5 y+8 w90 h23", "SettingsUI_BtnOK", "", "", "", "SettingsUI")
+ GuiAddButton("Cancel", "x+5 yp+0 w90 h23", "SettingsUI_BtnCancel", "", "", "", "SettingsUI")
; close tabs
- Gui, Tab
+ Gui, SettingsUI:Tab
+
+ GoSub, SettingsUI_ChkUseCompactDoubleRanges
+ GoSub, SettingsUI_ChkDisplayToolTipAtFixedCoords
+ GoSub, SettingsUI_ChkUseTooltipTimeout
+ GoSub, SettingsUI_ChkUseGDI
}
UpdateSettingsUI()
@@ -10118,7 +10128,7 @@ ShowSettingsUI()
; The TradeMacro needs much more space for all the options.
SettingsUIHeight := Globals.Get("SettingsUIHeight", 615)
SettingsUITitle := Globals.Get("SettingsUITitle", "PoE ItemInfo Settings")
- Gui, Show, w%SettingsUIWidth% h%SettingsUIHeight%, %SettingsUITitle%
+ Gui, SettingsUI:Show, w%SettingsUIWidth% h%SettingsUIHeight%, %SettingsUITitle%
}
ShowUpdateNotes()
@@ -10536,8 +10546,8 @@ ShowAssignedHotkeys(returnList = false) {
Gui, ShowHotkeys:Color, ffffff, ffffff
Gui, ShowHotkeys:Add, Text, , List of this scripts assigned hotkeys.
Gui, ShowHotkeys:Default
- Gui, Font, , Courier New
- Gui, Font, , Consolas
+ Gui, ShowHotkeys:Font, , Courier New
+ Gui, ShowHotkeys:Font, , Consolas
Gui, ShowHotkeys:Add, ListView, r25 w800 NoSortHdr Grid ReadOnly, Type | Enabled | Level | Running | Key combination (Code) | Key combination (ENG name)
For key, val in hotkeys {
If (key != 1) {
@@ -10565,7 +10575,7 @@ ShowAssignedHotkeys(returnList = false) {
Gui, ShowHotkeys:Add, Text, , % text
Gui, ShowHotkeys:Show, w820 xCenter yCenter, Assigned Hotkeys
- Gui, 1:Default
+ Gui, SettingsUI:Default
Gui, Font
}
@@ -11451,7 +11461,7 @@ ShowSettingsUI:
SettingsUI_BtnOK:
Global Opts
- Gui, Submit
+ Gui, SettingsUI:Submit
Sleep, 50
WriteConfig()
AM_WriteConfig()
@@ -11460,11 +11470,11 @@ SettingsUI_BtnOK:
return
SettingsUI_BtnCancel:
- Gui, Cancel
+ Gui, SettingsUI:Cancel
return
SettingsUI_BtnDefaults:
- Gui, Cancel
+ Gui, SettingsUI:Cancel
RemoveConfig()
Sleep, 75
CopyDefaultConfig()
@@ -11476,7 +11486,7 @@ SettingsUI_BtnDefaults:
return
SettingsUI_AM_BtnDefaults:
- Gui, Cancel
+ Gui, SettingsUI:Cancel
RemoveConfig("AdditionalMacros.ini")
Sleep, 75
CopyDefaultConfig("AdditionalMacros.ini")
@@ -11788,9 +11798,9 @@ ShowAssignedHotkeys:
Gui, 3:Cancel
return
-GuiEscape:
+SettingsUIGuiEscape:
; settings
- Gui, Cancel
+ Gui, SettingsUI:Cancel
Return
AboutGuiEscape:
@@ -11833,9 +11843,9 @@ CheckForUpdates:
hasUpdate := PoEScripts_Update(globalUpdateInfo.user, globalUpdateInfo.repo, globalUpdateInfo.releaseVersion, globalUpdateInfo.skipUpdateCheck, userDirectory, isDevVersion, globalUpdateInfo.skipSelection, globalUpdateInfo.skipBackup)
If (hasUpdate = "no update" and not firstUpdateCheck) {
- SplashTextOn, , , No update available
+ SplashUI.SetSubMessage("No update available")
Sleep 2000
- SplashTextOff
+ SplashUI.DestroyUI()
}
return
@@ -12697,7 +12707,9 @@ StartLutbot:
Return
OpenLutbotDocumentsFolder:
- OpenUserSettingsFolder("Lutbot", A_MyDocuments "\AutoHotKey\LutTools")
+ ;OpenUserSettingsFolder("Lutbot", A_MyDocuments "\AutoHotKey\LutTools")
+ LutBotSettings.launcherPath
+ OpenUserSettingsFolder("Lutbot", LutBotSettings.launcherPath)
Return
CheckForLutBotHotkeyConflicts(hotkeys, config) {
@@ -12844,7 +12856,7 @@ AssignHotKey(Label, key, vkey, enabledState = "on") {
}
ShowHotKeyConflictUI(hkeyObj, hkey, hkeyLabel, oldLabel = "", preventedAssignment = false) {
- SplashTextOff
+ SplashUI.DestroyUI()
Gui, HotkeyConflict:Destroy
Gui, HotkeyConflict:Font,, Consolas
diff --git a/resources/ahk/TradeMacro.ahk b/resources/ahk/TradeMacro.ahk
index f486858c..2eba4215 100644
--- a/resources/ahk/TradeMacro.ahk
+++ b/resources/ahk/TradeMacro.ahk
@@ -584,10 +584,6 @@ TradeFunc_Main(openSearchInBrowser = false, isAdvancedPriceCheck = false, isAdva
Item.UsedInSearch.iLvl.min := 35
Item.UsedInSearch.iLvl.max := 49
}
- Else If (Item.MaxSockets = 5) {
- RequestParams.ilevel_min := 35
- Item.UsedInSearch.iLvl.min := 35
- }
; is (no 1-hand or shield or unset ring or helmet or glove or boots) but is weapon or armor
Else If ((not Item.IsFourSocket and not Item.IsThreeSocket and not Item.IsSingleSocket) and (Item.IsWeapon or Item.IsArmour) and Item.Level < 35) {
RequestParams.ilevel_max := 34
@@ -734,6 +730,9 @@ TradeFunc_Main(openSearchInBrowser = false, isAdvancedPriceCheck = false, isAdva
Else If (Item.IsElderBase) {
RequestParams.Elder := 1
}
+ } Else {
+ RequestParams.Shaper := ""
+ RequestParams.Elder := ""
}
; abyssal sockets
@@ -851,21 +850,26 @@ TradeFunc_Main(openSearchInBrowser = false, isAdvancedPriceCheck = false, isAdva
}
}
- If (Item.IsShaperBase) {
- RequestParams.Shaper := 1
- Item.UsedInSearch.specialBase := "Shaper"
- }
- Else {
- RequestParams.Shaper := 0
- }
-
- If (Item.IsElderBase) {
- RequestParams.Elder := 1
- Item.UsedInSearch.specialBase := "Elder"
- }
- Else {
- RequestParams.Elder := 0
- }
+ If (isAdvancedPriceCheckRedirect and not TradeGlobals.Get("AdvancedPriceCheckItem").useSpecialBase) {
+ RequestParams.Shaper := ""
+ RequestParams.Elder := ""
+ } Else {
+ If (Item.IsShaperBase) {
+ RequestParams.Shaper := 1
+ Item.UsedInSearch.specialBase := "Shaper"
+ }
+ Else {
+ RequestParams.Shaper := 0
+ }
+
+ If (Item.IsElderBase) {
+ RequestParams.Elder := 1
+ Item.UsedInSearch.specialBase := "Elder"
+ }
+ Else {
+ RequestParams.Elder := 0
+ }
+ }
}
Else {
RequestParams.xtype := (Item.xtype) ? Item.xtype : Item.SubType
@@ -2177,6 +2181,7 @@ TradeFunc_DoCurrencyRequest(currencyName = "", openSearchInBrowser = false, init
If (init) {
Url := "http://currency.poe.trade/"
+ SplashUI.SetSubMessage("Looking up poe.trade currency IDs...")
}
Else {
LeagueName := TradeGlobals.Get("LeagueName")
@@ -5361,7 +5366,7 @@ Return
TradeSettingsUI_BtnOK:
Global TradeOpts
- Gui, Submit
+ Gui, SettingsUI:Submit
SavedTradeSettings := true
Sleep, 50
WriteTradeConfig()
@@ -5369,11 +5374,11 @@ TradeSettingsUI_BtnOK:
Return
TradeSettingsUI_BtnCancel:
- Gui, Cancel
+ Gui, SettingsUI:Cancel
Return
TradeSettingsUI_BtnDefaults:
- Gui, Cancel
+ Gui, SettingsUI:Cancel
Sleep, 75
ReadTradeConfig(A_ScriptDir "\resources\default_UserFiles")
Sleep, 75
@@ -5652,7 +5657,7 @@ TradeFunc_ChangeLeague() {
NewSearchLeague := (next) ? next : first
; Call Submit for the settings UI, otherwise we can't set the new league if the UI was last closed via close button or "x"
- Gui, Submit
+ Gui, SettingsUI:Submit
SearchLeague := TradeFunc_CheckIfLeagueIsActive(NewSearchLeague)
TradeGlobals.Set("LeagueName", TradeGlobals.Get("Leagues")[SearchLeague])
WriteTradeConfig()
diff --git a/resources/ahk/TradeMacroInit.ahk b/resources/ahk/TradeMacroInit.ahk
index aaf572db..a66e1b7f 100644
--- a/resources/ahk/TradeMacroInit.ahk
+++ b/resources/ahk/TradeMacroInit.ahk
@@ -4,15 +4,18 @@
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Persistent ; Stay open in background
+;#Warn, ALL, OutputDebug
+;#Warn, UseUnsetGlobal, Off
+;#Warn, UseUnsetLocal, Off
+
SetWorkingDir, %A_ScriptDir%
-#Include, %A_ScriptDir%\lib\JSON.ahk ; https://autohotkey.com/boards/viewtopic.php?f=6&t=53
+;#Include, %A_ScriptDir%\lib\JSON.ahk ; https://autohotkey.com/boards/viewtopic.php?f=6&t=53
#Include, %A_ScriptDir%\lib\Class_Console.ahk ; Console https://autohotkey.com/boards/viewtopic.php?f=6&t=2116
-#Include, %A_ScriptDir%\lib\DebugPrintArray.ahk
+;#Include, %A_ScriptDir%\lib\DebugPrintArray.ahk
#Include, %A_ScriptDir%\lib\AssociatedProgram.ahk
-#Include, %A_ScriptDir%\lib\EasyIni.ahk
+;#Include, %A_ScriptDir%\lib\EasyIni.ahk
#Include, %A_ScriptDir%\lib\ConvertKeyToKeyCode.ahk
-#Include, %A_ScriptDir%\resources\ahk\jsonData.ahk
#Include, %A_ScriptDir%\resources\VersionTrade.txt
TradeMsgWrongAHKVersion := "AutoHotkey v" . TradeAHKVersionRequired . " or later is needed to run this script. `n`nYou are using AutoHotkey v" . A_AhkVersion . " (installed at: " . A_AhkPath . ")`n`nPlease go to http://ahkscript.org to download the most recent version."
@@ -36,8 +39,10 @@ Menu, Tray, Add, Open Wiki/FAQ, OpenGithubWikiFromMenu
argumentSkipSplash = %6%
If (not argumentSkipSplash) {
- TradeFunc_StartSplashScreen()
+ TradeFunc_StartSplashScreen(TradeReleaseVersion)
}
+SplashUI.SetSubMessage("Parsing data files...")
+#Include, %A_ScriptDir%\resources\ahk\jsonData.ahk
class TradeGlobals {
Set(name, value) {
@@ -65,6 +70,7 @@ global SavedTradeSettings := false
; TradeOpts_New := class_EasyIni(A_ScriptDir "\resources\default_UserFiles\config_trade.ini")
; }
+SplashUI.SetSubMessage("Reading PoE-TradeMacro config...")
TradeOpts_New := class_EasyIni(A_ScriptDir "\resources\default_UserFiles\config_trade.ini")
MakeOldTradeOptsAndVars(TradeOpts_New)
@@ -99,7 +105,7 @@ If (!StrLen(argumentProjectName) > 0) {
fallbackExeMsg .= "`n`nThis version can possibly cause issues that you wouldn't have with the normal script though."
fallbackExeMsg .= "`n`nUse ""Run_TradeMacro.ahk"" if possible and try it before reporting any issues!"
fallbackExeMsg .= "`n`n(closes after 10s)..."
- SplashTextOff
+ SplashUI.DestroyUI()
MsgBox, 0x1030, PoE-TradeMacro Fallback, % fallbackExeMsg, 10
argumentProjectName := "PoE-TradeMacro"
@@ -506,6 +512,7 @@ TradeFunc_GetTempLeagueDates(ltype = "") {
;----------------------- Handle available script updates ---------------------------------------
TradeFunc_ScriptUpdate() {
+ SplashUI.SetSubMessage("Checking for script updates...")
If (firstUpdateCheck) {
ShowUpdateNotification := TradeOpts.ShowUpdateNotifications
} Else {
@@ -530,306 +537,307 @@ CreateTradeSettingsUI()
}
StringTrimRight, TabNames, TabNames, 1
- Gui, Add, Tab3, Choose1 h660 x0, %TabNames%
+ Gui, SettingsUI:Add, Tab3, Choose1 h660 x0, %TabNames%
+ Gui, SettingsUI:Default
- topGroupBoxYPos := "y53"
+ topGroupBoxYPos := "y51"
/*
General
*/
- GuiAddGroupBox("[TradeMacro] General", "x7 y+7 w310 h410")
+ GuiAddGroupBox("[TradeMacro] General", "x7 y+5 w310 h410", "", "", "", "", "SettingsUI")
; Note: window handles (hwnd) are only needed if a UI tooltip should be attached.
- GuiAddText("Show Items:", "x17 yp+28 w230 h20 0x0100", "LblShowItemResults", "LblShowItemResultsH")
+ GuiAddText("Show Items:", "x17 yp+28 w230 h20 0x0100", "LblShowItemResults", "LblShowItemResultsH", "", "", "SettingsUI")
AddToolTip(LblShowItemResultsH, "Number of items displayed in search results.")
- GuiAddEdit(TradeOpts.ShowItemResults, "x+10 yp-2 w50 h20", "ShowItemResults", "ShowItemResultsH")
+ GuiAddEdit(TradeOpts.ShowItemResults, "x+10 yp-2 w50 h20", "ShowItemResults", "ShowItemResultsH", "", "", "SettingsUI")
- GuiAddCheckbox("Show Account Name", "x17 yp+24 w260 h30", TradeOpts.ShowAccountName, "ShowAccountName", "ShowAccountNameH")
+ GuiAddCheckbox("Show Account Name", "x17 yp+24 w260 h30", TradeOpts.ShowAccountName, "ShowAccountName", "ShowAccountNameH", "", "","SettingsUI")
AddToolTip(ShowAccountNameH, "Show sellers account name in search results tooltip.")
- GuiAddCheckbox("Update: Show Notifications", "x17 yp+30 w260 h30", TradeOpts.ShowUpdateNotifications, "ShowUpdateNotifications", "ShowUpdateNotificationsH")
+ GuiAddCheckbox("Update: Show Notifications", "x17 yp+30 w260 h30", TradeOpts.ShowUpdateNotifications, "ShowUpdateNotifications", "ShowUpdateNotificationsH", "", "", "SettingsUI")
AddToolTip(ShowUpdateNotificationsH, "Notifies you when there's a new release available.")
- GuiAddCheckbox("Update: Skip folder selection", "x17 yp+30 w260 h30", TradeOpts.UpdateSkipSelection, "UpdateSkipSelection", "UpdateSkipSelectionH")
+ GuiAddCheckbox("Update: Skip folder selection", "x17 yp+30 w260 h30", TradeOpts.UpdateSkipSelection, "UpdateSkipSelection", "UpdateSkipSelectionH", "", "", "SettingsUI")
AddToolTip(UpdateSkipSelectionH, "Skips selecting an update location.`nThe current script directory will be used as default.")
- GuiAddCheckbox("Update: Skip backup", "x17 yp+30 w260 h30", TradeOpts.UpdateSkipBackup, "UpdateSkipBackup", "UpdateSkipBackupH")
+ GuiAddCheckbox("Update: Skip backup", "x17 yp+30 w260 h30", TradeOpts.UpdateSkipBackup, "UpdateSkipBackup", "UpdateSkipBackupH", "", "", "SettingsUI")
AddToolTip(UpdateSkipBackupH, "Skips making a backup of the install location/folder.")
- GuiAddCheckbox("Open browser Win10 fix", "x17 yp+30 w260 h30", TradeOpts.OpenWithDefaultWin10Fix, "OpenWithDefaultWin10Fix", "OpenWithDefaultWin10FixH")
+ GuiAddCheckbox("Open browser Win10 fix", "x17 yp+30 w260 h30", TradeOpts.OpenWithDefaultWin10Fix, "OpenWithDefaultWin10Fix", "OpenWithDefaultWin10FixH", "", "", "SettingsUI")
AddToolTip(OpenWithDefaultWin10FixH, " If your PC always asks you what program to use to open`n the wiki-link, enable this to let ahk find your default`nprogram from the registry.")
- GuiAddText("Browser Path:", "x17 yp+35 w100 h20 0x0100", "LblBrowserPath", "LblBrowserPathH")
+ GuiAddText("Browser Path:", "x17 yp+35 w100 h20 0x0100", "LblBrowserPath", "LblBrowserPathH", "", "", "SettingsUI")
AddToolTip(LblBrowserPathH, "Optional: Set the path to the browser (.exe) to open Urls with.")
- GuiAddEdit(TradeOpts.BrowserPath, "x+10 yp-2 w180 h20", "BrowserPath", "BrowserPathH")
+ GuiAddEdit(TradeOpts.BrowserPath, "x+10 yp-2 w180 h20", "BrowserPath", "BrowserPathH", "", "", "SettingsUI")
- GuiAddCheckbox("Copy urls to clipboard.", "x17 yp+23 w260 h30", TradeOpts.CopyUrlToClipboard, "CopyUrlToClipboard", "CopyUrlToClipboardH")
+ GuiAddCheckbox("Copy urls to clipboard.", "x17 yp+23 w260 h30", TradeOpts.CopyUrlToClipboard, "CopyUrlToClipboard", "CopyUrlToClipboardH", "", "", "SettingsUI")
AddToolTip(CopyUrlToClipboardH, "Copies urls to your clipboard instead of directly opening them.")
- GuiAddCheckbox("Enable ""Url shortcuts"" without item hover.", "x17 yp+30 w260 h30", TradeOpts.OpenUrlsOnEmptyItem, "OpenUrlsOnEmptyItem", "OpenUrlsOnEmptyItemH")
+ GuiAddCheckbox("Enable ""Url shortcuts"" without item hover.", "x17 yp+30 w260 h30", TradeOpts.OpenUrlsOnEmptyItem, "OpenUrlsOnEmptyItem", "OpenUrlsOnEmptyItemH", "", "", "SettingsUI")
AddToolTip(OpenUrlsOnEmptyItemH, "This enables the ctrl+q and ctrl+w shortcuts`neven without hovering over an item.`nBe careful!")
- GuiAddCheckbox("Download Data Files on start", "x17 yp+30 w260 h30", TradeOpts.DownloadDataFiles, "DownloadDataFiles", "DownloadDataFilesH")
+ GuiAddCheckbox("Download Data Files on start", "x17 yp+30 w260 h30", TradeOpts.DownloadDataFiles, "DownloadDataFiles", "DownloadDataFilesH", "", "", "SettingsUI")
AddToolTip(DownloadDataFilesH, "Downloads all data files (mods, enchantments etc) on every script start.`nBy disabling this, these files are only updated with new releases.`nDisabling is not recommended.")
- GuiAddCheckbox("Delete cookies on start", "x17 yp+30 w210 h30", TradeOpts.DeleteCookies, "DeleteCookies", "DeleteCookiesH")
+ GuiAddCheckbox("Delete cookies on start", "x17 yp+30 w210 h30", TradeOpts.DeleteCookies, "DeleteCookies", "DeleteCookiesH", "", "", "SettingsUI")
AddToolTip(DeleteCookiesH, "Delete Internet Explorer cookies.`nThe default option (all) is preferred.`n`nThis will be skipped if no cookies are needed to access poe.trade.")
- GuiAddDropDownList("All|poe.trade", "x+10 yp+4 w70", TradeOpts.CookieSelect, "CookieSelect", "CookieSelectH")
+ GuiAddDropDownList("All|poe.trade", "x+10 yp+4 w70", TradeOpts.CookieSelect, "CookieSelect", "CookieSelectH", "", "", "SettingsUI")
- GuiAddCheckbox("Use poedb.tw instead of the wiki.", "x17 yp+27 w260 h30 0x0100", TradeOpts.WikiAlternative, "WikiAlternative", "WikiAlternativeH")
+ GuiAddCheckbox("Use poedb.tw instead of the wiki.", "x17 yp+27 w260 h30 0x0100", TradeOpts.WikiAlternative, "WikiAlternative", "WikiAlternativeH", "", "", "SettingsUI")
AddToolTip(WikiAlternativeH, "Use poedb.tw to open a page with information`nabout your item/item base.")
- GuiAddText("Curl/HTTP request timeout (s):", "x17 yp+33 w230 h20 0x0100", "LblCurlTimeout", "LblCurlTimeoutH")
+ GuiAddText("Curl/HTTP request timeout (s):", "x17 yp+33 w230 h20 0x0100", "LblCurlTimeout", "LblCurlTimeoutH", "", "", "SettingsUI")
AddToolTip(LblCurlTimeoutH, "This is the default timeout (seconds) used for HTTP requests to trade sites and APIs.`n`nRequests taking longer than this will be aborted.")
- GuiAddEdit(TradeOpts.CurlTimeout, "x+10 yp-2 w50 h20 Number", "CurlTimeout", "CurlTimeoutH")
+ GuiAddEdit(TradeOpts.CurlTimeout, "x+10 yp-2 w50 h20 Number", "CurlTimeout", "CurlTimeoutH", "", "", "SettingsUI")
/*
Search
*/
- GuiAddGroupBox("[TradeMacro] Search", "x327 " topGroupBoxYPos " w310 h625")
+ GuiAddGroupBox("[TradeMacro] Search", "x327 " topGroupBoxYPos " w310 h625", "", "", "", "", "SettingsUI")
; league section
- GuiAddText("League:", "x337 yp+28 w160 h20 0x0100", "LblSearchLeague", "LblSearchLeagueH")
+ GuiAddText("League:", "x337 yp+28 w160 h20 0x0100", "LblSearchLeague", "LblSearchLeagueH", "", "", "SettingsUI")
AddToolTip(LblSearchLeagueH, """TmpStandard"" = current softcore challenge league.`n""TmpHardcore"" = current hardcore challenge league.`n`nDefaults are ""Standard"" and ""TempStandard"" depending on league availability.")
- GuiAddPicture(A_ScriptDir "\resources\images\info-blue.png", "x+-15 yp+0 w15 h-1 0x0100", "LeagueInfo", "LeagueInfoH", "")
+ GuiAddPicture(A_ScriptDir "\resources\images\info-blue.png", "x+-15 yp+0 w15 h-1 0x0100", "LeagueInfo", "LeagueInfoH", "", "", "SettingsUI")
LeagueList := TradeFunc_GetDelimitedLeagueList()
- GuiAddDropDownList(LeagueList, "x+10 yp-4", TradeOpts.SearchLeague, "SearchLeague", "SearchLeagueH")
+ GuiAddDropDownList(LeagueList, "x+10 yp-4", TradeOpts.SearchLeague, "SearchLeague", "SearchLeagueH", "", "", "SettingsUI")
AddToolTip(SearchLeagueH, """TmpStandard"" = current softcore challenge league.`n""TmpHardcore"" = current hardcore challenge league.`n`nDefaults are ""Standard"" and ""TempStandard"" depending on league availability.")
; league section end
- GuiAddText("Account Name:", "x337 yp+34 w160 h20 0x0100", "LblAccountName", "LblAccountNameH")
+ GuiAddText("Account Name:", "x337 yp+34 w160 h20 0x0100", "LblAccountName", "LblAccountNameH", "", "", "SettingsUI")
AddToolTip(LblAccountNameH, "Your Account Name used to check your item's age.")
- GuiAddEdit(TradeOpts.AccountName, "x+10 yp-2 w120 h20", "AccountName", "AccountNameH")
+ GuiAddEdit(TradeOpts.AccountName, "x+10 yp-2 w120 h20", "AccountName", "AccountNameH", "", "", "SettingsUI")
; gem section start
- GuiAddText("Gem Lvl:", "x337 yp+32 w54 h20 0x0100", "LblGemLevel", "LblGemLevelH")
+ GuiAddText("Gem Lvl:", "x337 yp+32 w54 h20 0x0100", "LblGemLevel", "LblGemLevelH", "", "", "SettingsUI")
AddToolTip(LblGemLevelH, "Gem level is ignored in the search unless it's equal`nor higher than this value.`n`nSet to something like 30 to completely ignore the level.")
- GuiAddEdit(TradeOpts.GemLevel, "x+1 yp-2 w33 h20", "GemLevel", "GemLevelH")
+ GuiAddEdit(TradeOpts.GemLevel, "x+1 yp-2 w33 h20", "GemLevel", "GemLevelH", "", "", "SettingsUI")
- GuiAddText("Lvl Range:", "x+5 yp+2 w63 h20 0x0100", "LblGemLevelRange", "LblGemLevelRangeH")
+ GuiAddText("Lvl Range:", "x+5 yp+2 w63 h20 0x0100", "LblGemLevelRange", "LblGemLevelRangeH", "", "", "SettingsUI")
AddToolTip(LblGemLevelRangeH, "Uses Gem level option to create a range around it.`n `nSetting it to 0 ignores this option.")
- GuiAddEdit(TradeOpts.GemLevelRange, "x+1 yp-2 w33 h20", "GemLevelRange", "GemLevelRangeH")
+ GuiAddEdit(TradeOpts.GemLevelRange, "x+1 yp-2 w33 h20", "GemLevelRange", "GemLevelRangeH", "", "", "SettingsUI")
- GuiAddText("Q. Range:", "x+5 yp+2 w62 h20 0x0100", "LblGemQualityRange", "LblGemQualityRangeH")
+ GuiAddText("Q. Range:", "x+5 yp+2 w62 h20 0x0100", "LblGemQualityRange", "LblGemQualityRangeH", "", "","SettingsUI")
AddToolTip(LblGemQualityRangeH, "Use this to set a range to quality Gem searches. For example a range of 1`n searches 14% - 16% when you have a 15% Quality Gem.`nSetting it to 0 (default) uses your Gems quality as min_quality`nwithout max_quality in your search.")
- GuiAddEdit(TradeOpts.GemQualityRange, "x+1 yp-2 w33 h20", "GemQualityRange", "GemQualityRangeH")
+ GuiAddEdit(TradeOpts.GemQualityRange, "x+1 yp-2 w33 h20", "GemQualityRange", "GemQualityRangeH", "", "", "SettingsUI")
; gem section end
; gem xp section start
- GuiAddCheckbox("Use Gem XP", "x337 yp+24 w100 h30 0x0100", TradeOpts.UseGemXP, "UseGemXP", "UseGemXPH")
+ GuiAddCheckbox("Use Gem XP", "x337 yp+24 w100 h30 0x0100", TradeOpts.UseGemXP, "UseGemXP", "UseGemXPH", "", "", "SettingsUI")
AddToolTip(UseGemXP, "Use gem experience in the search.`n`nWorks for gems with a level of 19 and higher or`nEnhance, Empower and Enlighten.")
- GuiAddText("Gem XP threshold:", "x467 yp+8 w115 h20 0x0100", "LblGemXPThreshold", "LblGemXPThresholdH")
+ GuiAddText("Gem XP threshold:", "x467 yp+8 w115 h20 0x0100", "LblGemXPThreshold", "LblGemXPThresholdH", "", "", "SettingsUI")
AddToolTip(LblGemXPThresholdH, "Gem experience won't be used in the search if`nlower than this value.")
- GuiAddEdit(TradeOpts.GemXPThreshold, "x+10 yp-2 w35 h20", "GemXPThreshold", "GemXPThresholdH")
+ GuiAddEdit(TradeOpts.GemXPThreshold, "x+10 yp-2 w35 h20", "GemXPThreshold", "GemXPThresholdH", "", "", "SettingsUI")
; gem xp section end
- GuiAddText("Mod Range Modifier (%):", "x337 yp+32 w190 h20 0x0100", "LblAdvancedSearchModValueRange", "LblAdvancedSearchModValueRangeH")
+ GuiAddText("Mod Range Modifier (%):", "x337 yp+32 w190 h20 0x0100", "LblAdvancedSearchModValueRange", "LblAdvancedSearchModValueRangeH", "", "", "SettingsUI")
AddToolTip(LblAdvancedSearchModValueRangeH, "Advanced search lets you select the items mods to include in your`nsearch and lets you set their min/max values.`n`nThese min/max values are pre-filled, to calculate them we look at`nthe difference between the mods theoretical max and min value and`ntreat it as 100%.`n`nWe then use this modifier as a percentage of this differences to`ncreate a range (min/max value) to search in. ")
- GuiAddEdit(TradeOpts.AdvancedSearchModValueRangeMin, "x+10 yp-2 w35 h20", "AdvancedSearchModValueRangeMin", "AdvancedSearchModValueRangeMinH")
- GuiAddText(" -", "x+5 yp+2 w10 h20 0x0100", "LblAdvancedSearchModValueRangeSpacer", "LblAdvancedSearchModValueRangeSpacerH")
- GuiAddEdit(TradeOpts.AdvancedSearchModValueRangeMax, "x+5 yp-2 w35 h20", "AdvancedSearchModValueRangeMax", "AdvancedSearchModValueRangeMaxH")
+ GuiAddEdit(TradeOpts.AdvancedSearchModValueRangeMin, "x+10 yp-2 w35 h20", "AdvancedSearchModValueRangeMin", "AdvancedSearchModValueRangeMinH", "", "", "SettingsUI")
+ GuiAddText(" -", "x+5 yp+2 w10 h20 0x0100", "LblAdvancedSearchModValueRangeSpacer", "LblAdvancedSearchModValueRangeSpacerH", "", "", "SettingsUI")
+ GuiAddEdit(TradeOpts.AdvancedSearchModValueRangeMax, "x+5 yp-2 w35 h20", "AdvancedSearchModValueRangeMax", "AdvancedSearchModValueRangeMaxH", "", "", "SettingsUI")
- GuiAddText("Corrupted:", "x337 yp+32 w150 h20 0x0100", "LblCorrupted", "LblCorruptedH")
+ GuiAddText("Corrupted:", "x337 yp+32 w150 h20 0x0100", "LblCorrupted", "LblCorruptedH", "", "", "SettingsUI")
AddToolTip(LblCorruptedH, "Default = search results have the same corrupted state as the checked item.`nUse this option to override that and always search as selected.")
- GuiAddDropDownList("Either|Yes|No", "x+10 yp-4 w52", TradeOpts.Corrupted, "Corrupted", "CorruptedH")
- GuiAddCheckbox("Override", "x+10 yp+4 0x0100", TradeOpts.CorruptedOverride, "CorruptedOverride", "CorruptedOverrideH", "TradeSettingsUI_ChkCorruptedOverride")
+ GuiAddDropDownList("Either|Yes|No", "x+10 yp-4 w52", TradeOpts.Corrupted, "Corrupted", "CorruptedH", "", "", "SettingsUI")
+ GuiAddCheckbox("Override", "x+10 yp+4 0x0100", TradeOpts.CorruptedOverride, "CorruptedOverride", "CorruptedOverrideH", "TradeSettingsUI_ChkCorruptedOverride", "", "SettingsUI")
GoSub, TradeSettingsUI_ChkCorruptedOverride
CurrencyList := TradeFunc_GetDelimitedCurrencyListString()
- GuiAddText("Currency Search:", "x337 yp+30 w160 h20 0x0100", "LblCurrencySearchHave", "LblCurrencySearchHaveH")
+ GuiAddText("Currency Search:", "x337 yp+30 w160 h20 0x0100", "LblCurrencySearchHave", "LblCurrencySearchHaveH", "", "", "SettingsUI")
AddToolTip(LblCurrencySearchHaveH, "This settings sets the currency that you`nwant to use as ""have"" for the currency search.")
- GuiAddDropDownList(CurrencyList, "x+10 yp-4", TradeOpts.CurrencySearchHave, "CurrencySearchHave", "CurrencySearchHaveH")
+ GuiAddDropDownList(CurrencyList, "x+10 yp-4", TradeOpts.CurrencySearchHave, "CurrencySearchHave", "CurrencySearchHaveH", "", "", "SettingsUI")
- GuiAddText("Secondary Currency:", "x337 yp+30 w160 h20 0x0100", "LblCurrencySearchHave2", "LblCurrencySearchHave2H")
+ GuiAddText("Secondary Currency:", "x337 yp+30 w160 h20 0x0100", "LblCurrencySearchHave2", "LblCurrencySearchHave2H", "", "", "SettingsUI")
AddToolTip(LblCurrencySearchHave2H, "This setting sets the currency that you`nwant to use as ""have"" when searching for`nthe above selected currency.")
- GuiAddDropDownList(CurrencyList, "x+10 yp-4", TradeOpts.CurrencySearchHave2, "CurrencySearchHave2", "CurrencySearchHave2H")
+ GuiAddDropDownList(CurrencyList, "x+10 yp-4", TradeOpts.CurrencySearchHave2, "CurrencySearchHave2", "CurrencySearchHave2H", "", "", "SettingsUI")
; option group start
- GuiAddCheckbox("Use the ""exact currency"" option.", "x337 yp+27 w280 h20", TradeOpts.ExactCurrencySearch, "ExactCurrencySearch", "ExactCurrencySearchH")
+ GuiAddCheckbox("Use the ""exact currency"" option.", "x337 yp+27 w280 h20", TradeOpts.ExactCurrencySearch, "ExactCurrencySearch", "ExactCurrencySearchH", "", "", "SettingsUI")
AddToolTip(ExactCurrencySearchH, "Searches for exact currencies, will ignore results not listed as these.`nOnly applicable to searches using poe.trade.`n`nUses the selected currencies from the ""Currency Search"" and ""Secondary Search"" option.`nSecondary currency will be used for a second search if no results are found.")
; option group start
- GuiAddCheckbox("Show prices as chaos equivalent.", "x337 yp+25 w280 h20", TradeOpts.ShowPricesAsChaosEquiv, "ShowPricesAsChaosEquiv", "ShowPricesAsChaosEquivH")
+ GuiAddCheckbox("Show prices as chaos equivalent.", "x337 yp+25 w280 h20", TradeOpts.ShowPricesAsChaosEquiv, "ShowPricesAsChaosEquiv", "ShowPricesAsChaosEquivH", "", "", "SettingsUI")
AddToolTip(ShowPricesAsChaosEquivH, "Shows all prices as their chaos equivalent.")
; option group start
- GuiAddCheckbox("Online only", "x337 yp+25 w145 h20 0x0100", TradeOpts.OnlineOnly, "OnlineOnly", "OnlineOnlyH")
+ GuiAddCheckbox("Online only", "x337 yp+25 w145 h20 0x0100", TradeOpts.OnlineOnly, "OnlineOnly", "OnlineOnlyH", "", "", "SettingsUI")
- GuiAddCheckbox("Buyout only", "x482 yp0 w145 h20 0x0100", TradeOpts.BuyoutOnly, "BuyoutOnly", "BuyoutOnlyH")
+ GuiAddCheckbox("Buyout only", "x482 yp0 w145 h20 0x0100", TradeOpts.BuyoutOnly, "BuyoutOnly", "BuyoutOnlyH", "", "", "SettingsUI")
AddToolTip(BuyoutOnlyH, "This option only takes affect when opening the search on poe.trade.")
; option group start
- GuiAddCheckbox("Force max links (certain corrupted items).", "x337 yp+25 w280 h20", TradeOpts.ForceMaxLinks, "ForceMaxLinks", "ForceMaxLinksH")
+ GuiAddCheckbox("Force max links (certain corrupted items).", "x337 yp+25 w280 h20", TradeOpts.ForceMaxLinks, "ForceMaxLinks", "ForceMaxLinksH", "", "", "SettingsUI")
AddToolTip(ForceMaxLinksH, "Searches for corrupted 3/4 max-socket unique items always use`nthe maximum amount of links if your item is fully linked.")
; option group start
- GuiAddCheckbox("Remove multiple Listings from same Account.", "x337 yp+25 w280 h20", TradeOpts.RemoveMultipleListingsFromSameAccount, "RemoveMultipleListingsFromSameAccount", "RemoveMultipleListingsFromSameAccountH")
+ GuiAddCheckbox("Remove multiple Listings from same Account.", "x337 yp+25 w280 h20", TradeOpts.RemoveMultipleListingsFromSameAccount, "RemoveMultipleListingsFromSameAccount", "RemoveMultipleListingsFromSameAccountH", "", "", "SettingsUI")
AddToolTip(RemoveMultipleListingsFromSameAccountH, "Removes multiple listings from the same account from`nyour search results (to combat market manipulators).`n`nThe removed items are also removed from the average and`nmedian price calculations.")
; option group start
- GuiAddCheckbox("Alternative currency search.", "x337 yp+25 w280 h20", TradeOpts.AlternativeCurrencySearch, "AlternativeCurrencySearch", "AlternativeCurrencySearchH")
+ GuiAddCheckbox("Alternative currency search.", "x337 yp+25 w280 h20", TradeOpts.AlternativeCurrencySearch, "AlternativeCurrencySearch", "AlternativeCurrencySearchH", "", "", "SettingsUI")
AddToolTip(AlternativeCurrencySearchH, "Shows historical data of the searched currency.`nProvided by poe.ninja.")
; option group start
- GuiAddCheckbox("Open items on poe.ninja.", "x337 yp+25 w280 h20", TradeOpts.PoENinjaSearch, "PoENinjaSearch", "PoENinjaSearchH")
+ GuiAddCheckbox("Open items on poe.ninja.", "x337 yp+25 w280 h20", TradeOpts.PoENinjaSearch, "PoENinjaSearch", "PoENinjaSearchH", "", "", "SettingsUI")
AddToolTip(PoENinjaSearchH, "Opens items on poe.ninja instead of poe.trade when using the ""Search (poe.trade)"" hotkey.`n`nOnly works on certain supported item types:`nDiv cards, prophecies, maps, uniques, essences, helmet enchants (have priority over item).")
; option group start
- GuiAddCheckbox("Use predicted pricing.", "x337 yp+25 w145 h20", TradeOpts.UsePredictedItemPricing, "UsePredictedItemPricing", "UsePredictedItemPricingH")
+ GuiAddCheckbox("Use predicted pricing.", "x337 yp+25 w145 h20", TradeOpts.UsePredictedItemPricing, "UsePredictedItemPricing", "UsePredictedItemPricingH", "", "", "SettingsUI")
AddToolTip(UsePredictedItemPricingH, "Use predicted item pricing via machine-learning algorithms.`nReplaces the default search, works with magic/rare/unique items.`n`nProvided by poeprices.info.")
; option group start
- GuiAddCheckbox("Use feedback Gui.", "x482 yp+0 w120 h20", TradeOpts.UsePredictedItemPricingGui, "UsePredictedItemPricingGui", "UsePredictedItemPricingGuiH")
+ GuiAddCheckbox("Use feedback Gui.", "x482 yp+0 w120 h20", TradeOpts.UsePredictedItemPricingGui, "UsePredictedItemPricingGui", "UsePredictedItemPricingGuiH", "", "", "SettingsUI")
AddToolTip(UsePredictedItemPricingGuiH, "Use a Gui instead of the default tooltip to display results.`nYou can send some feedback to improve this feature.")
; option group start
- GuiAddCheckbox("Include search parameter via edit field focus.", "x337 yp+25 w280 h20", TradeOpts.IncludeSearchParamByFocus, "IncludeSearchParamByFocus", "IncludeSearchParamByFocusH")
+ GuiAddCheckbox("Include search parameter via edit field focus.", "x337 yp+25 w280 h20", TradeOpts.IncludeSearchParamByFocus, "IncludeSearchParamByFocus", "IncludeSearchParamByFocusH", "", "", "SettingsUI")
AddToolTip(IncludeSearchParamByFocusH, "Checks a search parameters (mod/stat line) checkbox to include it in the`nadvanced search when any of its edit fields gets focus.")
; header
- GuiAddText("Pre-Select Options (Advanced Search)", "x337 yp+35 w280 h20 0x0100 cDA4F49", "", "")
- GuiAddText("-------------------------------------------------------------", "x337 yp+6 w280 h20 0x0100 cDA4F49", "", "")
+ GuiAddText("Pre-Select Options (Advanced Search)", "x337 yp+35 w280 h20 0x0100 cDA4F49", "", "", "", "", "SettingsUI")
+ GuiAddText("-------------------------------------------------------------", "x337 yp+6 w280 h20 0x0100 cDA4F49", "", "", "", "", "SettingsUI")
; option group start
- GuiAddCheckbox("Pre-Fill Min-Values", "x337 yp+16 w145 h20", TradeOpts.PrefillMinValue, "PrefillMinValue", "PrefillMinValueH")
+ GuiAddCheckbox("Pre-Fill Min-Values", "x337 yp+16 w145 h20", TradeOpts.PrefillMinValue, "PrefillMinValue", "PrefillMinValueH", "", "", "SettingsUI")
AddToolTip(PrefillMinValueH, "Automatically fill the min-values in the advanced search GUI.")
- GuiAddCheckbox("Pre-Fill Max-Values", "x482 yp0 w145 h20", TradeOpts.PrefillMaxValue, "PrefillMaxValue", "PrefillMaxValueH")
+ GuiAddCheckbox("Pre-Fill Max-Values", "x482 yp0 w145 h20", TradeOpts.PrefillMaxValue, "PrefillMaxValue", "PrefillMaxValueH", "", "", "SettingsUI")
AddToolTip(PrefillMaxValueH, "Automatically fill the max-values in the advanced search GUI.")
; option group start
- GuiAddCheckbox("Normal mods", "x337 yp+20 w135 h20", TradeOpts.AdvancedSearchCheckMods, "AdvancedSearchCheckMods", "AdvancedSearchCheckModsH")
+ GuiAddCheckbox("Normal mods", "x337 yp+20 w135 h20", TradeOpts.AdvancedSearchCheckMods, "AdvancedSearchCheckMods", "AdvancedSearchCheckModsH", "", "", "SettingsUI")
AddToolTip(AdvancedSearchCheckModsH, "Selects all normal mods (no pseudo mods)`nwhen creating the advanced search GUI.")
- GuiAddCheckbox("Total Ele Resistances", "x482 yp0 w145 h20", TradeOpts.AdvancedSearchCheckTotalEleRes, "AdvancedSearchCheckTotalEleRes", "AdvancedSearchCheckTotalEleResH")
+ GuiAddCheckbox("Total Ele Resistances", "x482 yp0 w145 h20", TradeOpts.AdvancedSearchCheckTotalEleRes, "AdvancedSearchCheckTotalEleRes", "AdvancedSearchCheckTotalEleResH", "", "", "SettingsUI")
AddToolTip(AdvancedSearchCheckTotalEleResH, "Selects the total elemental resistances pseudo mod`nwhen creating the advanced search GUI.")
; option group start
- GuiAddCheckbox("Life", "x337 yp+20 w50 h20", TradeOpts.AdvancedSearchCheckTotalLife, "AdvancedSearchCheckTotalLife", "AdvancedSearchCheckTotalLifeH")
+ GuiAddCheckbox("Life", "x337 yp+20 w50 h20", TradeOpts.AdvancedSearchCheckTotalLife, "AdvancedSearchCheckTotalLife", "AdvancedSearchCheckTotalLifeH", "", "", "SettingsUI")
AddToolTip(AdvancedSearchCheckTotalLifeH, "Selects the total flat life pseudo mod or flat life mod and`n percent maximum increased life mod when creating the advanced search GUI.")
- GuiAddCheckbox("ES Mod", "x390 yp0 w60 h20", TradeOpts.AdvancedSearchCheckES, "AdvancedSearchCheckES", "AdvancedSearchCheckESH")
+ GuiAddCheckbox("ES Mod", "x390 yp0 w60 h20", TradeOpts.AdvancedSearchCheckES, "AdvancedSearchCheckES", "AdvancedSearchCheckESH", "", "", "SettingsUI")
AddToolTip(AdvancedSearchCheckESH, "Selects the flat energy shield mod and percent maximum increased `nenergy shield mod when creating the advanced search GUI.")
- GuiAddCheckbox("ES Defense Total", "x482 yp0 w135 h20", TradeOpts.AdvancedSearchCheckTotalES, "AdvancedSearchCheckTotalES", "AdvancedSearchCheckTotalESH")
+ GuiAddCheckbox("ES Defense Total", "x482 yp0 w135 h20", TradeOpts.AdvancedSearchCheckTotalES, "AdvancedSearchCheckTotalES", "AdvancedSearchCheckTotalESH", "", "", "SettingsUI")
AddToolTip(AdvancedSearchCheckTotalESH, "Selects the energy shield total defense, for example on `narmour pieces when creating the advanced search GUI.")
; option group start
- GuiAddCheckbox("Elemental DPS", "x337 yp+20 w135 h20", TradeOpts.AdvancedSearchCheckEDPS, "AdvancedSearchCheckEDPS", "AdvancedSearchCheckEDPSH")
+ GuiAddCheckbox("Elemental DPS", "x337 yp+20 w135 h20", TradeOpts.AdvancedSearchCheckEDPS, "AdvancedSearchCheckEDPS", "AdvancedSearchCheckEDPSH", "", "", "SettingsUI")
AddToolTip(AdvancedSearchCheckEDPSH, "Selects elemental damage per second`nwhen creating the advanced search GUI.")
- GuiAddCheckbox("Physical DPS", "x482 yp0 w135 h20", TradeOpts.AdvancedSearchCheckPDPS, "AdvancedSearchCheckPDPS", "AdvancedSearchCheckPDPSH")
+ GuiAddCheckbox("Physical DPS", "x482 yp0 w135 h20", TradeOpts.AdvancedSearchCheckPDPS, "AdvancedSearchCheckPDPS", "AdvancedSearchCheckPDPSH", "", "", "SettingsUI")
AddToolTip(AdvancedSearchCheckPDPSH, "Selects physical damage per second`nwhen creating the advanced search GUI.")
; option group start
- GuiAddCheckbox("Minimum Item Level", "x337 yp+20 w135 h20", TradeOpts.AdvancedSearchCheckILVL, "AdvancedSearchCheckILVL", "AdvancedSearchCheckILVLH")
+ GuiAddCheckbox("Minimum Item Level", "x337 yp+20 w135 h20", TradeOpts.AdvancedSearchCheckILVL, "AdvancedSearchCheckILVL", "AdvancedSearchCheckILVLH", "", "", "SettingsUI")
AddToolTip(AdvancedSearchCheckILVLH, "Selects the items itemlevel as minimum itemlevel`nwhen creating the advanced search GUI.")
- GuiAddCheckbox("Item Base", "x482 yp0 w135 h20", TradeOpts.AdvancedSearchCheckBase, "AdvancedSearchCheckBase", "AdvancedSearchCheckBaseH")
+ GuiAddCheckbox("Item Base", "x482 yp0 w135 h20", TradeOpts.AdvancedSearchCheckBase, "AdvancedSearchCheckBase", "AdvancedSearchCheckBaseH", "", "", "SettingsUI")
AddToolTip(AdvancedSearchCheckBaseH, "Selects the item base`nwhen creating the advanced search GUI.")
- ;Gui, Add, Link, x337 yp+43 w280 cBlue BackgroundTrans, Options Wiki-Page
+ ;Gui, SettingsUI:Add, Link, x337 yp+43 w280 cBlue BackgroundTrans, Options Wiki-Page
/*
Hotkeys
*/
- GuiAddGroupBox("[TradeMacro] Hotkeys", "x647 " topGroupBoxYPos " w310 h295")
+ GuiAddGroupBox("[TradeMacro] Hotkeys", "x647 " topGroupBoxYPos " w310 h295", "", "", "", "", "SettingsUI")
- GuiAddCheckbox("Price Check:", "x657 yp+26 w165 h20 0x0100", TradeOpts.PriceCheckEnabled, "PriceCheckEnabled", "PriceCheckEnabledH")
+ GuiAddCheckbox("Price Check:", "x657 yp+26 w165 h20 0x0100", TradeOpts.PriceCheckEnabled, "PriceCheckEnabled", "PriceCheckEnabledH", "", "", "SettingsUI")
AddToolTip(PriceCheckEnabledH, "Check item prices.")
- GuiAddHotkey(TradeOpts.PriceCheckHotKey, "x+1 yp-2 w124 h20", "PriceCheckHotKey", "PriceCheckHotKeyH")
+ GuiAddHotkey(TradeOpts.PriceCheckHotKey, "x+1 yp-2 w124 h20", "PriceCheckHotKey", "PriceCheckHotKeyH", "", "", "SettingsUI")
AddToolTip(PriceCheckHotKeyH, "Press key/key combination.`nDefault: ctrl + d")
- GuiAddCheckbox("Advanced Price Check:", "x657 yp+32 w165 h20 0x010", TradeOpts.AdvancedPriceCheckEnabled, "AdvancedPriceCheckEnabled", "AdvancedPriceCheckEnabledH")
+ GuiAddCheckbox("Advanced Price Check:", "x657 yp+32 w165 h20 0x010", TradeOpts.AdvancedPriceCheckEnabled, "AdvancedPriceCheckEnabled", "AdvancedPriceCheckEnabledH", "", "", "SettingsUI")
AddToolTip(AdvancedPriceCheckEnabledH, "Select mods to include in your search`nbefore checking prices.")
- GuiAddHotkey(TradeOpts.AdvancedPriceCheckHotKey, "x+1 yp-2 w124 h20", "AdvancedPriceCheckHotKey", "AdvancedPriceCheckHotKeyH")
+ GuiAddHotkey(TradeOpts.AdvancedPriceCheckHotKey, "x+1 yp-2 w124 h20", "AdvancedPriceCheckHotKey", "AdvancedPriceCheckHotKeyH", "", "", "SettingsUI")
AddToolTip(AdvancedPriceCheckHotKeyH, "Press key/key combination.`nDefault: ctrl + alt + d")
- GuiAddCheckbox("Custom Search:", "x657 yp+32 w165 h20 0x0100", TradeOpts.CustomInputSearchEnabled, "CustomInputSearchEnabled", "CustomInputSearchEnabledH")
+ GuiAddCheckbox("Custom Search:", "x657 yp+32 w165 h20 0x0100", TradeOpts.CustomInputSearchEnabled, "CustomInputSearchEnabled", "CustomInputSearchEnabledH", "", "", "SettingsUI")
AddToolTip(CustomInputSearchEnabledH, "Custom text input search.")
- GuiAddHotkey(TradeOpts.CustomInputSearchHotKey, "x+1 yp-2 w124 h20", "CustomInputSearchHotKey", "CustomInputSearchHotKeyH")
+ GuiAddHotkey(TradeOpts.CustomInputSearchHotKey, "x+1 yp-2 w124 h20", "CustomInputSearchHotKey", "CustomInputSearchHotKeyH", "", "", "SettingsUI")
AddToolTip(CustomInputSearchHotKeyH, "Press key/key combination.`nDefault: ctrl + i")
- GuiAddCheckbox("Search (poe.trade):", "x657 yp+32 w165 h20 0x0100", TradeOpts.OpenSearchOnPoeTradeEnabled, "OpenSearchOnPoeTradeEnabled", "OpenSearchOnPoeTradeEnabledH")
+ GuiAddCheckbox("Search (poe.trade):", "x657 yp+32 w165 h20 0x0100", TradeOpts.OpenSearchOnPoeTradeEnabled, "OpenSearchOnPoeTradeEnabled", "OpenSearchOnPoeTradeEnabledH", "", "", "SettingsUI")
AddToolTip(OpenSearchOnPoeTradeEnabledH, "Open your search on poe.trade instead of showing`na tooltip with results.")
- GuiAddHotkey(TradeOpts.OpenSearchOnPoeTradeHotKey, "x+1 yp-2 w124 h20", "OpenSearchOnPoeTradeHotKey", "OpenSearchOnPoeTradeHotKeyH")
+ GuiAddHotkey(TradeOpts.OpenSearchOnPoeTradeHotKey, "x+1 yp-2 w124 h20", "OpenSearchOnPoeTradeHotKey", "OpenSearchOnPoeTradeHotKeyH", "", "", "SettingsUI")
AddToolTip(OpenSearchOnPoeTradeHotKeyH, "Press key/key combination.`nDefault: ctrl + q")
- GuiAddCheckbox("Search (poeapp.com):", "x657 yp+32 w165 h20 0x0100", TradeOpts.OpenSearchOnPoEAppEnabled, "OpenSearchOnPoEAppEnabled", "OpenSearchOnPoEAppEnabledH")
+ GuiAddCheckbox("Search (poeapp.com):", "x657 yp+32 w165 h20 0x0100", TradeOpts.OpenSearchOnPoEAppEnabled, "OpenSearchOnPoEAppEnabled", "OpenSearchOnPoEAppEnabledH", "", "", "SettingsUI")
AddToolTip(OpenSearchOnPoEAppEnabledH, "Open your search on poeapp.com instead of showing`na tooltip with results.")
- GuiAddHotkey(TradeOpts.OpenSearchOnPoEAppHotKey, "x+1 yp-2 w124 h20", "OpenSearchOnPoEAppHotKey", "OpenSearchOnPoEAppHotKeyH")
+ GuiAddHotkey(TradeOpts.OpenSearchOnPoEAppHotKey, "x+1 yp-2 w124 h20", "OpenSearchOnPoEAppHotKey", "OpenSearchOnPoEAppHotKeyH", "", "", "SettingsUI")
AddToolTip(OpenSearchOnPoEAppHotKeyH, "Press key/key combination.`nDefault: ctrl + shift + q")
- GuiAddCheckbox("Open Item (Wiki):", "x657 yp+32 w165 h20 0x0100", TradeOpts.OpenWikiEnabled, "OpenWikiEnabled", "OpenWikiEnabledH")
+ GuiAddCheckbox("Open Item (Wiki):", "x657 yp+32 w165 h20 0x0100", TradeOpts.OpenWikiEnabled, "OpenWikiEnabled", "OpenWikiEnabledH", "", "", "SettingsUI")
AddToolTip(OpenWikiEnabledH, "Open your items page on the PoE-Wiki.")
- GuiAddHotkey(TradeOpts.OpenWikiHotKey, "x+1 yp-2 w124 h20", "OpenWikiHotKey", "OpenWikiHotKeyH")
+ GuiAddHotkey(TradeOpts.OpenWikiHotKey, "x+1 yp-2 w124 h20", "OpenWikiHotKey", "OpenWikiHotKeyH", "", "", "SettingsUI")
AddToolTip(OpenWikiHotKeyH, "Press key/key combination.`nDefault: ctrl + w")
- GuiAddCheckbox("Show Item Age:", "x657 yp+32 w165 h20 0x010", TradeOpts.ShowItemAgeEnabled, "ShowItemAgeEnabled", "ShowItemAgeEnabledH")
+ GuiAddCheckbox("Show Item Age:", "x657 yp+32 w165 h20 0x010", TradeOpts.ShowItemAgeEnabled, "ShowItemAgeEnabled", "ShowItemAgeEnabledH", "", "", "SettingsUI")
AddToolTip(ShowItemAgeEnabledH, "Checks your item's age.")
- GuiAddHotkey(TradeOpts.ShowItemAgeHotkey, "x+1 yp-2 w124 h20", "ShowItemAgeHotkey", "ShowItemAgeHotkeyH")
+ GuiAddHotkey(TradeOpts.ShowItemAgeHotkey, "x+1 yp-2 w124 h20", "ShowItemAgeHotkey", "ShowItemAgeHotkeyH", "", "", "SettingsUI")
AddToolTip(ShowItemAgeHotkeyH, "Press key/key combination.`nDefault: ctrl + e")
- GuiAddCheckbox("Change League:", "x657 yp+32 w165 h20 0x0100", TradeOpts.ChangeLeagueEnabled, "ChangeLeagueEnabled", "ChangeLeagueEnabledH")
+ GuiAddCheckbox("Change League:", "x657 yp+32 w165 h20 0x0100", TradeOpts.ChangeLeagueEnabled, "ChangeLeagueEnabled", "ChangeLeagueEnabledH", "", "", "SettingsUI")
AddToolTip(ChangeLeagueEnabledH, "Changes the league you're searching for the item in.")
- GuiAddHotkey(TradeOpts.ChangeLeagueHotkey, "x+1 yp-2 w124 h20", "ChangeLeagueHotkey", "ChangeLeagueHotkeyH")
+ GuiAddHotkey(TradeOpts.ChangeLeagueHotkey, "x+1 yp-2 w124 h20", "ChangeLeagueHotkey", "ChangeLeagueHotkeyH", "", "", "SettingsUI")
AddToolTip(ChangeLeagueHotkeyH, "Press key/key combination.`nDefault: ctrl + l")
- GuiAddCheckbox("Get currency ratio note:", "x657 yp+32 w165 h20 0x0100", TradeOpts.SetCurrencyRatio, "SetCurrencyRatio", "SetCurrencyRatioH")
+ GuiAddCheckbox("Get currency ratio note:", "x657 yp+32 w165 h20 0x0100", TradeOpts.SetCurrencyRatio, "SetCurrencyRatio", "SetCurrencyRatioH", "", "", "SettingsUI")
AddToolTip(SetCurrencyRatioH, "Copies an item note for premium tabs to your clipboard`nthat creates a valid currency ratio on all trade sites.")
- GuiAddHotkey(TradeOpts.SetCurrencyRatioHotkey, "x+1 yp-2 w124 h20", "SetCurrencyRatioHotkey", "SetCurrencyRatioHotkeyH")
+ GuiAddHotkey(TradeOpts.SetCurrencyRatioHotkey, "x+1 yp-2 w124 h20", "SetCurrencyRatioHotkey", "SetCurrencyRatioHotkeyH", "", "", "SettingsUI")
AddToolTip(SetCurrencyRatioHotkeyH, "Press key/key combination.`nDefault: alt + r")
- Gui, Add, Link, x657 yp+35 w210 h20 cBlue BackgroundTrans, Hotkey Options
+ Gui, SettingsUI:Add, Link, x657 yp+35 w210 h20 cBlue BackgroundTrans, Hotkey Options
/*
Cookies
*/
- GuiAddGroupBox("[TradeMacro] Manual cookie selection", "x647 yp+40 w310 h160")
+ GuiAddGroupBox("[TradeMacro] Manual cookie selection", "x647 yp+40 w310 h160", "", "", "", "", "")
- GuiAddCheckbox("Overwrite automatic cookie retrieval.", "x657 yp+20 w250 h30", TradeOpts.UseManualCookies, "UseManualCookies", "UseManualCookiesH")
+ GuiAddCheckbox("Overwrite automatic cookie retrieval.", "x657 yp+20 w250 h30", TradeOpts.UseManualCookies, "UseManualCookies", "UseManualCookiesH", "", "", "SettingsUI")
AddToolTip(UseManualCookiesH, "Use your own cookies instead of automatically retrieving`nthem from Internet Explorer.")
- GuiAddText("User-Agent:", "x657 yp+32 w120 h20 0x0100", "LblUserAgent", "LblUserAgentH")
+ GuiAddText("User-Agent:", "x657 yp+32 w120 h20 0x0100", "LblUserAgent", "LblUserAgentH", "", "", "SettingsUI")
AddToolTip(LblUserAgentH, "Your browsers user-agent. See 'How to'.")
- GuiAddEdit(TradeOpts.UserAgent, "x+10 yp-2 w160 h20", "UserAgent", "UserAgentH")
+ GuiAddEdit(TradeOpts.UserAgent, "x+10 yp-2 w160 h20", "UserAgent", "UserAgentH", "", "", "SettingsUI")
- GuiAddText("__cfduid:", "x657 yp+30 w120 h20 0x0100", "LblCfdUid", "LblCfdUidH")
+ GuiAddText("__cfduid:", "x657 yp+30 w120 h20 0x0100", "LblCfdUid", "LblCfdUidH", "", "", "SettingsUI")
AddToolTip(LblCfdUidH, "'__cfduid' cookie. See 'How to'.")
- GuiAddEdit(TradeOpts.CfdUid, "x+10 yp-2 w160 h20", "CfdUid", "CfdUidH")
+ GuiAddEdit(TradeOpts.CfdUid, "x+10 yp-2 w160 h20", "CfdUid", "CfdUidH", "", "", "SettingsUI")
- GuiAddText("cf_clearance:", "x657 yp+30 w120 h20 0x0100", "LblCfClearance", "LblCfClearanceH")
+ GuiAddText("cf_clearance:", "x657 yp+30 w120 h20 0x0100", "LblCfClearance", "LblCfClearanceH", "", "", "SettingsUI")
AddToolTip(LblCfClearanceH, "'cf_clearance' cookie. See 'How to'.")
- GuiAddEdit(TradeOpts.CfClearance, "x+10 yp-2 w160 h20", "CfClearance", "CfClearanceH")
+ GuiAddEdit(TradeOpts.CfClearance, "x+10 yp-2 w160 h20", "CfClearance", "CfClearanceH", "", "", "SettingsUI")
- Gui, Add, Link, x657 yp+28 w210 h20 cBlue BackgroundTrans, How to
+ Gui, SettingsUI:Add, Link, x657 yp+28 w210 h20 cBlue BackgroundTrans, How to
/*
Buttons
*/
- GuiAddText("Mouse over settings to see a detailed description.", "x657 yp+40 w300 h30")
+ GuiAddText("Mouse over settings to see a detailed description.", "x657 yp+40 w300 h30", "", "", "", "", "SettingsUI")
- GuiAddCheckbox("Debug Output", "x657 yp+13 w100 h25", TradeOpts.Debug, "Debug", "DebugH")
+ GuiAddCheckbox("Debug Output", "x657 yp+13 w100 h25", TradeOpts.Debug, "Debug", "DebugH", "", "", "SettingsUI")
AddToolTip(DebugH, "Don't use this unless you're developing!")
- GuiAddButton("Defaults", "x659 y+10 w90 h23", "TradeSettingsUI_BtnDefaults")
- GuiAddButton("Ok", "Default x+5 yp+0 w90 h23", "TradeSettingsUI_BtnOK")
- GuiAddButton("Cancel", "x+5 yp+0 w90 h23", "TradeSettingsUI_BtnCancel")
+ GuiAddButton("Defaults", "x659 y+10 w90 h23", "TradeSettingsUI_BtnDefaults", "", "", "", "SettingsUI")
+ GuiAddButton("Ok", "Default x+5 yp+0 w90 h23", "TradeSettingsUI_BtnOK", "", "", "", "SettingsUI")
+ GuiAddButton("Cancel", "x+5 yp+0 w90 h23", "TradeSettingsUI_BtnCancel", "", "", "", "SettingsUI")
- GuiAddText("Use these buttons to change TradeMacro settings (ItemInfo has it's own buttons).", "x657 y+10 w300 h50 cRed")
+ GuiAddText("Use these buttons to change TradeMacro settings (ItemInfo has it's own buttons).", "x657 y+10 w300 h50 cRed", "", "", "", "", "SettingsUI")
- Gui, Tab, 2
+ Gui, SettingsUI:Tab, 2
}
TradeFunc_GetDelimitedLeagueList() {
@@ -851,7 +859,7 @@ TradeFunc_GetDelimitedCurrencyListString() {
CurrencyList := ""
CurrencyTemp := TradeGlobals.Get("CurrencyIDs")
CurrencyTemp := TradeCurrencyNames.eng
-
+
For currName, currID in CurrencyTemp {
name := RegExReplace(currName, "i)_", " ")
; only use real currency items here
@@ -1039,7 +1047,9 @@ TradeFunc_ParseSearchFormOptions() {
FileDelete, %A_ScriptDir%\temp\poe_trade_search_form_options.txt
}
-TradeFunc_DownloadDataFiles() {
+TradeFunc_DownloadDataFiles() {
+ SplashUI.SetSubMessage("Downloading latest data files from github...")
+
; disabled while using debug mode
owner := TradeGlobals.Get("GithubUser", "POE-TradeMacro")
repo := TradeGlobals.Get("GithubRepo", "POE-TradeMacro")
@@ -1077,6 +1087,7 @@ TradeFunc_DownloadDataFiles() {
}
TradeFunc_CheckIfCloudFlareBypassNeeded() {
+ SplashUI.SetSubMessage("Testing connection to poe.trade...")
; call this function without parameters to access poe.trade without cookies
; if it succeeds we don't need any cookies
If (!TradeFunc_TestCloudflareBypass("http://poe.trade", "", "", "", false, "PreventErrorMsg")) {
@@ -1086,7 +1097,7 @@ TradeFunc_CheckIfCloudFlareBypassNeeded() {
TradeFunc_ReadCookieData() {
If (!TradeOpts.UseManualCookies) {
- SplashTextOn, 500, 40, PoE-TradeMacro, Reading user-agent and cookies from poe.trade, this can take`na few seconds if your Internet Explorer doesn't have the cookies cached.
+ SplashUI.SetSubMessage("Reading user-agent and cookies from poe.trade, this can take`na few seconds if your Internet Explorer doesn't have the cookies cached.")
If (TradeOpts.DeleteCookies) {
TradeFunc_ClearWebHistory()
@@ -1207,7 +1218,7 @@ TradeFunc_ReadCookieData() {
}
}
- SplashTextOff
+ SplashUI.DestroyUI()
If (CookieErrorLevel or BypassFailed or CompiledExeNotFound) {
; collect debug information
ScriptVersion := TradeGlobals.Get("ReleaseVersion")
@@ -1454,7 +1465,7 @@ TradeFunc_TestCloudflareBypass(Url, UserAgent="", cfduid="", cfClearance="", use
Return 1
}
Else If (appendedCode1 = "000") {
- SplashTextOff
+ SplashUI.DestroyUI()
msg := "Test request to poe.trade timed out (was aborted by the client). You can continue the script but you may experience issues when making any search requests."
msg .= "`n`n" "This is most likely caused by poe.trade server issues."
msg .= "`n`n" "You can change the timout for these requests (currently " TradeOpts.CurlTimeout "s) in the settings menu -> ""TradeMacro"" tab -> ""General"" section."
@@ -1473,7 +1484,7 @@ TradeFunc_TestCloudflareBypass(Url, UserAgent="", cfduid="", cfClearance="", use
}
TradeFunc_HandleConnectionFailure(authHeaders, returnedHeaders, url = "") {
- SplashTextOff
+ SplashUI.DestroyUI()
Gui, ConnectionFailure:Add, Text, x10 cRed, Request to %url% using cookies failed!
text := "You can continue to run PoE-TradeMacro with limited functionality.`nThe only searches that will work are the ones`ndirectly openend in your browser."
Gui, ConnectionFailure:Add, Text, , % text
@@ -1549,18 +1560,19 @@ TradeFunc_GetOSInfo() {
}
;----------------------- SplashScreens ---------------------------------------
-TradeFunc_StartSplashScreen() {
+TradeFunc_StartSplashScreen(TradeReleaseVersion) {
/*
initArray := ["Initializing script...", "Preparing Einhars welcoming party...", "Uninstalling Battle.net...", "Investigating the so-called ""Immortals""...", "Starting mobile app..."
, "Hunting some old friends...", "Interrogating Master Krillson about fishing secrets...", "Trying to open Voricis chest...", "Setting up lab carries for the other 99%..."
, "Helping Alva discover the Jungle Hideout...", "Conning EngineeringEternity with the Atlas City Shuffle...", "Vendoring stat-sticks..."]
*/
-
+
initArray := ["Initializing script...", "Preparing Einhars welcoming party...", "Uninstalling Battle.net...", "Investigating the so-called ""Immortals""..."
, "Hunting some old friends...", "Setting up lab carries for the other 99%...", "Msg @ScourgeOfTheImmortals to share new map hideouts with me."]
Random, randomNum, 1, initArray.MaxIndex()
- SplashTextOn, 430, 20, PoE-TradeMacro, % initArray[randomNum]
+
+ global SplashUI := new SplashUI("on", "PoE-TradeMacro", initArray[randomNum], "", TradeReleaseVersion, A_ScriptDir "\resources\images\greydot.png")
}
TradeFunc_FinishTMInit(argumentMergeScriptPath) {
@@ -1570,7 +1582,7 @@ TradeFunc_FinishTMInit(argumentMergeScriptPath) {
WinClose, %argumentMergeScriptPath% ahk_class AutoHotkey
WinKill, %argumentMergeScriptPath% ahk_class AutoHotkey
- ; SplashText gets disabled by ItemInfo
+ ; SplashScreen gets disabled by ItemInfo
If (TradeOpts.Debug) {
Menu, Tray, Add ; Separator
Menu, Tray, Add, Test Item Pricing, DebugTestItemPricing
@@ -1588,7 +1600,7 @@ TradeFunc_FinishTMInit(argumentMergeScriptPath) {
console.log("Fetching gem names failed.")
}
}
-
+
; Let timer run until ItemInfos global settings are set to overwrite them.
SetTimer, OverwriteSettingsWidthTimer, 250
SetTimer, OverwriteSettingsHeightTimer, 250
@@ -1596,6 +1608,7 @@ TradeFunc_FinishTMInit(argumentMergeScriptPath) {
SetTimer, OverwriteSettingsNameTimer, 250
SetTimer, ChangeScriptListsTimer, 250
SetTimer, OverwriteUpdateOptionsTimer, 250
+ SplashUI.SetSubMessage("Fetching currency data for currently selected league...")
GoSub, ReadPoeNinjaCurrencyData
GoSub, TrackUserCount
}
diff --git a/resources/ahk/jsonData.ahk b/resources/ahk/jsonData.ahk
index 98d19156..f15139f9 100644
--- a/resources/ahk/jsonData.ahk
+++ b/resources/ahk/jsonData.ahk
@@ -3,8 +3,6 @@
; Data is available via global variables
; json scraped with https://github.com/Eruyome/scrapeVariableUniqueItems/
-#Include, %A_ScriptDir%\lib\JSON.ahk
-
; when using the fallback exe we're missing the parameters passed by the merge script and missed clearing the temp folder
argumentIsMergedScript = %5%
If (argumentIsMergedScript != "isMergedScript") {
@@ -13,35 +11,24 @@ If (argumentIsMergedScript != "isMergedScript") {
}
; Parse the unique items data
-FileRead, JSONFile, %A_ScriptDir%\data_trade\uniques.json
-parsedJSON := JSON.Load(JSONFile)
-global TradeUniqueData := parsedJSON.uniques
+global TradeUniqueData := ReadJSONDataFromFile(A_ScriptDir "\data_trade\uniques.json", "uniques")
; Parse the unique relic items data
-FileRead, JSONFile, %A_ScriptDir%\data_trade\relics.json
-parsedJSON := JSON.Load(JSONFile)
-global TradeRelicData := parsedJSON.relics
+global TradeRelicData := ReadJSONDataFromFile(A_ScriptDir "\data_trade\relics.json", "relics")
; Parse the poe.trade mods
-FileRead, JSONFile, %A_ScriptDir%\data_trade\mods.json
-parsedJSON := JSON.Load(JSONFile)
-global TradeModsData := parsedJSON.mods
+global TradeModsData := ReadJSONDataFromFile(A_ScriptDir "\data_trade\mods.json", "mods")
; Parse currency names (in-game names mapped to poe.trade names)
-FileRead, JSONFile, %A_ScriptDir%\data_trade\currencyNames.json
-parsedJSON := JSON.Load(JSONFile)
-global TradeCurrencyNames := parsedJSON.currencyNames
+global TradeCurrencyNames := ReadJSONDataFromFile(A_ScriptDir "\data_trade\currencyNames.json", "currencyNames")
; Parse fallback currency IDs
-FileRead, JSONFile, %A_ScriptDir%\data_trade\currencyIDs_Fallback.json
-parsedJSON := JSON.Load(JSONFile)
-global TradeCurrencyIDsFallback := parsedJSON
+global TradeCurrencyIDsFallback := ReadJSONDataFromFile(A_ScriptDir "\data_trade\currencyIDs_Fallback.json")
; Parse the unique items data
-FileRead, JSONFile, %A_ScriptDir%\data_trade\currency_tags.json
-parsedJSON := JSON.Load(JSONFile)
-global TradeCurrencyTags := parsedJSON.tags
+global TradeCurrencyTags := ReadJSONDataFromFile(A_ScriptDir "\data_trade\currency_tags.json", "tags")
+SplashUI.SetSubMessage("Parsing leagues from GGGs API...")
; Download and parse the current leagues
postData := ""
reqHeaders := []
@@ -78,4 +65,48 @@ Try {
} Catch error {
MsgBox, 16, PoE-TradeMacro - Error, %errorMsg%
ExitApp
+}
+
+ReadJSONDataFromFile(filepath, key = "", critical = false) {
+ data :=
+
+ failed := false
+ errorMsg := "Parsing the JSON data from the file """ filepath """ failed."
+ errorMsg .= "`n" ""
+
+ Try {
+ test := FileExist(filepath)
+ If (test) {
+ FileRead, JSONFile, %filepath%
+ parsedJSON := JSON.Load(JSONFile)
+ If (StrLen(key)) {
+ data := parsedJSON[key]
+ } Else {
+ data := parsedJSON
+ }
+ }
+ Else {
+ errorMsg .= "`n" "The file doesn't exist."
+ failed := true
+ }
+ } Catch error {
+ errorMsg .= "`n" "The file may contain invalid JSON data which would mean that the file got ""broken."""
+ failed := true
+ }
+
+ If (failed) {
+ If (not critical) {
+ errorMsg .= "`n`n" "You can continue running the script so that you can go to the settings"
+ errorMsg .= "`n" "menu -> TradeMaco tab -> disable ""Download data files on start"" to make sure that this is not caused by a failed download."
+ errorMsg .= "`n`n" "You will have to use the data file from the original script download though to replace the missing/broken one."
+ }
+ errorMsg .= "`n`n" "Repeating the script start could solve this issue."
+
+ MsgBox, 16, PoE-TradeMacro - Error, %errorMsg%
+ If (critical) {
+ ExitApp
+ }
+ }
+
+ Return data
}
\ No newline at end of file
diff --git a/resources/images/greydot.png b/resources/images/greydot.png
new file mode 100644
index 00000000..79e70aa0
Binary files /dev/null and b/resources/images/greydot.png differ