name=OPEN:
Moderators: Susan Smith, admin, Gabriel
name=OPEN:
All -
I am trying to use the "Name=Open:" (http://brwiki.ads.net/index.php?title=Name%3DOpen:) syntax to mimic a file browser. It works, except from the verbiage on the wiki I cannot figure out how to make it "default" to a specific directory. I tried to give it a path after the "|" but that doesnt seem to work. Can I someone point me in the right direction on this subject?
Thanks
Ranjini
I am trying to use the "Name=Open:" (http://brwiki.ads.net/index.php?title=Name%3DOpen:) syntax to mimic a file browser. It works, except from the verbiage on the wiki I cannot figure out how to make it "default" to a specific directory. I tried to give it a path after the "|" but that doesnt seem to work. Can I someone point me in the right direction on this subject?
Thanks
Ranjini
85600 open #h_tmp:=fngethandle: "name=OPEN:ACS Company (*.acs"&cursys$&") |*.acs??,recl=1,shr",external,input ioerr OPEN_CANCELED
85800 print file$(h_tmp)
86000 close #h_tmp:
86200 OPEN_CANCELED: !
I believe this may demonstrate what you're wanting to do. Feel free to make the wiki more clear once you understand it. I believe I've given you editor rights already.
-John
85800 print file$(h_tmp)
86000 close #h_tmp:
86200 OPEN_CANCELED: !
I believe this may demonstrate what you're wanting to do. Feel free to make the wiki more clear once you understand it. I believe I've given you editor rights already.
-John
In my experience the data on the OPEN line between the colon ":" and the bar "|" do nothing. Perhaps someone else has found that these appear somewhere or change the disply, but on my Vista machine running BR4.20g they seem to have no effect what so ever.
In addition, I find that sometimes having included this information will start my search in the wrong directory, whereas leaving this information out always puts me into the designated directory. I have not been able to determine what cuases the wrong directory search, I just leave that info out and get what I want.
FNGeorge
In addition, I find that sometimes having included this information will start my search in the wrong directory, whereas leaving this information out always puts me into the designated directory. I have not been able to determine what cuases the wrong directory search, I just leave that info out and get what I want.
FNGeorge
Unfortunately this is still not working for me. Here is the code i trying..
I would expect it to open "C:\Windows\*.ini" but it always opens the location in "memory" which is the previous file location a file was opened from via BR.
Could it be possible that what you are all seeing is the location in "memory" as well?
Thanks
Ranjini
Code: Select all
00020 DIM Post$*50
00030 LET Post$="@::text documents (*.ini)|C:\Windows\*.ini"
00040 OPEN #H_Tmp:=12: "name=OPEN:"&Post$&",recl=1,shr",EXTERNAL,INPUT
00050 IF File(Xpt)<0 THEN PAUSE
Could it be possible that what you are all seeing is the location in "memory" as well?
Thanks
Ranjini
Try
This should show the files in Windows. If you are using client server and want client side windows directory then add the @. If not using client server, or you are serching a BR mapped drive don't insert the @
If The named directory does not exist of BR can't find it then the open will default to the last "OPEN" location.
FNGeorge
Code: Select all
00020 DIM Post$*50
00030 LET Post$="C:\Windows\*.ini"
00040 OPEN #H_Tmp:=12: "name=OPEN:"&Post$&",recl=1,shr",EXTERNAL,INPUT IOERR 50
00050 PAUSE
If The named directory does not exist of BR can't find it then the open will default to the last "OPEN" location.
FNGeorge
I have learned that the "@::" or "@:" when used with an "OPEN Statement" is always required in Client Server. (Regardless of the Mapping in the BRCONFIG).
Leaving it out generates an error 626.
I also found that when using "@::", the "Client Drive" will be used, not the "Server or Virtual Drive".
The above sample opens to the "Last Remembered Position", and displays "All Log Files" in the "File Type" combo box. It also displays "Only Log Files".
The problem seems to be that this syntax does not allow the user to define a "Hard Coded Path".
I have a feeling that "Long File Names" mucked with this feature so that the parsing doesn't work as expected any more!
Leaving it out generates an error 626.
I also found that when using "@::", the "Client Drive" will be used, not the "Server or Virtual Drive".
Code: Select all
00020 DIM Post$*50
00030 LET Post$="All Log Files | *.LOG"
00040 OPEN #H_Tmp:=12: "name=OPEN:@::"&Post$&",recl=1,shr",EXTERNAL,INPUT IOERR 50
00050 PAUSE
The problem seems to be that this syntax does not allow the user to define a "Hard Coded Path".
I have a feeling that "Long File Names" mucked with this feature so that the parsing doesn't work as expected any more!
I think I finally wrapped my head around this command.
The above example will display *.ini & *.txt files in the C:\Windows Folder.
In the "Filter Combo box", it will display Text Files (*.ini;*.txt)
I also added additional information to the wiki
http://brforum.ads.net/viewtopic.php?p=2565#2565[/code]
Code: Select all
00010 OPEN #1: "name=OPEN:C:\Windows\ Text Files (*.ini;*.txt)|*.ini;*.txt,recl=1,shr",EXTERNAL,INPUT IOERR 100
00020 PRINT File$(1)
00030 CLOSE #1:
00100 PRINT "Operation Canceled: Err=";Err
00200 XIT: !
In the "Filter Combo box", it will display Text Files (*.ini;*.txt)
I also added additional information to the wiki
http://brforum.ads.net/viewtopic.php?p=2565#2565[/code]