Page 1 of 1
OpenFileRequester
Posted: Fri Apr 23, 2004 8:50 am
by Switchblade
hi,
ive got a problem with the OpenFileRequester.
ive made a gui for one of my command line tools.
command line tool Parameters
tool C:\Documents and Settings\Static.txt 50
And here is my problem : Documents and settings ! how can i tell the OpenFileRequester to show that paths DOS like. Course the blank fields between documents and settings are a problem.
thx
Posted: Fri Apr 23, 2004 8:53 am
by freedimension
The problem lies within ProgramParameters. Every commandline-option is divided by one or more trailing spaces. To make sure, an option is considered as whole, you have to encapsulate it in "
Ex.:
tool "this is my path"
Posted: Fri Apr 23, 2004 9:22 am
by Switchblade
Its already done

with + Chr(34)
Posted: Fri Apr 23, 2004 10:25 am
by Henrik
Hi
You are probably doing somthing wrong when you use chr(34)
you could pass it as a string and debug it to see if it's right
A modified ver from the help
Does this work for you ?
Code: Select all
StandardFile$ = "C:\Documents and Settings\Static.txt 50" ; set initial file+path to display
; With next string we will set the search patterns ("|" as separator) for file displaying:
; 1st: "Text (*.txt)" as name, ".txt" and ".bat" as allowed extension
; 2nd: "PureBasic (*.pb)" as name, ".pb" as allowed extension
; 3rd: "All files (*.*) as name, "*.*" as allowed extension, valid for all files
Pattern$ = "Text (*.txt)|*.txt;*.bat|PureBasic (*.pb)|*.pb|All files (*.*)|*.*"
Pattern = 0
; use the first of the three possible patterns as standard
File$ = OpenFileRequester("Please choose file to load", StandardFile$, Pattern$, Pattern)
If File$
MessageRequester("Information", "You have selected following file:"+Chr(10)+File$, 0)
Else
MessageRequester("Information", "The requester was canceled.", 0)
EndIf
Best Regards
Henrik
Posted: Fri Apr 23, 2004 12:06 pm
by Switchblade
You are probably doing somthing wrong when you use chr(34)
No, its working fine, couse ive got some commandline tools to use , and ive only made a gui which creates a bat file there the commands are listed in with the parameters and it runs fine
-----------
ok its a primitive way but ive got some problems with a included programm to use it with runprogram (and with the right parameters)