is there anyway to select a folder through scripting
I've been checking out delphi pages, and SelectDirectory doesn't seem to work in the scripting engine.
is there a alternate command to display a directory select dialog? or is that an unrealistic approach as far as scripting goes?
Select Folder
well if that's the case, i need to know if there are a few functions in there, specifically : 'WriteLn', 'ReadLn' and other file specific functions, if not what are their equivalents?antp wrote:Only few basic functions were added to the script engine.
As far as I know, only way to input a folder name is to ask the user to type it or to copy/paste it
thanks for all your help.
it'd be nice have that feature , but not neccessary.
Re: Select Folder
Well, I guess it should be possible to build some kind of selection menu using PickTree and ListDirectory nevertheless. Analyze the ListDirectory results, list the directories only using PickTree and add an extra item to select chosen folder (all within a loop). Current folder could be shown on the list. On PickTree window it would look like :Nicezia wrote:is there a alternate command to display a directory select dialog? or is that an unrealistic approach as far as scripting goes?
- Current folder is C:\programs\Ant Movie Catalog
..
\catalogs
\scripts
\templates
Choose current folder
Note: Not sure if this would work for changing drive letters, too.
Most of file specific functions that can be used on scripts, can be found on AMC help file, see Technical Specifications - Script files creation (or press help on AMC editor).
Re: Select Folder
bad4u wrote:Well, I guess it should be possible to build some kind of selection menu using PickTree and ListDirectory nevertheless. Analyze the ListDirectory results, list the directories only using PickTree and add an extra item to select chosen folder (all within a loop). Current folder could be shown on the list. On PickTree window it would look like :Nicezia wrote:is there a alternate command to display a directory select dialog? or is that an unrealistic approach as far as scripting goes?Not that easy and a workaround only, but possible (although never tested that)
- Current folder is C:\programs\Ant Movie Catalog
..
\catalogs
\scripts
\templates
Choose current folder
Note: Not sure if this would work for changing drive letters, too.
Most of file specific functions that can be used on scripts, can be found on AMC help file, see Technical Specifications - Script files creation (or press help on AMC editor).
thanks, i didn't even know that existed in the helpfile
I swear i've learned more about scripting for AMC in the last 6 hours than i have about C,C++,C#, and Visual Basic combined in the last 6 months (and that's putting an honest effort into it on both counts)
Thanks to you and antp, i have a fully working script now.
Re: Select Folder
I thought to that one but I forgot that it was listing directories too, I thought that I made it for files onlybad4u wrote: Analyze the ListDirectory results, list the directories only using PickTree
For writeln/readln there is only the LoadFromFile and SaveToFile of the TStringList class
e.g.
Code: Select all
procedure SaveToFile(Text: string; FileName: string);
var
Page: TStringList;
begin
Page := TStringList.Create;
Page.Text := Text;
Page.SaveToFile(FileName);
Page.Free;
end;
Re: Select Folder
yeah pretty much figuired out load and save files
but i appreciate the input
but i appreciate the input