Problem with link selection$()
Jul 1, 2021 0:00:43 GMT -5
Post by donnybowers on Jul 1, 2021 0:00:43 GMT -5
I can't for the life of me figure out why I keep getting this error in my [open] routine. I always get the following error message:
Runtime Error in program 'Files': fileName$ = #opn selection$()
Unrecognized command for #opn: selection$()
Runtime Error in program 'Files': fileName$ = #opn selection$()
Unrecognized command for #opn: selection$()
width=640
slash$="\" : level=1
dim thisDir$(1)
root$=DefaultDir$+slash$+"public"
thisDir$(1)=root$
cssclass "select", "{width:";str$(int(width*.89));"px; font-size:32px;}"
gosub [getFiles]
[start]
listbox #filer, fils$(),5
print
link #opn, "Open", [open]
print
wait
[open]' I CAN'T SEE ANYTHING WRONG WITH THIS CODE:
fileName$ = #opn selection$()
print fileName$
wait
end
[getFiles]
this$=thisDir$(level)+"\*.*"
html "<b>Look in: ";thisDir$(level);"</b>"
files #dir, this$
dim fils$(#dir rowcount())
dim d$(#dir rowcount())
dim f$(#dir rowcount())
numFiles = 0 : numDirs=0
while #dir hasAnswer()
#dir nextFile$()
if #dir isdir() then
numDirs = numDirs + 1
d$(numDirs) = "["+#dir name$()+"]"
else
if f$(numFiles+1)<>"Thumbs.db" then
numFiles = numFiles+1
f$(numFiles) = #dir name$()
end if
end if
wend
for i=1 to numDirs
fils$(i)=d$(i)
print fils$(i)
next i
x=numDirs
for i = 1 to numFiles
x=x+1
fils$(x)=f$(i)
next i
dim d$(0)
dim f$(0)
[return]