Hi,
What is the counterpart of the envsymbol predicate of version 5.2 in the personal edition of version 7.4?
-
- VIP Member
- Posts: 215
- Joined: 24 Apr 2007 12:26
Getting values of environment variables
TIA, Regards,
Frank Nagy
Frank Nagy
-
- VIP Member
- Posts: 73
- Joined: 17 Oct 2006 5:49
envsymbol
Hi Ferenc,
Look at the 5xVIP/5xPlatformSupport/platformsupport5x/envsymbol/2.
Gal Zsolt
(~ CalmoSoft ~)
Look at the 5xVIP/5xPlatformSupport/platformsupport5x/envsymbol/2.
Regards,envsymbol : (
string EnvId,
string SymbolStr)
determ (i,o).
Reads the value of an environment symbol.
Description
The envsymbol predicate searches for a symbol EnvId in the applications environment table.
If found, the value will be returned in SymbolStr; otherwise the predicate fails.
Preferably use environment::getVariable.
Gal Zsolt
(~ CalmoSoft ~)
You do not have the required permissions to view the files attached to this post.
Last edited by CalmoSoft on 1 Sep 2014 13:36, edited 7 times in total.
-
- VIP Member
- Posts: 1466
- Joined: 28 Feb 2000 0:01
There is no environment support in the Personal Edition, only the Commercial Edition have environment support.
In the Commercial Edition the predicates to use are in the environment class.
The classes in 5xVip should only be used as "temporary migration support" for 5x projects, new code should never be based on these packages.
In the Commercial Edition the predicates to use are in the environment class.
The classes in 5xVip should only be used as "temporary migration support" for 5x projects, new code should never be based on these packages.
Regards Thomas Linder Puls
PDC
PDC
-
- VIP Member
- Posts: 215
- Joined: 24 Apr 2007 12:26
Workaround: check environment varaibales in batch command files
No problem. I can check existence of the environment variables in batch command files
@if "%irfan_view%" == "" goto err1
:err1
pause Conversion has failed because the environment variable "irfan_view" is undefined.
Code: Select all
@echo Start of conpic.bat
@echo Batch conversion of the given graphical file(s)
@echo parameters
@echo #1 input filename/mask = %1
@echo #2 output filename/mask = %2
@echo The batch file needs the environment variable
@echo irfan_view showing the path to i_view32.exe.
Code: Select all
@if "%1" == "%2" goto same
@"%irfan_view%\i_view32.exe" "%1" /convert="%2" /cmdexit
@if errorlevel 1 goto err2
pause File %1 has been successfully converted to %2.
@goto fin
:same
pause File %1 has not been converted because input and output files are the same.
@goto fin
:err2
pause Conversion has failed because of "%irfan_view%\i_view32.exe" error.
@goto fin
pause Conversion has failed because the environment variable "irfan_view" is undefined.
Code: Select all
:fin
@echo End of conpic.bat
TIA, Regards,
Frank Nagy
Frank Nagy