EnvSet
写环境变量.
EnvSet ( "envvariable" [, "value"] )
参数
envvariable
|
环境变量名称.
|
value
|
[可选] 设置环境变量的值. 若不使用此参数,则该环境变量将被删除.
|
返回值
备注
函数设置的环境变量仅访问 AutoIt 生成的程序 (Run(), RunWait()). 一旦 AutoIt 关闭, 变量将不复存在.
函数示例
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Create an environment variable called %MYVAR% and assign it a value. When you assign or retrieve an environment variable you do so minus the percentage signs (%).
EnvSet("MYVAR", "This is some text!")
; Retrieve the environment variable that was just assigned a value previously.
Local $sEnvVar = EnvGet("MYVAR")
; Display the value of the environment variable $MYVAR%.
MsgBox($MB_SYSTEMMODAL, "", "The environment variable %MYVAR% has the value of: " & @CRLF & @CRLF & $sEnvVar)
EndFunc ;==>Example
----------------------------------------
该函数可以通过命令 exect 调用
参见:
EnvGet, EnvUpdate
EnvSet('MYENV','это~~тест')
EnvGet('MYENV')
© Аверин Андрей для Total Commander Image Averin-And@yandex.ru
|