Page 1 of 1
Directory information
Posted: Mon Oct 10, 2011 8:47 am
by Informatie
I created a simple program to show what your current directory structure is.
If nothing is shown the directory key word is not relevant for the env you run the progam in.
for me it was helpfull.
Re: Directory information
Posted: Mon Oct 10, 2011 12:01 pm
by Klaus
Dag Informatie (wat een geraffineerde naam

)
thanks for the stack, quite helpful!
Some hints:
Code: Select all
...
## Always use QUOTES around names -> ... fld "Enginepath"!
put specialfolderpath("Engine") into field Enginepath
## This does not work!
## The engine presumes that enginepath is a variable!
## And since it has not been initialized in any way yet, its content is the string "enginepath"!
## So it is NOT empty and thus one does not see this dialog.
if enginepath is empty then
## Use:
## if fld "Enginepath" = emtpty then...
put "You are not running IOS" into enginepath
end if
...
Groetjes
Klaus
Re: Directory information
Posted: Mon Oct 10, 2011 11:01 pm
by Informatie
Updated the code and thx to klaus changed some mistakes.
added a matrix to get an overview.
Re: Directory information
Posted: Tue Oct 11, 2011 3:29 pm
by Klaus
Hi Informatie,
sorry still some more inconveniences
You need to use the CODE of the Mac folders, not the descriptions!
And please use QUOTES around all names all the time
Code: Select all
---- CONTROL
put specialfolderpath("ctrl") into field "Controlpath"
if field "Controlpath" is empty then
put teerste &&t notrun &&t m && "," && tmo into field "Controlpath"
end if
---- APPLE
put specialfolderpath("aexƒ") into field "applepath"
if field "applepath" is empty then
put teerste && tnotrun && tm into field "applepath"
end if
---- EXTENSION
put specialfolderpath("extn") into field "extensionpath"
if field "extensionpath" is empty then
put teerste && tnotrun && tm into field "extensionpath"
end if
But these three folders will only work on OS <=9 and return empty on OS X.
Best
Klaus
Re: Directory information
Posted: Wed Oct 12, 2011 10:11 am
by Informatie
THX Klaus,
You are right the QUOTES I have forgotten, but LC doesn't seem to bother, strange for a learning newby and learning fast.
I'll follow teh academy now.
I'll make the changes and walk through the code again.
DJ
Platform MAC OSX, snow leopard.
Re: Directory information
Posted: Wed Oct 12, 2011 11:34 am
by Klaus
Informatie wrote:THX Klaus,
You are right the QUOTES I have forgotten, but LC doesn't seem to bother, strange for a learning newby and learning fast.
OK, I understand that, but using QUOTES for names is definitively the OFFICIAL and thus correct snytax.
The engine may be forgiving in smaller projects, but it MAY bite you when you least exspect it!
I have bitten by my sloppiness in a similar case in the past, that's why I'm "evangelizing" this so passionately
Bset
Klaus
Re: Directory information
Posted: Sat Oct 29, 2011 6:07 am
by Informatie
I have updated the code, to make it more complete.
Let me think it's useful or missing some information
Re: Directory information
Posted: Sat Oct 29, 2011 12:26 pm
by Klaus
Hi DJ,
OK, just a tiny cosmetic thing:
"Empty because you are not running Mac OS < 9"
Should read:
"Empty because you are not running Mac OS < 10"
Best
Klaus
Re: Directory information
Posted: Sat Oct 29, 2011 9:09 pm
by Informatie
Thz klaus again I'll like this it's a good learning curve.