Hi,
I'm looking the way to have a requester that will allow me to choose a new current directory wich is currently the directory of my script.
Thanks
Requester asking to choose a directory
Re: Requester asking to choose a directory
----------------------------
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆
Re: Requester asking to choose a directory
I search true the AmigaGuide but since there is no search function (it's shadowed) it's hard to find something...
Thank you...
Thank you...
Re: Requester asking to choose a directory
You are welcome!
----------------------------
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆
Re: Requester asking to choose a directory
Hi,
The ChangeDirectory create a problem wih the script, the .XML files are not found anymore!
Maybe I have to save the current directory before changing it, then restore after?
I found way to make it work without changing the current directory, I'm not sure it will be compatible with Mac!
Case "mn_include_all":
P$ = PathRequest("Indiquer l'endroit des fichiers EXP???.CSV")
V = 0
For Local V = 1 To 999
E = Exists(P$ .. "/" .. "Exp" .. StrStr(V) .. ".csv")
While E = 1
f$ = P$ .. "/" .. "Exp" .. StrStr(V) .. ".csv"
projectname$ = f$
OpenFile(1, projectname$)
Bye!
The ChangeDirectory create a problem wih the script, the .XML files are not found anymore!
Maybe I have to save the current directory before changing it, then restore after?
I found way to make it work without changing the current directory, I'm not sure it will be compatible with Mac!
Case "mn_include_all":
P$ = PathRequest("Indiquer l'endroit des fichiers EXP???.CSV")
V = 0
For Local V = 1 To 999
E = Exists(P$ .. "/" .. "Exp" .. StrStr(V) .. ".csv")
While E = 1
f$ = P$ .. "/" .. "Exp" .. StrStr(V) .. ".csv"
projectname$ = f$
OpenFile(1, projectname$)
Bye!
Re: Requester asking to choose a directory
You should do at least this change to make it safer.
replace this:
with this:
Then you don't have to worry how it works in different systems and what user selects as a path.
There are also some directory handling functions in DOS library, which you might find handy. ReadDirectory and DirectoryItems, for example.
replace this:
Code: Select all
P$ .. "/" .. "Exp" .. StrStr(V) .. ".csv"
Code: Select all
FullPath(P$, "Exp" .. StrStr(V) .. ".csv")
There are also some directory handling functions in DOS library, which you might find handy. ReadDirectory and DirectoryItems, for example.