From: Sam Mitchell
This seems to work for me:
constant
PATHLEN =3D 80
string kill_this_history[PATHLEN]
string pick_footer[] =3D "{Right}-Next Drive {Left}-Prev Drive"
integer proc ChangeDrive(integer delta)
string drive[1]
drive =3D Chr(Asc(Query(PickFilePath)) + delta)
if FileExists(drive + ":\*.*")
kill_this_history =3D GetDir(drive)
PushKey()
PushKeyStr(kill_this_history)
PushKey()
if FindHistoryStr(kill_this_history, Query(CurrHistoryList))
kill_this_history =3D ""
endif
return (TRUE)
endif
return (FALSE)
end
integer proc NextDrive()
return (ChangeDrive(1))
end
integer proc PrevDrive()
return (ChangeDrive(-1))
end
keydef pick_keys
if not NextDrive() Alarm() endif
if not PrevDrive() Alarm () endif
end
proc PickDirStartup()
if Length(kill_this_history)
DelHistoryStr(Query(CurrHistoryList), 1)
kill_this_history =3D ""
endif
Enable(pick_keys)
WindowFooter(pick_footer)
end
proc WhenLoaded()
Hook(_PICKFILE_STARTUP_, PickDirStartup)
end
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|