In this initial build, I got everything to work pretty well. It's responsive and quick, the gui reads the mouse hovers reliably and I don't have any major problems (except in design and how I approached it):
But the above was really just a test, I wanted to rebuild it for better function and more variety:
And I really like this new version, but I'm having a lot of problems with it that I didn't have in the initial build despite the coding and methods being practically identical. I'm not sure why everything works so well in the first but not in this one. For example, my mouse hover functions should be (to my knowledge) correct here yet this new gui is only accepting a single mouse hover per side. An example:
Code: Select all
; Using OnMessage(0x200,"Highlight") in Auto-Execute
Highlight(wParam, lParam, Msg)
{
global xPos, yPos, id, control
MouseGetPos, xPos, yPos, id, control
IfInString, control, SysListView
{
if (control = "SysListView323")
Gosub, North1on
else
Gosub, North1off
if (control = "SysListView324")
Gosub, North1on
else
Gosub, North1off
}
}
Return
North1on:
GuiControl, +Background2B2B2B, North2A
GuiControl, +Background2B2B2B, North2B
GuiControl, +Background%G1%, North1A
GuiControl, +Background%G1%, North1B
Return
North1off:
GuiControl, +Background2B2B2B, North2A
GuiControl, +Background2B2B2B, North2B
GuiControl, +Background2B2B2B, North1A
GuiControl, +Background2B2B2B, North1B
Return
SysListView324 works where 323 does not, and this is happening everywhere for me in this code -- all of these controls *should* be rigged to work, but only one control out of four on all sides works as expected and I don't understand why. Can I get some assistance here or tips for a better way to do this (SysListView controls are the only ones I can get to behave this well without any flashing) or just an extra pair of eyes to comb over this code? I really need this part of it functioning before moving on because I want to design a few other MenuTypes and will need to put conditional statements in all the mouse-over labels for determining which controls to light up, etc. Here's the newest GUI code in entirety:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance, Force
; Settings
MenuType = Default
DPIoffset = 300
Count = 0
MCount = 0
; MToggle = U
; mNum = 0
CMark = 190
bgWH = 400
CoordMode, Mouse, Screen
; BG Colors
PanelBG = 161616
Mask = 2B2B2C
; RBGW Colors
R1 = D44400
R2 = DD6933
R3 = E58F66
G1 = 24EE49
G2 = 50F16D
G3 = 7CF592
B1 = 5064F1
B2 = 7383F4
B3 = 96A2F7
W1 = 878787
W2 = 656565
W3 = 444444
N0 = 2B2B2B
; Gui Settings
Gui, +LastFound -Border -Caption +Owner +AlwaysOnTop hwndGuiFLY
Gui, Margin , 0, 0
Gui, Color, %Mask%, %Mask%
Gui +LastFound
WinSet, TransColor, %Mask%
;
; Debug BG
; Gui, Add, Picture, x0 y0 vBG, pixL2.png
;
; Listview box controls
; North
Gui, Add, Listview, x135 y45 w130 h50 Background2B2B2B +ReadOnly vNorth2A -Hdr AltSubmit
Gui, Add, Listview, x200 y45 w65 h50 Background2B2B2B +ReadOnly vNorth2B -Hdr AltSubmit
Gui, Add, Listview, x170 y120 w60 h35 Background2B2B2B +ReadOnly vNorth1A -Hdr AltSubmit
Gui, Add, Listview, x200 y120 w30 h35 Background2B2B2B +ReadOnly vNorth1B -Hdr AltSubmit
; Center
Gui, Add, Listview, x%CMark% y%CMark% w20 h20 Background2B2B2B +ReadOnly vCenter -Hdr AltSubmit ; gGuiMove
; South
Gui, Add, Listview, x170 y245 w60 h35 Background2B2B2B +ReadOnly vSouth1A -Hdr AltSubmit
Gui, Add, Listview, x200 y245 w30 h35 Background2B2B2B +ReadOnly vSouth1B -Hdr AltSubmit
Gui, Add, Listview, x135 y305 w130 h50 Background2B2B2B +ReadOnly vSouth2A -Hdr AltSubmit
Gui, Add, Listview, x200 y305 w65 h50 Background2B2B2B +ReadOnly vSouth2B -Hdr AltSubmit
; West
Gui, Add, Listview, x45 y135 w50 h130 Background2B2B2B +ReadOnly vWest2A -Hdr AltSubmit
Gui, Add, Listview, x45 y200 w50 h65 Background2B2B2B +ReadOnly vWest2B -Hdr AltSubmit
Gui, Add, Listview, x120 y170 w35 h60 Background2B2B2B +ReadOnly vWest1A -Hdr AltSubmit
Gui, Add, Listview, x120 y200 w35 h30 Background2B2B2B +ReadOnly vWest1B -Hdr AltSubmit
; East
Gui, Add, Listview, x245 y170 w35 h60 Background2B2B2B +ReadOnly vEast1A -Hdr AltSubmit
Gui, Add, Listview, x245 y200 w35 h30 Background2B2B2B +ReadOnly vEast1B -Hdr AltSubmit
Gui, Add, Listview, x305 y135 w50 h130 Background2B2B2B +ReadOnly vEast2A -Hdr AltSubmit
Gui, Add, Listview, x305 y200 w50 h65 Background2B2B2B +ReadOnly vEast2B -Hdr AltSubmit
;
; Debug Anno
; Gui, Add, Picture, x0 y0 vBGanno, GuestAnno.png
;
OnMessage(0x200,"Highlight")
GuiControl, Hide, Center
Gosub, HideDupe1
Gosub, HideDupe2
;
Gui, Show, w%bgWH% h%bgWH% Hide Center
SetTimer, CapsLockIt, 5
; End Auto-Execute
Return
; Prevent Start Menu from activating on Windows Key
~LWin::
WinState := "D"
Return
~LWin Up::
WinState := ""
Return
; Activate GUI
#RButton::
; Gosub, ColorReset
WinGet, active_id, ID, A
WinActivate, ahk_id %active_id%
global xPos, yPos, id, control
MouseGetPos, xPos, yPos, id, control
mX := xPos-DPIoffset
mY := yPos-DPIoffset
Gui, Show, x%mX% y%mY% w%bgWH% h%bgWH%
Return
; Hide and reset GUI
#RButton Up::
; ToolTip
Gosub, gGuiHide
Gosub, ColorReset
Return
; Shifting through profiles
#MButton::
++MCount
If (MCount = 1) {
MenuType = Expand1
Gosub, Exp1
Gosub, Def2
} Else If (MCount = 2) {
MenuType = Expand2
Gosub, Def1
Gosub, Exp2
} Else If (MCount = 3) {
MenuType = Expand
Gosub, Exp1
Gosub, Exp2
} Else If (MCount = 4) {
Gosub, Debug1
Gosub, Debug2
MenuType = Debug
} Else If (MCount >= 5) {
Gosub, Def1
Gosub, Def2
MenuType = Default
MCount = 0
}
; Tooltip %MCount%
Return
gGuiHide:
Gui, Show, Hide
WinActivate, ahk_id %active_id%
Return
; CapsLock to debug and code listviews
CapsLockIt:
If !GetKeyState("CapsLock","T"){
Tooltip
} Else {
CoordMode, Mouse, Screen
; WinGet, CList, ControlList
; WinGet, IDalt, ID
; Winget, CListHWND, ControlListHwnd
; Winget, proID, PID
MouseGetPos, xPos, yPos, id, control
Tooltip %A_GuiControl%`n%MenuType%`n%control%
}
Return
ColorReset:
GuiControl, +Background2B2B2B, North1A
GuiControl, +Background2B2B2B, North1B
GuiControl, +Background2B2B2B, North2A
GuiControl, +Background2B2B2B, North2B
GuiControl, +Background2B2B2B, South1A
GuiControl, +Background2B2B2B, South1B
GuiControl, +Background2B2B2B, South2A
GuiControl, +Background2B2B2B, South2B
GuiControl, +Background2B2B2B, West1A
GuiControl, +Background2B2B2B, West1B
GuiControl, +Background2B2B2B, West2A
GuiControl, +Background2B2B2B, West2B
GuiControl, +Background2B2B2B, East1A
GuiControl, +Background2B2B2B, East1B
GuiControl, +Background2B2B2B, East2A
GuiControl, +Background2B2B2B, East2B
Return
ColorFull1:
GuiControl, +Background878787, North1A
GuiControl, +Background878787, North1B
GuiControl, +Background878787, South1A
GuiControl, +Background878787, South1B
GuiControl, +Background878787, West1A
GuiControl, +Background878787, West1B
GuiControl, +Background878787, East1A
GuiControl, +Background878787, East1B
Sleep, 100
Return
ColorFull2:
GuiControl, +Background878787, North2A
GuiControl, +Background878787, North2B
GuiControl, +Background878787, South2A
GuiControl, +Background878787, South2B
GuiControl, +Background878787, West2A
GuiControl, +Background878787, West2B
GuiControl, +Background878787, East2A
GuiControl, +Background878787, East2B
Sleep, 100
Return
HideDupe1:
GuiControl, Hide, North1B
GuiControl, Hide, South1B
GuiControl, Hide, West1B
GuiControl, Hide, East1B
Return
HideDupe2:
GuiControl, Hide, North2B
GuiControl, Hide, South2B
GuiControl, Hide, West2B
GuiControl, Hide, East2B
Return
ShowDupe1:
GuiControl, Show, North1B
GuiControl, Show, South1B
GuiControl, Show, West1B
GuiControl, Show, East1B
Return
ShowDupe2:
GuiControl, Show, North2B
GuiControl, Show, South2B
GuiControl, Show, West2B
GuiControl, Show, East2B
Return
; Inner Rim default
Def1:
Gosub, ColorFull1
; Gosub, CenterOn
GuiControl, Move, North1A, x170 y120 w60 h35
GuiControl, Move, North1B, x200 y120 w30 h35
GuiControl, Move, South1A, x170 y245 w60 h35
GuiControl, Move, South1B, x200 y245 w30 h35
GuiControl, Move, West1A, x120 y170 w35 h60
GuiControl, Move, West1B, x120 y200 w35 h30
GuiControl, Move, East1A, x245 y170 w35 h60
GuiControl, Move, East1B, x245 y200 w35 h30
Gosub, HideDupe1
; Gosub, CenterOff
Gosub, ColorReset
Return
; Outer Rim default
Def2:
; Gosub, CenterOn
Gosub, ColorFull2
GuiControl, Move, North2A, x135 y45 w130 h50
GuiControl, Move, North2B, x135 y45 w130 h50
GuiControl, Move, South2A, x135 y305 w130 h50
GuiControl, Move, South2B, x135 y305 w130 h50
GuiControl, Move, West2A, x45 y135 w50 h130
GuiControl, Move, West2B, x45 y135 w50 h130
GuiControl, Move, East2A, x305 y135 w50 h130
GuiControl, Move, East2B, x305 y135 w50 h130
Gosub, HideDupe2
; Gosub, CenterOff
Gosub, ColorReset
Return
Exp1:
; Gosub, CenterOn
Gosub, ColorFull1
GuiControl, Move, North1A, x120 y120 w60 h35
GuiControl, Move, North1B, x220 y120 w60 h35
GuiControl, Move, South1A, x120 y245 w60 h35
GuiControl, Move, South1B, x220 y245 w60 h35
GuiControl, Move, West1A, x120 y120 w35 h60
GuiControl, Move, West1B, x120 y220 w35 h60
GuiControl, Move, East1A, x245 y120 w35 h60
GuiControl, Move, East1B, x245 y220 w35 h60
Gosub, ShowDupe1
; Gosub, CenterOff
Gosub, ColorReset
Return
; Outer Rim expanded
Exp2:
; Gosub, CenterOn
Gosub, ColorFull2
GuiControl, Move, North2A, x45 y45 w120 h50
GuiControl, Move, North2B, x235 y45 w120 h50
GuiControl, Move, South2A, x45 y305 w120 h50
GuiControl, Move, South2B, x235 y305 w120 h50
GuiControl, Move, West2A, x45 y45 w50 h120
GuiControl, Move, West2B, x45 y235 w50 h120
GuiControl, Move, East2A, x305 y45 w50 h120
GuiControl, Move, East2B, x305 y235 w50 h120
Gosub, ShowDupe2
; Gosub, CenterOff
Gosub, ColorReset
Return
Debug1:
; Gosub, ColorFull1
GuiControl, Move, North1A, x170 y120 w30 h35
GuiControl, Move, North1B, x200 y120 w30 h35
GuiControl, Move, South1A, x170 y245 w30 h35
GuiControl, Move, South1B, x200 y245 w30 h35
GuiControl, Move, West1A, x120 y170 w35 h30
GuiControl, Move, West1B, x120 y200 w35 h30
GuiControl, Move, East1A, x245 y170 w35 h30
GuiControl, Move, East1B, x245 y200 w35 h30
; Gosub, HideDupe1
Gosub, ShowDupe1
Gosub, ColorReset
Return
Debug2:
; Gosub, CenterOn
GuiControl, Move, North2A, x135 y45 w65 h50
GuiControl, Move, North2B, x200 y45 w65 h50
GuiControl, Move, South2A, x135 y305 w65 h50
GuiControl, Move, South2B, x200 y305 w65 h50
GuiControl, Move, West2A, x45 y135 w50 h65
GuiControl, Move, West2B, x45 y200 w50 h65
GuiControl, Move, East2A, x305 y135 w50 h65
GuiControl, Move, East2B, x305 y200 w50 h65
Gosub, ShowDupe2
; Gosub, CenterOff
Gosub, ColorReset
Return
; East1A:
; ; CurrControl := RTrim(A_GuiControl, "AB")
; ; GuiControl, +Background878787, %A_GuiControl%
; ; Gosub, %CurrControl%
; GuiControl, +Background878787, %A_GuiControl%
; Return
CenterOn:
GuiControl, Show, Center
GuiControl, +Background878787, Center
Sleep, 150
GuiControl, +Background2B2B2B, Center
Return
CenterOff:
GuiControl, Hide, Center
Return
North2on:
GuiControl, +Background%G1%, North2A
GuiControl, +Background%G1%, North2B
GuiControl, +Background%G2%, North1A
GuiControl, +Background%G2%, North1B
Return
North2off:
GuiControl, +Background2B2B2B, North2A
GuiControl, +Background2B2B2B, North2B
GuiControl, +Background2B2B2B, North1A
GuiControl, +Background2B2B2B, North1B
Return
North1on:
GuiControl, +Background2B2B2B, North2A
GuiControl, +Background2B2B2B, North2B
GuiControl, +Background%G1%, North1A
GuiControl, +Background%G1%, North1B
Return
North1off:
GuiControl, +Background2B2B2B, North2A
GuiControl, +Background2B2B2B, North2B
GuiControl, +Background2B2B2B, North1A
GuiControl, +Background2B2B2B, North1B
Return
South2on:
GuiControl, +Background%W1%, South2A
GuiControl, +Background%W1%, South2B
GuiControl, +Background%W2%, South1A
GuiControl, +Background%W2%, South1B
Return
South2off:
GuiControl, +Background2B2B2B, South2A
GuiControl, +Background2B2B2B, South2B
GuiControl, +Background2B2B2B, South1A
GuiControl, +Background2B2B2B, South1B
Return
South1on:
GuiControl, +Background2B2B2B, South2A
GuiControl, +Background2B2B2B, South2B
GuiControl, +Background%W1%, South1A
GuiControl, +Background%W1%, South1B
Return
South1off:
GuiControl, +Background2B2B2B, South2A
GuiControl, +Background2B2B2B, South2B
GuiControl, +Background2B2B2B, South1A
GuiControl, +Background2B2B2B, South1B
Return
West2on:
GuiControl, +Background%R1%, West2A
GuiControl, +Background%R1%, West2B
GuiControl, +Background%R2%, West1A
GuiControl, +Background%R2%, West1B
Return
West2off:
GuiControl, +Background2B2B2B, West2A
GuiControl, +Background2B2B2B, West2B
GuiControl, +Background2B2B2B, West1A
GuiControl, +Background2B2B2B, West1B
Return
West1on:
GuiControl, +Background2B2B2B, West2A
GuiControl, +Background2B2B2B, West2B
GuiControl, +Background%R1%, West1A
GuiControl, +Background%R1%, West1B
Return
West1off:
GuiControl, +Background2B2B2B, West2A
GuiControl, +Background2B2B2B, West2B
GuiControl, +Background2B2B2B, West1A
GuiControl, +Background2B2B2B, West1B
Return
East2on:
GuiControl, +Background%B1%, East2A
GuiControl, +Background%B1%, East2B
GuiControl, +Background%B2%, East1A
GuiControl, +Background%B2%, East1B
Return
East2off:
GuiControl, +Background2B2B2B, East2A
GuiControl, +Background2B2B2B, East2B
GuiControl, +Background2B2B2B, East1A
GuiControl, +Background2B2B2B, East1B
Return
East1on:
GuiControl, +Background2B2B2B, East2A
GuiControl, +Background2B2B2B, East2B
GuiControl, +Background%B1%, East1A
GuiControl, +Background%B1%, East1B
Return
East1off:
GuiControl, +Background2B2B2B, East2A
GuiControl, +Background2B2B2B, East2B
GuiControl, +Background2B2B2B, East1A
GuiControl, +Background2B2B2B, East1B
Return
; For changing color of controls on mouse hover
Highlight(wParam, lParam, Msg)
{
global xPos, yPos, id, control
MouseGetPos, xPos, yPos, id, control
IfInString, control, SysListView
{
; North to South
if (control = "SysListView321")
Gosub, North2on
else
Gosub, North2off
if (control = "SysListView322")
Gosub, North2on
else
Gosub, North2off
if (control = "SysListView323")
Gosub, North1on
else
Gosub, North1off
if (control = "SysListView324")
Gosub, North1on
else
Gosub, North1off
if (control = "SysListView325")
Gosub, CenterOn
else
Gosub, CenterOff
if (control = "SysListView326")
Gosub, South1on
else
Gosub, South1off
if (control = "SysListView327")
Gosub, South1on
else
Gosub, South1off
if (control = "SysListView328")
Gosub, South2on
else
Gosub, South2off
if (control = "SysListView329")
Gosub, South2on
else
Gosub, South2off
if (control = "SysListView3210")
Gosub, West2on
else
Gosub, West2off
if (control = "SysListView3211")
Gosub, West2on
else
Gosub, West2off
if (control = "SysListView3212")
Gosub, West1on
else
Gosub, West1off
if (control = "SysListView3213")
Gosub, West1on
else
Gosub, West1off
if (control = "SysListView3214")
Gosub, East1on
else
Gosub, East1off
if (control = "SysListView3215")
Gosub, East1on
else
Gosub, East1off
if (control = "SysListView3216")
Gosub, East2on
else
Gosub, East2off
if (control = "SysListView3217")
Gosub, East2on
else
Gosub, East2off
}
}
Return
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance, force
; Settings
MenuType = 1
Count = 0
MCount = 1
MToggle = U
mNum = 0
CMark = 190
bgWH = 400
CoordMode, Mouse, Screen
; BG Colors
PanelBG = 161616
Mask = 2B2B2C
; RBGW Colors
R1 = D44400
R2 = DD6933
R3 = E58F66
G1 = 24EE49
G2 = 50F16D
G3 = 7CF592
B1 = 5064F1
B2 = 7383F4
B3 = 96A2F7
W1 = 878787
W2 = 656565
W3 = 444444
N0 = 2B2B2B
; Gui Settings
Gui, +LastFound +Border -Caption +Owner +AlwaysOnTop hwndGuiFLY
Gui, Margin , 0, 0
Gui, Color, %Mask%, %PanelBG%
Gui +LastFound
WinSet, TransColor, %Mask%
;
; Debug BG
Gui, Add, Picture, x0 y0 vBG, pixL2.png
;
; Listview box controls
; North
Gui, Add, Listview, x100 y35 w200 h50 Background2B2B2B +ReadOnly vNorth3 -Hdr AltSubmit
Gui, Add, Listview, x143 y98 w114 h34 Background2B2B2B +ReadOnly vNorth2 -Hdr AltSubmit
Gui, Add, Listview, x175 y148 w50 h20 Background2B2B2B +ReadOnly vNorth1 -Hdr AltSubmit
; Center
Gui, Add, Listview, x%CMark% y%CMark% w20 h20 Background2B2B2B +ReadOnly vCenter -Hdr AltSubmit gGuiMove
; South
Gui, Add, Listview, x175 y232 w50 h20 Background2B2B2B +ReadOnly vSouth1 -Hdr AltSubmit
Gui, Add, Listview, x143 y268 w114 h32 Background2B2B2B +ReadOnly vSouth2 -Hdr AltSubmit
Gui, Add, Listview, x100 y315 w200 h50 Background2B2B2B +ReadOnly vSouth3 -Hdr AltSubmit
; West
Gui, Add, Listview, x35 y100 w50 h200 Background2B2B2B +ReadOnly vWest3 -Hdr AltSubmit
Gui, Add, Listview, x98 y143 w34 h114 Background2B2B2B +ReadOnly vWest2 -Hdr AltSubmit
Gui, Add, Listview, x148 y175 w20 h50 Background2B2B2B +ReadOnly vWest1 -Hdr AltSubmit
; East
Gui, Add, Listview, x232 y175 w20 h50 Background2B2B2B +ReadOnly vEast1 -Hdr AltSubmit
Gui, Add, Listview, x268 y143 w34 h114 Background2B2B2B +ReadOnly vEast2 -Hdr AltSubmit
Gui, Add, Listview, x315 y100 w50 h200 Background2B2B2B +ReadOnly vEast3 -Hdr AltSubmit
;
; Debug Anno
Gui, Add, Picture, x0 y0 vBGanno, GuestAnno.png
;
OnMessage(0x200,"Highlight")
GuiControl, Hide, Center
GuiControl, Hide, BG
GuiControl, Hide, BGanno
;
Gui, Show, w%bgWH% h%bgWH% Hide Center
; End Auto-Execute
Return
; Toggle
CapsLock::
If !GetKeyState("CapsLock","T"){
SetCapsLockState, On
} Else {
SetCapsLockState, Off
}
Return
; Prevent Start Menu from activating on Windows Key
~LWin::
WinState := "D"
Return
~LWin Up::
WinState := ""
Return
; Activate GUI
#RButton::
Gosub, GuiClear
WinGet, active_id, ID, A
WinActivate, ahk_id %active_id%
global mouseX, mouseY, currWin, Hover
MouseGetPos, mouseX, mouseY, currWin, Hover
mX := mouseX-300
mY := mouseY-300
Gui, Show, x%mX% y%mY% w%bgWH% h%bgWH%
Return
; Hide and reset GUI
#RButton Up::
ToolTip
Gosub, gGuiHide
Return
; To Debug GUI control placement and size while coding
#MButton::
++MCount
If (A_PriorHotkey != A_ThisHotkey && mCount < 4) {
Gosub, Ring%mCount%
} Else {
If (MCount = 0) {
MToggle = "D"
mNum = 0
GuiControl, Hide, BGanno
GuiControl, Hide, BG
} Else If (MCount = 1) {
Gosub, Ring1
} Else If (MCount = 2) {
Gosub, Ring2
} Else If (MCount = 3) {
Gosub, Ring3
} Else If (MCount > 3) {
MCount = 0
Gosub, GuiClear
GuiControl, Hide, BGanno
GuiControl, Hide, BG
}
}
MenuType = %MCount%
; ToolTip %Count%`n%MCount%
Return
#WheelUp::
If (A_PriorHotkey != A_ThisHotkey or A_TimeSincePriorHotkey > 300) {
++Count
If (Count > 3) {
Count = -3
} Else If (Count = 3) {
Gosub, sNorth3
} Else If (Count = 2) {
Gosub, sNorth2
} Else If (Count = 1) {
Gosub, sNorth1
} Else If (Count = 0) {
Gosub, GuiClear
} Else If (Count = -1) {
Gosub, sSouth1
} Else If (Count = -2) {
Gosub, sSouth2
} Else If (Count = -3) {
Gosub, sSouth3
} Else If (Count < -3) {
Count = 3
}
}
; ToolTip %Count%`n%MCount%
Return
#WheelDown::
If (A_PriorHotkey != A_ThisHotkey or A_TimeSincePriorHotkey > 300) {
--Count
If (Count > 3) {
Count = -3
} Else If (Count = 3) {
Gosub, sNorth3
} Else If (Count = 2) {
Gosub, sNorth2
} Else If (Count = 1) {
Gosub, sNorth1
} Else If (Count = 0) {
Gosub, GuiClear
} Else If (Count = -1) {
Gosub, sSouth1
} Else If (Count = -2) {
Gosub, sSouth2
} Else If (Count = -3) {
Gosub, sSouth3
} Else If (Count < -3) {
Count = 3
}
}
; ToolTip %Count%`n%MCount%
Return
; Scroll / Mousewheel subs
; s%A_GuiControl%
sNorth3:
GuiControl, Move, North3, x35 w330
GuiControl, +Background%B1%, North3
GuiControl, Move, North2, x98 w204
GuiControl, +Background%G2%, North2
GuiControl, Move, North1, x148 w104
GuiControl, +Background%R3%, North1
Return
sNorth2:
GuiControl, Move, North3, x100 y35 w200 h50
GuiControl, +Background%N0%, North3
;
GuiControl, Move, North1, x148 w104
GuiControl, +Background%R2%, North1
GuiControl, Move, North2, x98 w204
GuiControl, +Background%G1%, North2
; ToolTip North2
Return
sNorth1:
GuiControl, Move, North3, x100 y35 w200 h50
GuiControl, Move, North2, x143 y98 w114 h34
GuiControl, +Background%N0%, North3
GuiControl, +Background%N0%, North2
;
GuiControl, Hide, Center
GuiControl, Move, North1, x148 w104
GuiControl, +Background%R1%, North1
; ToolTip North1
Return
sSouth1:
GuiControl, Move, South2, x143 y268 w114 h34
GuiControl, Move, South3, x100 y315 w200 h50
GuiControl, +Background%N0%, South2
GuiControl, +Background%N0%, South3
;
GuiControl, Hide, Center
GuiControl, Move, South1, x148 w104
GuiControl, +Background%W1%, South1
; ToolTip South1
Return
sSouth2:
GuiControl, Move, South3, x100 y315 w200 h50
GuiControl, +Background%N0%, South3
;
GuiControl, Move, South1, x148 w104
GuiControl, +Background%W2%, South1
GuiControl, Move, South2, x98 w204
GuiControl, +Background%W1%, South2
; ToolTip South2
Return
sSouth3:
; Send, {k}
GuiControl, Move, South1, x148 w104
GuiControl, +Background%W3%, South1
GuiControl, Move, South2, x98 w204
GuiControl, +Background%W2%, South2
GuiControl, Move, South3, x35 w330
GuiControl, +Background%W1%, South3
; ToolTip South3
Return
; Gesture / Mouseover subs
; g%A_GuiControl%
gNorth3:
If (MenuType = 1) {
GuiControl, Move, North3, x35 w330
GuiControl, +Background%G1%, North3
GuiControl, Move, North2, x98 w204
GuiControl, +Background%G2%, North2
GuiControl, Move, North1, x148 w104
GuiControl, +Background%G3%, North1
KeyWait, RButton
Gosub, gGuiHide
Gosub, GuiClear
WinActivate, ahk_class illustrator
Send, {F23}
Sleep, 50
Send, {l}
; MsgBox %MenuType%
} Else if (MenuType = 2) {
GuiControl, Move, North3, x35 w330
GuiControl, +Background%R1%, North3
GuiControl, Move, North2, x98 w204
GuiControl, +Background%R2%, North2
GuiControl, Move, North1, x148 w104
GuiControl, +Background%R3%, North1
KeyWait, RButton
Gosub, gGuiHide
Gosub, GuiClear
WinActivate, ahk_class illustrator
MsgBox %MenuType%
} Else if (MenuType = 3) {
GuiControl, Move, North3, x35 w330
GuiControl, +Background%B1%, North3
GuiControl, Move, North2, x98 w204
GuiControl, +Background%B2%, North2
GuiControl, Move, North1, x148 w104
GuiControl, +Background%B3%, North1
KeyWait, RButton
Gosub, gGuiHide
Gosub, GuiClear
WinActivate, ahk_class illustrator
MsgBox %MenuType%
} Else {
GuiControl, Move, North3, x35 w330
GuiControl, +Background%W1%, North3
GuiControl, Move, North2, x98 w204
GuiControl, +Background%W2%, North2
GuiControl, Move, North1, x148 w104
GuiControl, +Background%W3%, North1
KeyWait, RButton
Gosub, gGuiHide
Gosub, GuiClear
WinActivate, ahk_class illustrator
MsgBox %MenuType%
}
Return
gNorth3Lite:
GuiControl, Move, North3, x35 w330
GuiControl, +Background878787, North3
Return
gNorth2:
GuiControl, Move, North1, x148 w104
GuiControl, +Background%G2%, North1
GuiControl, Move, North2, x98 w204
GuiControl, +Background%G1%, North2
; ToolTip North2
Return
gNorth1:
GuiControl, Move, North1, x148 w104
GuiControl, +Background%G1%, North1
; ToolTip North1
Return
gSouth1:
GuiControl, Move, South1, x148 w104
GuiControl, +Background%W1%, South1
; ToolTip South1
Return
gSouth2:
GuiControl, Move, South1, x148 w104
GuiControl, +Background%W2%, South1
GuiControl, Move, South2, x98 w204
GuiControl, +Background%W1%, South2
; ToolTip South2
Return
gSouth3:
GuiControl, Move, South1, x148 w104
GuiControl, +Background%W3%, South1
GuiControl, Move, South2, x98 w204
GuiControl, +Background%W2%, South2
GuiControl, Move, South3, x35 w330
GuiControl, +Background%W1%, South3
; ToolTip %A_GuiControl%
; Sleep 1000
KeyWait, RButton
Gosub, gGuiHide
Gosub, GuiClear
Send, {p}
Return
gSouth3Lite:
GuiControl, Move, South3, x35 w330
GuiControl, +Background878787, South3
Return
gWest3:
GuiControl, Move, West3, y35 h330
GuiControl, +Background%R1%, West3
GuiControl, Move, West2, y98 h204
GuiControl, +Background%R2%, West2
GuiControl, Move, West1, y148 h104
GuiControl, +Background%R3%, West1
; ToolTip %A_GuiControl%
; Sleep 1000
KeyWait, RButton
Gosub, gGuiHide
Gosub, GuiClear
Send, {F22}
Sleep, 50
Send, {m}
Return
gWest2:
GuiControl, Move, West1, y148 h104
GuiControl, +Background%R2%, West1
GuiControl, Move, West2, y98 h204
GuiControl, +Background%R1%, West2
; ToolTip West2
Return
gWest1:
GuiControl, Move, West1, y148 h104
GuiControl, +Background878787, West1
; ToolTip West1
Return
gEast1:
GuiControl, Move, East1, y148 h104
GuiControl, +Background%B1%, East1
; ToolTip East1
Return
gEast2:
GuiControl, Move, East2, y98 h204
GuiControl, +Background%B1%, East2
GuiControl, Move, East1, y148 h104
GuiControl, +Background%B2%, East1
; ToolTip East2
Return
gEast3:
GuiControl, Move, East3, y35 h330
GuiControl, +Background%B1%, East3
GuiControl, Move, East2, y98 h204
GuiControl, +Background%B2%, East2
GuiControl, Move, East1, y148 h104
GuiControl, +Background%B3%, East1
; ToolTip %A_GuiControl%
; Sleep 1000
KeyWait, RButton
Gosub, gGuiHide
Gosub, GuiClear
Send, {F24}
Sleep, 50
Send, {5}
Return
; Misc
GuiCenter:
; Gosub, GuiClear
Count = 0
MCount = 0
ToolTip Center
Return
gCenterLite:
GuiControl, Show, Center
GuiControl, +Background878787, Center
Return
; RunSubs for GUI reset, menu type and animations
Ring1:
GuiControl, Move, North1, x148 w104
GuiControl, Move, South1, x148 w104
GuiControl, Move, West1, y148 h104
GuiControl, Move, East1, y148 h104
GuiControl, +Background878787, North1
GuiControl, +Background878787, South1
GuiControl, +Background878787, West1
GuiControl, +Background878787, East1
GuiControl, Move, North3, x100 y35 w200 h50
GuiControl, Move, North2, x143 y98 w114 h34
GuiControl, Move, South2, x143 y268 w114 h34
GuiControl, Move, South3, x100 y315 w200 h50
GuiControl, Move, West3, x35 y100 w50 h200
GuiControl, Move, West2, x98 y143 w34 h114
GuiControl, Move, East2, x268 y143 w34 h114
GuiControl, Move, East3, x315 y100 w50 h200
GuiControl, +Background2B2B2B, North3
GuiControl, +Background2B2B2B, North2
GuiControl, +Background2B2B2B, South2
GuiControl, +Background2B2B2B, South3
GuiControl, +Background2B2B2B, West3
GuiControl, +Background2B2B2B, West2
GuiControl, +Background2B2B2B, East2
GuiControl, +Background2B2B2B, East3
Return
Ring2:
GuiControl, Move, North2, x98 w204
GuiControl, Move, South2, x98 w204
GuiControl, Move, West2, y98 h204
GuiControl, Move, East2, y98 h204
GuiControl, +Background878787, North2
GuiControl, +Background878787, South2
GuiControl, +Background878787, West2
GuiControl, +Background878787, East2
GuiControl, Move, North3, x100 y35 w200 h50
GuiControl, Move, North1, x175 y148 w50 h20
GuiControl, Move, South1, x175 y232 w50 h20
GuiControl, Move, South3, x100 y315 w200 h50
GuiControl, Move, West3, x35 y100 w50 h200
GuiControl, Move, West1, x148 y175 w20 h50
GuiControl, Move, East1, x232 y175 w20 h50
GuiControl, Move, East3, x315 y100 w50 h200
GuiControl, +Background2B2B2B, North3
GuiControl, +Background2B2B2B, North1
GuiControl, +Background2B2B2B, South1
GuiControl, +Background2B2B2B, South3
GuiControl, +Background2B2B2B, West3
GuiControl, +Background2B2B2B, West1
GuiControl, +Background2B2B2B, East1
GuiControl, +Background2B2B2B, East3
Return
Ring3:
GuiControl, Move, North3, x35 w330
GuiControl, Move, South3, x35 w330
GuiControl, Move, West3, y35 h330
GuiControl, Move, East3, y35 h330
GuiControl, +Background878787, North3
GuiControl, +Background878787, South3
GuiControl, +Background878787, West3
GuiControl, +Background878787, East3
GuiControl, Move, North2, x143 y98 w114 h34
GuiControl, Move, North1, x175 y148 w50 h20
GuiControl, Move, South1, x175 y232 w50 h20
GuiControl, Move, South2, x143 y268 w114 h34
GuiControl, Move, West2, x98 y143 w34 h114
GuiControl, Move, West1, x148 y175 w20 h50
GuiControl, Move, East1, x232 y175 w20 h50
GuiControl, Move, East2, x268 y143 w34 h114
GuiControl, +Background2B2B2B, North2
GuiControl, +Background2B2B2B, North1
GuiControl, +Background2B2B2B, South1
GuiControl, +Background2B2B2B, South2
GuiControl, +Background2B2B2B, West2
GuiControl, +Background2B2B2B, West1
GuiControl, +Background2B2B2B, East1
GuiControl, +Background2B2B2B, East2
Return
gGuiHide:
Gui, Show, Hide
WinActivate, ahk_id %active_id%
Return
GuiClear:
; Count = 0
mNum = 0
GuiControl, Move, North3, x100 y35 w200 h50
GuiControl, Move, North2, x143 y98 w114 h34
GuiControl, Move, North1, x175 y148 w50 h20
GuiControl, Move, South1, x175 y232 w50 h20
GuiControl, Move, South2, x143 y268 w114 h34
GuiControl, Move, South3, x100 y315 w200 h50
GuiControl, Move, West3, x35 y100 w50 h200
GuiControl, Move, West2, x98 y143 w34 h114
GuiControl, Move, West1, x148 y175 w20 h50
GuiControl, Move, East1, x232 y175 w20 h50
GuiControl, Move, East2, x268 y143 w34 h114
GuiControl, Move, East3, x315 y100 w50 h200
GuiControl, +Background2B2B2B, North3
GuiControl, +Background2B2B2B, North2
GuiControl, +Background2B2B2B, North1
GuiControl, +Background2B2B2B, South1
GuiControl, +Background2B2B2B, South2
GuiControl, +Background2B2B2B, South3
GuiControl, +Background2B2B2B, West3
GuiControl, +Background2B2B2B, West2
GuiControl, +Background2B2B2B, West1
GuiControl, +Background2B2B2B, East1
GuiControl, +Background2B2B2B, East2
GuiControl, +Background2B2B2B, East3
Return
; For changing color of controls on mouse hover
Highlight(wParam, lParam, Msg)
{
global mouseX, mouseY, currWin, Hover
MouseGetPos, mouseX, mouseY, currWin, Hover
IfInString, Hover, SysListView
{
; North to South
if (Hover = "SysListView321")
Gosub, g%A_GuiControl%
else
GuiControl, +Background2B2B2B, %A_GuiControl%
if (Hover = "SysListView322")
Gosub, g%A_GuiControl%
else
GuiControl, +Background2B2B2B, %A_GuiControl%
if (Hover = "SysListView323" && MToggle != "D")
Gosub, g%A_GuiControl%
if (Hover = "SysListView323" && MToggle = "D")
Gosub, Ring%mCount%
else if (Hover = "SysListView322")
Gosub, gNorth2
else
GuiControl, +Background2B2B2B, %A_GuiControl%
if (Hover = "SysListView324")
Gosub, GuiCenter
else
GuiControl, +Background2B2B2B, %A_GuiControl%
if (Hover = "SysListView325")
Gosub, g%A_GuiControl%
else
GuiControl, +Background2B2B2B, %A_GuiControl%
if (Hover = "SysListView326")
Gosub, g%A_GuiControl%
else
GuiControl, +Background2B2B2B, %A_GuiControl%
if (Hover = "SysListView327") ; Center
Gosub, g%A_GuiControl%
else
GuiControl, +Background2B2B2B, %A_GuiControl%
; West to East
if (Hover = "SysListView328") ; Largest
Gosub, g%A_GuiControl%
else
GuiControl, +Background2B2B2B, %A_GuiControl%
if (Hover = "SysListView329")
Gosub, g%A_GuiControl%
else
GuiControl, +Background2B2B2B, %A_GuiControl%
if (Hover = "SysListView3210")
Gosub, g%A_GuiControl%
else
GuiControl, +Background2B2B2B, %A_GuiControl%
if (Hover = "SysListView3211")
Gosub, g%A_GuiControl%
else
GuiControl, +Background2B2B2B, %A_GuiControl%
if (Hover = "SysListView3212")
Gosub, g%A_GuiControl%
else
GuiControl, +Background2B2B2B, %A_GuiControl%
if (Hover = "SysListView3213") ; Largest
Gosub, g%A_GuiControl%
else
GuiControl, +Background2B2B2B, %A_GuiControl%
}
; IfNotInString, Hover, SysListView
; {
; GuiControl, +Background2B2B2B, North3
; GuiControl, +Background2B2B2B, North2
; GuiControl, +Background2B2B2B, North1
; GuiControl, +Background2B2B2B, South1
; GuiControl, +Background2B2B2B, South2
; GuiControl, +Background2B2B2B, South3
; GuiControl, +Background2B2B2B, West3
; GuiControl, +Background2B2B2B, West2
; GuiControl, +Background2B2B2B, West1
; GuiControl, +Background2B2B2B, East1
; GuiControl, +Background2B2B2B, East2
; GuiControl, +Background2B2B2B, East3
; GuiControl, +Background2B2B2B, Center
; }
}
Return
GuiMove:
PostMessage, 0xA1, 2
return
Exit:
Esc::
#Esc::
ExitApp