You are here: PSPad forum > English discussion forum > Re: File Name of Main file in project
Posted by: hackathlete | Date: 2024-01-09 22:20 | IP: IP Logged
Hello
Is there a way to get the file name of the project's main file within a VbScript; e.g. similar getVarValue(%MainFile%)?
Regards
Posted by: pspad | Date: 2024-01-10 05:38 | IP: IP Logged
In case when main file is assigned, it should be returned as the %File%
Posted by: hackathlete | Date: 2024-01-12 22:49 | IP: IP Logged
Hello
1. I wrote following small script for testing the behaviour of the %File% variable.
sub TestFilename
FileName = getVarValue("%File%")
msgbox FileName
end sub
2. I created a project and set a file as main file of the project. But, the message box displays always the name of the open file and not the name of the main file. If there is no file open, then the msgbox is empty.
Did I understand anything wrong?
Posted by: pspad | Date: 2024-01-13 18:53 | IP: IP Logged
I will check it
Posted by: hackathlete | Date: 2024-01-15 21:19 | IP: IP Logged
Thanks! BTW, I think it would be helpful, if there are two different variables. One variable for the actual open file and another one for the main file of the project. Because depending on the function of the script the name/path of the main file or the open file is needed.
Posted by: pspad | Date: 2024-02-28 10:33 | IP: IP Logged
Hello
I added new variable %MainProjFile%
It will return Main project file if exists, if not than active file
It will be available in the next build
Posted by: hackathlete | Date: 2024-03-12 19:38 | IP: IP Logged
Hello, thank you very much! I am looking forward...
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR