#Requires AutoHotkey v2.0 #SingleInstance Force ; ------------------------------------------------------------------------- ; 1. Local Database INI Storage Path Setup ; ------------------------------------------------------------------------- global IniFilePath := A_ScriptDir "\dash_config.ini" ; Load saved settings or apply factory defaults if file doesn't exist yet global CurrentHotkey := IniRead(IniFilePath, "Settings", "Hotkey", "^3") global IsDarkMode := IniRead(IniFilePath, "Settings", "DarkMode", 1) ; 1 = True, 0 = False ; Theme Mapping Configurations global Color_DarkBG := "18191C" ; Discord Background Canvas global Color_DarkCard := "2B2D31" ; Discord Card Canvas global Color_DarkText := "F2F3F5" ; Off-White global Color_LightBG := "EBEDF0" ; Clean Light Canvas global Color_LightCard := "FFFFFF" ; Pure White Cards global Color_LightText := "313338" ; Dark Charcoal Text ; Track active controls global ModDash := Gui("+AlwaysOnTop -SysMenu +ToolWindow", "Staff Command Dashboard") global CustomButtons := [] global MainGroupboxes := [] global GeneralTextLabels := [] ; ------------------------------------------------------------------------- ; 2. Core Operational Utilities & Custom Functions ; ------------------------------------------------------------------------- ReadableHotkey(RawKey) { ; Flawless precise translation rules to stop symbol mixing bugs out := RawKey out := RegExReplace(out, "^\^", "Ctrl + ") out := RegExReplace(out, "^!", "Alt + ") out := RegExReplace(out, "^\+", "Shift + ") out := RegExReplace(out, "^#", "Win + ") return out } ToggleGuiDisplay(*) { global ModDash if DllCall("IsWindowVisible", "Ptr", ModDash.Hwnd) ModDash.Hide() else ModDash.Show() } SendBlueprint(TemplateText) { global ModDash ModDash.Hide() Sleep(50) SendText(TemplateText) } AddCustomGroupBox(x, y, w, h, titleText) { global ModDash, MainGroupboxes lblTitle := ModDash.Add("Text", "x" (x+12) " y" y " h20 +BackgroundTrans", titleText) textGuesstimateWidth := StrLen(titleText) * 7.5 lineTopLeft := ModDash.Add("Text", "x" x " y" (y+10) " w10 h2") lineTopRight := ModDash.Add("Text", "x" (x + 16 + textGuesstimateWidth) " y" (y+10) " w" (w - 16 - textGuesstimateWidth) " h2") lineLeft := ModDash.Add("Text", "x" x " y" (y+10) " w2 h" (h-10)) lineRight := ModDash.Add("Text", "x" (x+w-2) " y" (y+10) " w2 h" (h-10)) lineBottom := ModDash.Add("Text", "x" x " y" (y+h) " w" w " h2") MainGroupboxes.Push({title: lblTitle, t1: lineTopLeft, t2: lineTopRight, l: lineLeft, r: lineRight, b: lineBottom}) } AddCustomButton(PositionString, LabelText, ActionCallback) { global ModDash, CustomButtons RegExMatch(PositionString, "x(\d+)\s+y(\d+)\s+w(\d+)\s+h(\d+)", &match) x := Integer(match[1]), y := Integer(match[2]), w := Integer(match[3]), h := Integer(match[4]) btnBg := ModDash.Add("Text", PositionString) btnText := ModDash.Add("Text", "x" x " y" (y + (h//2) - 10) " w" w " h20 +Center +BackgroundTrans", LabelText) btnBg.OnEvent("Click", ActionCallback) btnText.OnEvent("Click", ActionCallback) CustomButtons.Push({bg: btnBg, txt: btnText}) } UpdateColorPalette() { global IsDarkMode, MainGroupboxes, GeneralTextLabels, CustomButtons, ModDash, btnTheme canvasBG := IsDarkMode ? Color_DarkBG : Color_LightBG cardBG := IsDarkMode ? Color_DarkCard : Color_LightCard textColor := IsDarkMode ? "c" Color_DarkText : "c" Color_LightText lineColor := IsDarkMode ? "Background" Color_DarkCard : "Background" Color_LightCard ModDash.BackColor := canvasBG for lbl in GeneralTextLabels lbl.SetFont(textColor) for grp in MainGroupboxes { grp.title.SetFont(textColor " bold") grp.t1.Opt(lineColor) grp.t2.Opt(lineColor) grp.l.Opt(lineColor) grp.r.Opt(lineColor) grp.b.Opt(lineColor) } for btnItem in CustomButtons { btnItem.bg.Opt("+Background" cardBG) btnItem.txt.SetFont("Norm s10 " textColor, "Segoe UI") } btnTheme.Text := IsDarkMode ? "Light Mode" : "Dark Mode" WinRedraw(ModDash.Hwnd) } ApplyThemeCycle(*) { global IsDarkMode, IniFilePath IsDarkMode := !IsDarkMode ; Commit the choice instantly to our permanent local memory database IniWrite(IsDarkMode ? 1 : 0, IniFilePath, "Settings", "DarkMode") UpdateColorPalette() } SaveAssembledHotkey(GuiObj, radType, ddlMod, ddlAlpha, ddlFKey) { global CurrentHotkey, btnKeyDisplay, IniFilePath formulaStr := "" if (radType.Value == 1) { modText := ddlMod.Text if InStr(modText, "Ctrl") formulaStr .= "^" if InStr(modText, "Alt") formulaStr .= "!" if InStr(modText, "Shift") formulaStr .= "+" if InStr(modText, "Win") formulaStr .= "#" if (ddlAlpha.Text == "None") { MsgBox("Selection Fault: Please select a Key/Letter character.", "Selection Missing", "Icon!") return } formulaStr .= ddlAlpha.Text } else { if (ddlFKey.Text == "None") { MsgBox("Selection Fault: Please pick an active Function key.", "Selection Missing", "Icon!") return } formulaStr .= ddlFKey.Text } try Hotkey(CurrentHotkey, "Off") try { Hotkey(formulaStr, ToggleGuiDisplay, "On") CurrentHotkey := formulaStr ; Save updated custom binding value to our permanent storage file path IniWrite(formulaStr, IniFilePath, "Settings", "Hotkey") btnKeyDisplay.Text := ReadableHotkey(formulaStr) GuiObj.Destroy() } catch { MsgBox("Registration Error: System rejected this key combination.", "Conflict Fault", "Iconx") try Hotkey(CurrentHotkey, ToggleGuiDisplay, "On") } } OpenHotkeyBuilder(*) { global ModDash, IsDarkMode BuilderGui := Gui("+AlwaysOnTop +Owner" ModDash.Hwnd, "Shortcut Builder") BuilderGui.BackColor := IsDarkMode ? Color_DarkBG : Color_LightBG textColor := IsDarkMode ? "c" Color_DarkText : "c" Color_LightText BuilderGui.SetFont("s10 bold " textColor, "Segoe UI") BuilderGui.Add("Text", "x15 y15 w400", "Choose Your Trigger Method Type:") BuilderGui.SetFont("Norm s10 " textColor) radCombo := BuilderGui.Add("Radio", "x20 y40 w180 Checked", "Keyboard Shortcut Combo") radFKey := BuilderGui.Add("Radio", "x210 y40 w180", "Standalone Function Key") BuilderGui.SetFont("s10 bold " textColor, "Segoe UI") lblMod := BuilderGui.Add("Text", "x15 y80 w160", "Combo Modifiers") lblAlpha := BuilderGui.Add("Text", "x190 y80 w100", "Letter / Key") lblFKey := BuilderGui.Add("Text", "x15 y80 w200 Hidden", "Select Function Key") BuilderGui.SetFont("Norm s10 c000000", "Segoe UI") modCombos := ["Ctrl", "Ctrl+Shift", "Ctrl+Alt", "Ctrl+Win", "Ctrl+Shift+Alt", "Ctrl+Shift+Win", "Alt", "Alt+Shift", "Shift"] ddlMod := BuilderGui.Add("DropDownList", "x15 y105 w160 Choose1", modCombos) alphaKeys := ["None"] loop 10 alphaKeys.Push(String(A_Index - 1)) loop 26 alphaKeys.Push(Chr(A_Index + 64)) ddlAlpha := BuilderGui.Add("DropDownList", "x190 y105 w100 Choose5", alphaKeys) fKeys := ["None"] loop 12 fKeys.Push("F" A_Index) ddlFKey := BuilderGui.Add("DropDownList", "x15 y105 w200 Choose1 Hidden", fKeys) OnRadioChange(*) { if (radCombo.Value == 1) { lblMod.Visible := true, lblAlpha.Visible := true, ddlMod.Visible := true, ddlAlpha.Visible := true lblFKey.Visible := false, ddlFKey.Visible := false } else { lblMod.Visible := false, lblAlpha.Visible := false, ddlMod.Visible := false, ddlAlpha.Visible := false lblFKey.Visible := true, ddlFKey.Visible := true } } radCombo.OnEvent("Click", OnRadioChange) radFKey.OnEvent("Click", OnRadioChange) BuilderGui.SetFont("s10 bold", "Segoe UI") btnSave := BuilderGui.Add("Button", "x140 y165 w160 h35", "Save Shortcut Setup") btnSave.OnEvent("Click", (*) => SaveAssembledHotkey(BuilderGui, radCombo, ddlMod, ddlAlpha, ddlFKey)) BuilderGui.Show("w440 h215") } OpenDashHelpWindow(*) { global ModDash, IsDarkMode HelpGui := Gui("+AlwaysOnTop +Owner" ModDash.Hwnd, "Help Guide") HelpGui.BackColor := IsDarkMode ? Color_DarkBG : Color_LightBG txColor := IsDarkMode ? "c" Color_DarkText : "c" Color_LightText HelpGui.SetFont("s12 bold " txColor, "Segoe UI") HelpGui.Add("Text", "x15 y15 w420", "Staff Command Dashboard Help") HelpGui.SetFont("s10 Norm " txColor, "Segoe UI") helpText := ( "• To HIDE or SHOW this tool at any time, press your Menu Shortcut key combination.`n`n" "• To CHANGE your shortcut, click the text button showing the current hotkey at the top. This opens the choice selector wizard tab.`n`n" "• Click into your target Discord text message chatbox first, then press your hotkey to bring up this panel.`n`n" "• Click any action command button. The panel will automatically hide out of your way instantly, typing the raw layout template text directly into your Discord input box.`n`n" "• Press [Esc] at any time to instantly close this help page, the hotkey builder window, or hide the main panel tool." ) HelpGui.Add("Text", "x15 y50 w420 r12", helpText) HelpGui.Show("w450 h310") } BuildStaticInterface() { global ModDash, CurrentHotkey, CustomButtons, MainGroupboxes, GeneralTextLabels ModDash.SetFont("s10 q5", "Segoe UI") ; --- HEADER CONTROLS --- lblShortcut := ModDash.Add("Text", "x20 y22 w100", "Menu Shortcut: ") GeneralTextLabels.Push(lblShortcut) global btnKeyDisplay := ModDash.Add("Button", "x125 y15 w130 h30", ReadableHotkey(CurrentHotkey)) btnKeyDisplay.OnEvent("Click", OpenHotkeyBuilder) global btnTheme := ModDash.Add("Button", "x330 y15 w90 h30", "Light Mode") btnTheme.OnEvent("Click", ApplyThemeCycle) global btnDashHelp := ModDash.Add("Button", "x430 y15 w80 h30", "Help") btnDashHelp.OnEvent("Click", OpenDashHelpWindow) ; --- LEFT SIDE COLUMN --- AddCustomGroupBox(15, 65, 245, 170, "Dyno General & Logs") AddCustomButton("x30 y95 w100 h32", "Whois", (*) => SendBlueprint("/dynowhois [userID]")) AddCustomButton("x145 y95 w100 h32", "Modlogs", (*) => SendBlueprint("/dynomodlogs [userID] [pagenumber]")) AddCustomButton("x30 y137 w100 h32", "Dyno Notes", (*) => SendBlueprint("/dynonotes [user]")) AddCustomButton("x145 y137 w100 h32", "Add Dyno Note", (*) => SendBlueprint("/dynonote [user] [text]")) AddCustomButton("x30 y190 w215 h32", "Dyno Help Menu", (*) => SendBlueprint("/dynohelp")) AddCustomGroupBox(15, 250, 245, 130, "Dyno Enforcements") AddCustomButton("x30 y280 w100 h32", "Kick User", (*) => SendBlueprint("/dynokick [user] [reason]")) AddCustomButton("x145 y280 w100 h32", "Ban User", (*) => SendBlueprint("/dynoban [user] [limit] [reason]")) AddCustomButton("x30 y327 w100 h32", "Unban User", (*) => SendBlueprint("/dynounban [user id] [optional reason]")) AddCustomButton("x145 y327 w100 h32", "Clear Jail", (*) => SendBlueprint("!clearjail [optional #]")) AddCustomGroupBox(15, 395, 245, 170, "Dyno Roles & Case Tweaks") AddCustomButton("x30 y425 w100 h32", "Role Persist", (*) => SendBlueprint("/dynorolepersist add [user] role, (reason)")) AddCustomButton("x145 y425 w100 h32", "Temprole", (*) => SendBlueprint("/dynotemprole [user] [time] [role], [optional reason]")) AddCustomButton("x30 y470 w215 h32", "Edit Case Duration", (*) => SendBlueprint("/dynoduration [modlog ID] [limit]")) AddCustomButton("x30 y515 w215 h32", "Edit Case Reason", (*) => SendBlueprint("/dynoreason [case num] [reason]")) ; --- RIGHT SIDE COLUMN --- AddCustomGroupBox(275, 65, 245, 170, "Custom Utility Controls") AddCustomButton("x290 y95 w100 h32", "Quote a Rule", (*) => SendBlueprint("!rule [#/keyword/help] [optional @member]")) AddCustomButton("x405 y95 w100 h32", "Object Info", (*) => SendBlueprint("!disc [object/@mention/ID]")) AddCustomButton("x290 y137 w100 h32", "View Roles", (*) => SendBlueprint("!userroles [@member]")) AddCustomButton("x405 y137 w100 h32", "Timestamp", (*) => SendBlueprint("!ts [object/ID]")) AddCustomButton("x290 y190 w215 h32", "Emoji Link", (*) => SendBlueprint("!emoji [emote]")) AddCustomGroupBox(275, 250, 245, 130, "Carl Role Engine") AddCustomButton("x290 y280 w100 h32", "Add Role", (*) => SendBlueprint("roles add ")) AddCustomButton("x405 y280 w100 h32", "Remove Role", (*) => SendBlueprint("roles remove ")) AddCustomButton("x290 y327 w215 h32", "Bulk Swap Roles (c)", (*) => SendBlueprint("roles c ")) AddCustomGroupBox(275, 395, 245, 170, "Carl Notes Engine") AddCustomButton("x290 y425 w100 h32", "View Notes", (*) => SendBlueprint("notes ")) AddCustomButton("x405 y425 w100 h32", "Set Note", (*) => SendBlueprint("setnote ")) AddCustomButton("x290 y470 w215 h32", "Clear All Notes", (*) => SendBlueprint("clearnotes ")) AddCustomButton("x290 y515 w215 h32", "Remove Single Note ID", (*) => SendBlueprint("removenote ")) UpdateColorPalette() ModDash.Show("x100 y100 w535 h580") } ; Run Initialization Functions BuildStaticInterface() Hotkey(CurrentHotkey, ToggleGuiDisplay) #HotIf WinActive("ahk_id " . ModDash.Hwnd) || WinActive("Shortcut Builder") || WinActive("Help Guide") Esc:: { activeTitle := WinGetTitle("A") if (activeTitle == "Staff Blueprint Dashboard") ModDash.Hide() else WinClose("A") } #HotIf