Problem with uses

edited 4:45PM in FastScript
Hi,
i have a problem with uses. I copied the files testunit.pas and unit1.pas to my project-directory. When i call fsscript.compile i get the error message
"Can not open file "unit1.pas"

What is wrong ? Demos\Main\Project1 works fine.

Thanks

Willi

Comments

  • edited 4:45PM
    FS searches for units in the current directory. It may be differ from exe directory.
    Either set the current directory before compiling a script or specify full name in 'uses':
    uses 'c:\myprograms\unit1.pas';
  • edited 4:45PM
    Hi,

    thank you very much for your help. Before compiling the script opendialog changed currentdir (i did not know that).

    Now i use :

    SetCurrentDir
    fsScript.Compile

    ...

    and erverything is ok.

    Thanks

    Willi

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.