base path for scripts?

Ask questions about how to create a script or swap scripts with other users.
Post Reply
jerry1970
Posts: 229
Joined: 25 Jul 2006 07:41
Location: Netherlands

base path for scripts?

Post by jerry1970 »

When I have this line

Code: Select all

uses 'CreateNewFile.pas';
in a file that is in the scripts folder under the TextEd folder and try to run it, it returns this error:
Cannot open file "C:\Program Files\RJ TextEd\scripts\Fast Reports - Demo Scripts\PascalScripts\CreateNewFile.pas"

Why is that folder set as the base directory for scripts?
Maybe a setting in TextEd is necessary?

The obvious workaround is of course

Code: Select all

uses MainApp.AppDataPath + '\scripts\CreateNewFile.pas';
but you can't have a variable on that line...

I have now solved this by using this:

Code: Select all

^!
but that's not the proper way of course...

Also, opening a template file and copy the contents into a new file will put the template file in the list of recently opened files, which is not what I'd like.

And is there a way of searching for text? I'd like to add

Code: Select all

^!
where the cursor should be placed. So I have to find the ^!, remove it, and leave the cursor at that position.

Jerry

Post Reply