LegallyBlind, here try this, highlight with action on hero may be slow with aero theme turned on and i don't know if this script will be compatible with tableninja or not:
Code:
; #### FTHighlighter ####
; AHK version: 1.0.48.05
; date: February 17,2010
version := "1.01"
; author: Max1mums (max1mums@overcards.com)
#SingleInstance, Force
#NoEnv
Settitlematchmode, 2
OnExit exitSub
StringTrimRight, thisahk, A_ScriptName, 4
SetWorkingDir %A_ScriptDir%
Menu, Tray, NoStandard
Menu, Tray, Add, Settings, menugui
Menu, Tray, Add
Menu, Tray, Add, Reload, reload
Menu, Tray, Default, Settings
Menu, Tray, Add
Menu, Tray, Add, Suspend, Suspend
Menu, Tray, Add, Pause, TogglePause
Menu, Tray, Add
Menu, Tray, Add, Exit, ExitSub
OnMessage(0x112,"WM_SYSCOMMAND")
WM_SYSCOMMAND(wParam)
{
if (A_Gui && wParam = 0xF020) ; SC_MINIMIZE
{
Gui, destroy
return 0
}
}
SetBatchLines, -1
SetWinDelay, -1
SendMode Input
SysGet, xbord, 32
SysGet, ybord, 33
SysGet, cap, 4
; Border of the "Highlighter"
border_color := "ff0000"
border_size := 5
trans := 255
gosub,getini
;;;;;;;;;;;;;;End of init;;;;;;;;;;;;;;
settimer,act,35
if Highlight
settimer,Highlighter,53
return
;-----------------------------------------------------------------------------------------------------
act:
id:=act()
wingetclass,class,A
wingettitle,title,A
ifwinnotactive,ahk_id%id%
if class=QWidget
if (instr(title, "Logged In") & instr(title, "/"))
winactivate,ahk_id%id%
return
act()
{
winget,list,list, Logged In ahk_class QWidget,,Full Tilt
return list1
}
;-----------------------------------------------------------------------------------------------------
HighLighter:
if Highlight
HighLighter()
return
HighLighter(Highlight=1) ;x_mouse=0.75, y_mouse=0.75
{
global OldX,OldY,OldW,OldH
global highlighthero,last_table_id
global border_color
global border_size
global trans
global xbord,ybord
global cap
foldx:=0.6534
foldy:=0.9662
foldx1:=0.5859
foldy1:=0.9662
back_x:=0.6534
back_y:=0.9862
back_x1:=0.5859
back_y1:=0.9862
join_y:=0.9292
join_x:=0.8261
fold1:=0x181818
v:=15
ifwinactive, Logged In ahk_class QWidget,,Full Tilt
{
winget,id,id,A
WinGetActiveStats,ActiveTitle, ActiveW, ActiveH, ActiveX, ActiveY
relFTclientpoint(id,foldx,foldy,0)
pixelgetcolor,fold,foldx,foldy,ahk_id%id%
relFTclientpoint(id,foldx1,foldy1,0)
pixelgetcolor,bacgr,foldx1,foldy1,ahk_id%id%
relFTclientpoint(id,back_x,back_y,0)
pixelgetcolor,deal,back_x,back_y,ahk_id%id%
relFTclientpoint(id,back_x1,back_y1,0)
pixelgetcolor,deal1,back_x1,back_y1,ahk_id%id%
; relFTclientpoint(id,join_x,join_y,0)
; pixelgetcolor,join,join_x,join_y,ahk_id%id%
if (id != last_table_id) || ((OldX <> ActiveX || OldY <> ActiveY || OldW <> ActiveW || OldH <> ActiveH))
{
OldX := ActiveX
OldY := ActiveY
OldW := ActiveW
OldH := ActiveH
mouse_last:=last_table_id
last_table_id := id
if(!id)
{
Gui, 2: Cancel
Gui, 3: Cancel
Gui, 4: Cancel
Gui, 5: Cancel
return
}
WinGetPos, x, y, w, h, ahk_id%id%
x := x + xbord
y := y + xbord + cap
w := w - (2*xbord)
h := h - (2*xbord) - cap
;Makes Border around urgent table
if (highlighthero=0) || ((highlighthero=1) & (comparecolors(fold,bacgr,v)=0) & (comparecolors(fold,fold1,v)=0) & (comparecolors(deal,deal1,v)=1)) ; & (comparecolors(join,deal1,v)=1))
{
;top
guinum := 2
Gui, %guinum%: +Alwaysontop +Lastfound +Owner
Gui, %guinum%: Color, %border_color%
WinSet, Transparent, %trans%
Gui, %guinum%: -Caption
Gui, %guinum%: Show, w%w% h%border_size% x%x% y%y% NoActivate
;left
guinum++
Gui, %guinum%: +Alwaysontop +Lastfound +Owner
Gui, %guinum%: Color, %border_color%
WinSet, Transparent, %trans%
Gui, %guinum%: -Caption
Gui, %guinum%: Show, w%border_size% h%h% x%x% y%y% NoActivate
;bottom
guinum++
Gui, %guinum%: +Alwaysontop +Lastfound +Owner
Gui, %guinum%: Color, %border_color%
WinSet, Transparent, %trans%
Gui, %guinum%: -Caption
y2 := y + h - border_size
Gui, %guinum%: Show, w%w% h%border_size% x%x% y%y2% NoActivate
;right
guinum++
Gui, %guinum%: +Alwaysontop +Lastfound +Owner
Gui, %guinum%: Color, %border_color%
WinSet, Transparent, %trans%
Gui, %guinum%: -Caption
x2 := x + w - border_size
Gui, %guinum%: Show, w%border_size% h%h% x%x2% y%y% NoActivate
}
else
if highlighthero=1
last_table_id=
}
else
if highlighthero=1
if comparecolors(fold,bacgr,v)=1
{
Gui, 2: Cancel
Gui, 3: Cancel
Gui, 4: Cancel
Gui, 5: Cancel
last_table_id=
}
}
else
{
Gui, 2: Cancel
Gui, 3: Cancel
Gui, 4: Cancel
Gui, 5: Cancel
last_table_id=
}
}
return
;-----------------------------------------------------------------------------------------------------
relFTClientPoint(id, ByRef x, ByRef y, client=1,screen=0)
{
global xbord,ybord,cap
WinGetPos,x1,y1,w,h,ahk_id%id%
w-=2*xbord
h-=(2*ybord)+cap
x:=floor(W*x)
y:=floor(H*y)
if !client
{
x+=xbord
y+=ybord+cap
}
if screen
{
x+=x1
y+=y1
}
}
return
;-----------------------------------------------------------------------------------------------------
CompareColors(ByRef bgr1, ByRef bgr2, ByRef variation) {
c1 := bgr1 & 0xff
c2 := bgr2 & 0xff
if (abs(c1 - c2) > variation)
return false
c1 := (bgr1 >> 8) & 0xff
c2 := (bgr2 >> 8) & 0xff
if (abs(c1 - c2) > variation)
return false
c1 := (bgr1 >> 16) & 0xff
c2 := (bgr2 >> 16) & 0xff
if (abs(c1 - c2) > variation)
return false
return true
}
;-----------------------------------------------------------------------------------------------------
BuildGui:
Gui, color, white
Gui, add, tab, h450 w270, General
Gui, Tab, General
Gui, add, text, y145 x25, Highlight table
Gui, add, Checkbox, y145 x100 Checked%Highlight% VHighlight
Gui, Add, Radio, x126 y140 w120 h15 Checked%highlightactive% vhighlightactive, Active
Gui, Add, Radio, x126 y155 w120 h15 Checked%highlighthero% vhighlighthero, With action on hero
Gui, Add, Button, x75 y315 w55 h20 gSave,Submit
Gui, Add, Button, x135 y315 w55 h20 gCancel,Cancel
Gosub, GetIni
Gui, show, w286, %thisahk%
Return
;-----------------------------------------------------------------------------------------------------
GetIni:
IfNotExist, %thisahk%.ini
gosub, CreateIni
IniRead, Highlight, %thisahk%.ini, Settings, Highlight, 0
IniRead, highlighthero, %thisahk%.ini, Options, highlighthero, 0
IniRead, highlightactive, %thisahk%.ini, Options, highlightactive, 0
Return
;-----------------------------------------------------------------------------------------------------
MakeIni:
IniWrite, %Highlight%, %thisahk%.ini, Settings, Highlight
if highlighthero
IniWrite, %highlighthero%, %thisahk%.ini, Options, highlighthero
if highlightactive
IniWrite, %highlightactive%, %thisahk%.ini, Options, highlightactive
Return
;-----------------------------------------------------------------------------------------------------
CreateIni:
Highlight:=1
highlighthero:=1
gosub, MakeIni
gosub, buildgui
return
;-----------------------------------------------------------------------------------------------------
GuiClose:
gosub, cancel
return
;-----------------------------------------------------------------------------------------------------
menuGui:
gosub, getini
winget,id,id, %thisahk% ahk_class AutoHotkeyGUI
if !DllCall( "IsWindowVisible", "UInt",id)
gosub, buildgui
else
winactivate,ahk_id%id%
Gui, Submit,nohide
return
;-----------------------------------------------------------------------------------------------------
reload:
reload
return
;-----------------------------------------------------------------------------------------------------
Save:
Gui, Submit
FileDelete, %thisahk%.ini
gosub, MakeIni
Reload
return
;-----------------------------------------------------------------------------------------------------
Cancel:
Gui, Destroy
Return
;-----------------------------------------------------------------------------------------------------
TogglePause:
pause,toggle
return
;-----------------------------------------------------------------------------------------------------
Suspend:
suspend
return
;-----------------------------------------------------------------------------------------------------
Edit:
edit
return
;-----------------------------------------------------------------------------------------------------
exitSub:
FileDelete, %thisahk%.ini
gosub, makeini
exitApp
return
;-----------------------------------------------------------------------------------------------------