Well, it would be nice to return the short file name, however I do not think there is a way to do it from bluegui. However, here is a snippet which will trim a full path+filename to just the filename:
function GetShortFileName(StringToSearch$ as string)
StringToFind$ ="\"
Start=1
tmp_matched = 1 `Start a temporary variable that shows how many characters have been matched
for tmp_loop = len(StringToSearch$) to Start Step -1 `start looping through StringtoSearch
if mid$(StringToFind$,tmp_matched) = mid$(StringToSearch$,tmp_loop) `if the current character of StringtoSearch matches the current character of StringToFind
inc tmp_matched, 1 `move check onto next character
if tmp_matched = len(StringToFind$)+1
l=tmp_loop-(len(StringToFind$)-1)
exitfunction right$(StringToSearch$,len(StringToSearch$)-l) rem `exit with result if the whole string has been found
endif
else
tmp_matched = 1 `if not, reset StringToFind to the first character
endif
next t
endfunction "NONE"
It may require a little tweaking for your specific usage. I found it on the forum here somewhere, I modified it a bit so I cannot claim full credit for the work.
And this is what I use to open a file with it's specified path and it works fine for me:
Result$=openDialog("Open a WhizzyWig! (WYSIWYG) Project","WhizzyWig! Project (*.wwp)|*.wwp|All Files (*.*)|*.*",0,GET DIR$()+"\Projects\")
Yours looks ok, you probably just need ,0, before the path. Hope this works
"We are what we repeatedly do. Excellence, therefore, is not an act, but a habit." - Aristotle
