RequestFile$
BlitzPlus Forums/BlitzPlus Programming/RequestFile$
| ||
Hi, I am writing a app, I call the RequestFile$ and I want it to recall the last dir I used. For example when I save a project I want RequestFile$ to open up the window and show the last dir and the Name of the file in the text box. When I call RequestFile$ for when I want to load a picture which is in another dir. I want RequestFile$ to remeber that dir, open it, and then show the file name of the last pic I loaded? In the current state that I am understanding this command It won't do it. It just opens up the last dir it was at, even if I try to set the dir to point into someother folder. Can anyone help me with this? Much Thanks in advance |
| ||
I don't know how you can put the name of the last file in the textbox but you can chose the dir which you want to show first simply with ChangeDir. little example _________ cur_dir = CurrentDir() file = ReadFile("lastsaveddir.dat") dir = ReadLine(file) CloseFile file ChangeDir dir save_file = RequestFile$("Choose File ...",1) ChangeDir cur_dir __________ works fine at my b+ greetz |
| ||
I tried your code. What format is the "lastsaveddir.dat" I tried changeing the changedir to different folders and such manually e.g "c:" "c:\program files" then I use the request command and no change. still recalls the last dir I used in the requestfile$ command:( Any More Suggestions? |
| ||
what version do you have? I've got 1.37 and it works correct |
| ||
I have version 1.37 If someone that have more know how than me write a section of code to do the following click one button and the requestfile$ will open to first folder(designated by you). click button two and the requestfile$ will open to other folder(designated by you) The reason for this Is that I have an app the loads your main project( the load project button). Then another button imports a picture. If you are like me you put all the pictures in one folder so that you can find them all in one place. Now when I go to load another project. requestfile$ recalls the picture folder not the project folder. If anyone can help please post the code cuz I can't get it to work here:(Tried everything I can think of, but I might be looking over some simple thing. Thank You for your time. |
| ||
here is the code I did and it just recalls the first folder I double clicked in. ChangeDir "c:\ati" ; change to whatever you want RequestFile$("first folder") ; double click on a file ChangeDir "c:\gba" ; change to whatever you want RequestFile$("second folder") ; this recalls first folder:( |