post #1 of 1
Thread Starter 
Simple solution I'm sure, but can someone edit this script to appear as a list?
Example:

Line1
Line2
Line3
Line4

I need around 10-15 lines

I'm not a script writer and it seems I'm missing something simple. I found this on the web and I'd like that I can just move the notepad around to display the text wherever I want.
Warning: Spoiler! (Click to show)
SendMode Input
SetTitleMatchMode, RegEx

last_count := -1

CustomColor = 0 ; Can be any RGB color (it will be made transparent below).

Loop, 32 ; max HUDs = 32
{ Gui %A_Index%: +LastFound -Caption +AlwaysOnTop +ToolWindow ; +ToolWindow avoids a taskbar button and an alt-tab menu item.
Gui, %A_Index%:Color, %CustomColor% ; this color will be made transparent
Gui, %A_Index%:Font, s14
Gui, %A_Index%:Add, Text, vMyText cLime, XXXX YYYY ; XX & YY serve to auto-size the window.
WinSet, TransColor, %CustomColor% 170
GuiControl ,%A_Index%:, MyText, %this_id%
}

SetTimer, UpdateHUD, 400
Gosub, UpdateHUD ; Make the first update immediate rather than waiting for the timer.
return

UpdateHUD:
table_count := 0
WinGet, id, list, Notepad
Loop, %id%
{ this_id := id%A_Index%
WinGetPos,table_x, table_y, wx, hy, ahk_id %this_id% ; window pos. and size
GuiControl ,%A_Index%:, MyText, Item1 %this_id% ; text for displaying on the HUD as an example
hud_x := table_x + wx * 0.9 ; HUD text coords.
hud_y := table_y + hy * 0.1
Gui , %A_Index%:Show, X%hud_x% Y%hud_y% NoActivate ; Shows the HUD
table_count := table_count + 1

}


if (last_count > table_count) ; a window has been closed
{ closed_tables := last_count - table_count
Loop, %closed_tables%
{ gui_num := A_Index + table_count
GuiControl ,%gui_num%:, MyText, ; clears the HUD for the closed windows
Gui , %gui_num%:Show, X0 Y0 NoActivate
}
}

last_count := table_count
return

Edited by anyhtinggoes - 5/3/14 at 3:32pm