Here a little function for select or open a file...
FIRST USE: select one file (getting his name and directory)
myfile$ = FILESELECTOR$("")
IF myfile$ = "" THEN PRINT "No file choosen" ELSE PRINT "Your choice is" + CHR$(13) + myfile$
SLEEP
END
SECOND USE select a file and open it !
myfile$ = FILESELECTOR$("OPEN")
The file you select will be opened with the current windows application :
'XLS file--> Excel, DOC--> Word, PDF-->Acrobat JPG-->Picture program... aso
Hope usefull...
FUNCTION FILESELECTOR$
(FS$
) ' FS$ = "" select 1 file // FS$ ="OPEN"--> open the file with it's current windows application FS1$ = "Set wShell = CreateObject(²WScript.Shell²)" + FS2$
FS1$ = FS1$ + "Set oExec = wShell.Exec(²mshta.exe ²²about:<input type=file "
FS1$ = FS1$ + "id=FILE><script>FILE.click();new ActiveXObject('Scripting.FileSystemObject')."
FS1$ = FS1$ + "GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);</script>²²²)" + FS2$
FS1$ = FS1$ + "sFileSelected = oExec.StdOut.ReadLine" + FS2$
FS1$ = FS1$ + "Set WshShell = WScript.CreateObject(²WScript.Shell²)" + FS2$
FS1$
= FS1$
+ "WshShell.Run ²cmd.exe /c " + FS3$
+ " ² & sFileSelected & ² | clip², 0, TRUE" + CHR$(13) FS1$ = FS1$ + "set Wshell=nothing" + FS2$ + "set WshShell=nothing" + FS2$: