DonationCoder.com Software > Post New Requests Here
IDEA: Alpha list of files with Numeric drop down to select and display
(1/1)
schnarkle:
I play guitar at church and would like to be able to select a song order from a list of .pdf files, hit submit and have the songs display in correct order while I page down from one song to the next.
The list of pdf files is in a single directory online. I'm thinking php to do this?
I would like to be able to just drop new pdfs in the folder via ftp and have them listed out on the fly if possible.
The image is an idea of what I'm thinking it could look like...
skrommel:
:) Try AlphaList!
It's just a quick hack, but give it a go.
To change the folder, edit the line folder=.
Skrommel
--- ---;AlphaList.ahk
; Order and run a list of PDF files, switch files using PgUp and PgDown
;Skrommel @ 2009
#NoEnv
#SingleInstance,Force
CoordMode,Mouse,Screen
;Edit this line to change folder
folder=C:\PDFs
type=*.pdf
Gui,1:Add,Button,Default GRUN,&Run
Gui,1:Add,ListView,GLISTVIEW Vlistview AltSubmit -ReadOnly,Order|Filename|Path
items=_
Loop,%folder%\%type%,0,1
{
items=%items%|%A_Index%
LV_Add("","_",A_LoopFileName,A_LoopFileLongPath)
}
Gui,1:+LastFound +Resize
guiid1:=WinExist()
LV_ModifyCol(2,"Auto")
LV_ModifyCol(3,0)
Gui,1:Show
Return
ITEM:
Gui,2:Submit
ToolTip,%item%.%row%
Gui,1:Default
LV_Modify(row,"",item)
Return
LISTVIEW:
If A_GuiEvent In E,Normal
{
row:=A_EventInfo
Gui,1:Default
LV_GetText(order,row,1)
MouseGetPos,mx,my
Gui,2:Destroy
Gui,2:+Owner1
Gui,2:Margin,0,0
Gui,2:-Caption ;+AlwaysOnTop
Gui,2:Add,ListBox,% "GITEM Vitem Choose" order+1,%items%
Gui,2:Show,% "X" mx "Y" my
}
Return
RUN:
LV_ModifyCol(1,"Sort")
rows:=LV_GetCount()
current=0
Gosub,NEXT
Return
#IfWinExist AlphaList
PgDn::
NEXT:
current+=1
If (current>rows)
current=%rows%
Gosub,SHOW
Return
#IfWinExist AlphaList
PgUp::
PREVIOUS:
current-=1
If (current<rows)
current=1
Gosub,SHOW
Return
SHOW:
LV_GetText(filename,current,3)
Run,%filename%
Return
GuiSize:
If A_EventInfo=1 ;Minimized
Return
GuiControl,Move,listview,% "W" . (A_GuiWidth-20) . " H" . (A_GuiHeight - 40)
Return
schnarkle:
skrommel,
Wow, fantastic!
Only problem is that it only loads the first pdf file for some reason and does not load the others at all? A minor fix?
anyway I LOVE the implementation!
Navigation
[0] Message Index
Go to full version