ArrayArrayArrayArray
BrainModularBrainModular Users Forum2011-08-23T13:18:42+02:00https://brainmodular.com/forums/app.php/feed/topic/30842011-08-23T13:18:42+02:002011-08-23T13:18:42+02:00https://brainmodular.com/forums/viewtopic.php?t=3084&p=20883#p20883 Thanks for the answer...
]]>2011-08-22T08:47:17+02:002011-08-22T08:47:17+02:00https://brainmodular.com/forums/viewtopic.php?t=3084&p=20867#p20867 I too had a look at the scripts references and couldn't find anything that lists files names.
]]>2011-08-21T20:55:50+02:002011-08-21T20:55:50+02:00https://brainmodular.com/forums/viewtopic.php?t=3084&p=20860#p20860Statistics: Posted by nay-seven — 21 Aug 2011, 20:55
]]>
2011-08-21T20:21:19+02:002011-08-21T20:21:19+02:00https://brainmodular.com/forums/viewtopic.php?t=3084&p=20858#p20858 I work on a script at the moment and I need to get the file names of a directory. I tried to use this :
var searchResult : TSearchRec;
begin // Try to find regular files matching Unit1.d* in the current dir if FindFirst('Unit1.d*', faAnyFile, searchResult) = 0 then begin repeat ShowMessage('File name = '+searchResult.Name); ShowMessage('File size = '+IntToStr(searchResult.Size)); until FindNext(searchResult) <> 0;
// Must free up resources used by these successful finds FindClose(searchResult); end; end;
But when I compile : TSearchRec isn't recognize as a valid variable (undeclared type TSearchRec) ! I also tried with the Pascal var type : SearchRec, but it doesn't seemed to be valid as well... So I had a look to the Usine script references and I didn't find the functions Findfirst, FindNext and FindClose ???
]]>BrainModularBrainModular Users Forum2011-08-23T13:18:42+02:00https://brainmodular.com/forums/app.php/feed/topic/30842011-08-23T13:18:42+02:002011-08-23T13:18:42+02:00https://brainmodular.com/forums/viewtopic.php?t=3084&p=20883#p20883 Thanks for the answer...
]]>2011-08-22T08:47:17+02:002011-08-22T08:47:17+02:00https://brainmodular.com/forums/viewtopic.php?t=3084&p=20867#p20867 I too had a look at the scripts references and couldn't find anything that lists files names.
]]>2011-08-21T20:55:50+02:002011-08-21T20:55:50+02:00https://brainmodular.com/forums/viewtopic.php?t=3084&p=20860#p20860Statistics: Posted by nay-seven — 21 Aug 2011, 20:55
]]>2011-08-21T20:21:19+02:002011-08-21T20:21:19+02:00https://brainmodular.com/forums/viewtopic.php?t=3084&p=20858#p20858 I work on a script at the moment and I need to get the file names of a directory. I tried to use this :
var searchResult : TSearchRec;
begin // Try to find regular files matching Unit1.d* in the current dir if FindFirst('Unit1.d*', faAnyFile, searchResult) = 0 then begin repeat ShowMessage('File name = '+searchResult.Name); ShowMessage('File size = '+IntToStr(searchResult.Size)); until FindNext(searchResult) <> 0;
// Must free up resources used by these successful finds FindClose(searchResult); end; end;
But when I compile : TSearchRec isn't recognize as a valid variable (undeclared type TSearchRec) ! I also tried with the Pascal var type : SearchRec, but it doesn't seemed to be valid as well... So I had a look to the Usine script references and I didn't find the functions Findfirst, FindNext and FindClose ???