ArrayArrayArrayArrayArrayArrayArrayArray
BrainModularBrainModular Users Forum2011-03-29T10:26:09+02:00https://brainmodular.com/forums/app.php/feed/topic/27652011-03-29T10:26:09+02:002011-03-29T10:26:09+02:00https://brainmodular.com/forums/viewtopic.php?t=2765&p=18843#p18843It works perfectly now, thank you very much...
]]>2011-03-21T10:19:17+02:002011-03-21T10:19:17+02:00https://brainmodular.com/forums/viewtopic.php?t=2765&p=18764#p18764 Create another parameter, eg pFileNameOut. This should also be of type ptTextField. In Callback, you can do something like:
CODE:
PROCEDURE Callback(n : Integer);BEGIN IF (n = pFileName) THEN SetStringValue(pFileNameOut, ExtractFileName(GetStringValue(pFileName)));END;
]]>2011-03-20T11:38:57+02:002011-03-20T11:38:57+02:00https://brainmodular.com/forums/viewtopic.php?t=2765&p=18746#p18746 Thanks for your answer. Unfortunately it doesn't work as expected. The whole string is getting out of the script. I'll have to search in my archives books about Turbo Pascal and relearn this language...
]]>2011-03-14T23:04:33+02:002011-03-14T23:04:33+02:00https://brainmodular.com/forums/viewtopic.php?t=2765&p=18640#p18640 Here's an example script for Usine accepting one input - the pathfile name - and displays the extracted strings in the console every time the script is initiated or the file name input changes:
Paste it into an empty script module and compile. You can connect an Interface Control/Open Dialog module to input if you want, but you can also just enter text strings to see how the different extracts.
]]>2011-03-13T01:06:16+02:002011-03-13T01:06:16+02:00https://brainmodular.com/forums/viewtopic.php?t=2765&p=18626#p18626 I find this post very interesting, but I'm not familiar with scripts and I don't know how to use this information.
I tried to copy this in an empty script but I had a couple of errors. If someone can help me.
Thanks
Kenan
// Full Unit code. // ----------------------------------------------------------- // You must store this code in a unit called Unit1 with a form // called Form1 that has an OnCreate event called FormCreate.
unit Unit1;
interface
uses SysUtils, // Unit containing the ExtractFileName command Forms, Dialogs;
type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); end;
var Form1: TForm1;
implementation {$R *.dfm} // Include form definitions
procedure TForm1.FormCreate(Sender: TObject); var fullFileName : string;
begin // Set up a full file name with drive and path fullFileName := 'C:Program FilesBorlandDelphi7ProjectsUnit1.dcu';
// Show the component parts of this full name ShowMessage('Drive = '+ExtractFileDrive (fullFileName)); ShowMessage('Dir = '+ExtractFileDir (fullFileName)); ShowMessage('Path = '+ExtractFilePath (fullFileName)); ShowMessage('Name = '+ExtractFileName (fullFileName)); ShowMessage('Ext = '+ExtractFileExt (fullFileName)); end;
]]>2011-03-07T11:11:25+02:002011-03-07T11:11:25+02:00https://brainmodular.com/forums/viewtopic.php?t=2765&p=18525#p18525Statistics: Posted by 23fx23 — 07 Mar 2011, 10:11
Statistics: Posted by gthibert — 07 Mar 2011, 03:10
]]>2011-03-07T02:29:02+02:002011-03-07T02:29:02+02:00https://brainmodular.com/forums/viewtopic.php?t=2765&p=18517#p18517 There's a lot of functions to manipulate strings in the script reference, but I can't figure out wich would allow me to extract a substring.
Statistics: Posted by gthibert — 07 Mar 2011, 01:29
]]>BrainModularBrainModular Users Forum2011-03-29T10:26:09+02:00https://brainmodular.com/forums/app.php/feed/topic/27652011-03-29T10:26:09+02:002011-03-29T10:26:09+02:00https://brainmodular.com/forums/viewtopic.php?t=2765&p=18843#p18843It works perfectly now, thank you very much...
]]>2011-03-21T10:19:17+02:002011-03-21T10:19:17+02:00https://brainmodular.com/forums/viewtopic.php?t=2765&p=18764#p18764 Create another parameter, eg pFileNameOut. This should also be of type ptTextField. In Callback, you can do something like:
CODE:
PROCEDURE Callback(n : Integer);BEGIN IF (n = pFileName) THEN SetStringValue(pFileNameOut, ExtractFileName(GetStringValue(pFileName)));END;
]]>2011-03-20T11:38:57+02:002011-03-20T11:38:57+02:00https://brainmodular.com/forums/viewtopic.php?t=2765&p=18746#p18746 Thanks for your answer. Unfortunately it doesn't work as expected. The whole string is getting out of the script. I'll have to search in my archives books about Turbo Pascal and relearn this language...
]]>2011-03-14T23:04:33+02:002011-03-14T23:04:33+02:00https://brainmodular.com/forums/viewtopic.php?t=2765&p=18640#p18640 Here's an example script for Usine accepting one input - the pathfile name - and displays the extracted strings in the console every time the script is initiated or the file name input changes:
Paste it into an empty script module and compile. You can connect an Interface Control/Open Dialog module to input if you want, but you can also just enter text strings to see how the different extracts.
]]>2011-03-13T01:06:16+02:002011-03-13T01:06:16+02:00https://brainmodular.com/forums/viewtopic.php?t=2765&p=18626#p18626 I find this post very interesting, but I'm not familiar with scripts and I don't know how to use this information.
I tried to copy this in an empty script but I had a couple of errors. If someone can help me.
Thanks
Kenan
// Full Unit code. // ----------------------------------------------------------- // You must store this code in a unit called Unit1 with a form // called Form1 that has an OnCreate event called FormCreate.
unit Unit1;
interface
uses SysUtils, // Unit containing the ExtractFileName command Forms, Dialogs;
type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); end;
var Form1: TForm1;
implementation {$R *.dfm} // Include form definitions
procedure TForm1.FormCreate(Sender: TObject); var fullFileName : string;
begin // Set up a full file name with drive and path fullFileName := 'C:Program FilesBorlandDelphi7ProjectsUnit1.dcu';
// Show the component parts of this full name ShowMessage('Drive = '+ExtractFileDrive (fullFileName)); ShowMessage('Dir = '+ExtractFileDir (fullFileName)); ShowMessage('Path = '+ExtractFilePath (fullFileName)); ShowMessage('Name = '+ExtractFileName (fullFileName)); ShowMessage('Ext = '+ExtractFileExt (fullFileName)); end;
Statistics: Posted by gthibert — 07 Mar 2011, 03:10
]]>2011-03-07T02:29:02+02:002011-03-07T02:29:02+02:00https://brainmodular.com/forums/viewtopic.php?t=2765&p=18517#p18517 There's a lot of functions to manipulate strings in the script reference, but I can't figure out wich would allow me to extract a substring.
Statistics: Posted by gthibert — 07 Mar 2011, 01:29