Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 09, 2016, 09:07:04 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Alpha list of files with Numeric drop down to select and display  (Read 2334 times)

schnarkle

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11
    • View Profile
    • Donate to Member
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.

sample.jpg

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

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 886
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Alpha list of files with Numeric drop down to select and display
« Reply #1 on: January 31, 2009, 10:26:25 AM »
 :) 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
Please stop by my site at  1 Hour Software by skrommel  for downloads and more info.
« Last Edit: January 31, 2009, 11:09:43 AM by skrommel »

schnarkle

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11
    • View Profile
    • Donate to Member
Re: IDEA: Alpha list of files with Numeric drop down to select and display
« Reply #2 on: January 31, 2009, 11:57:43 AM »
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!