Problem with uses

edited 3:00AM 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 3:00AM
    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 3:00AM
    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