For portability reasons I would like to use environment variables when deploying the "start application" plugin.
Is there a way?
Example:
"C:\programs\test\test.exe" I would like to replace by "%PROGRAMFILES%\test\test.exe".
using enviromental variables when calling programms
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: using enviromental variables when calling programms
Here in EventGhost you can access the system folders via eg.folderPath.
For example the %PROGRAMFILES% you get as eg.folderPath.ProgramFiles.
So, in the Start Application action you can do it like in the following example: To see all available folders, you can do in a script:Pako
For example the %PROGRAMFILES% you get as eg.folderPath.ProgramFiles.
So, in the Start Application action you can do it like in the following example: To see all available folders, you can do in a script:
Code: Select all
for name in eg.folderPath.__ALL__:
print name + ": " + getattr(eg.folderPath, name)