다음은 CA DMM 스크립트에서 사용되는 키워드입니다.
Detection 함수를 나타냅니다. 응용 프로그램이 호출하는 첫 번째 함수입니다. 이 함수에는 앞에서 설명한 Detect 명령과 Option 명령이 포함되어야 합니다.
function Detection()
{
// detection statements
}
0을 나타냅니다.
if (KeyExists( "HKLM\\Software\\Microsoft\\Plus!", false)) StoreKey( "HKLM\\Software\\Microsoft\\Plus!");
if (Detect ("winword.exe") == false)
return;
함수를 선언하며 일반 함수 이름 앞에 나타나야 합니다. 함수는 스크립트 내에서 호출되기 전에 정의해야 합니다. 이 함수에는 Store 또는 Apply 명령이 아니라 일반 명령만 포함됩니다.
function <함수 이름> ( )
{
// do something
}
function MyStoreFunction()
{
//do something
include 파일 구문 분석을 활성화합니다. 헤더 파일에 할당된 모든 변수는 스크립트의 글로벌 범위에 삽입됩니다. 헤더 파일에는 스크립트 또는 인터프리터에서 호출 가능한 함수가 포함됩니다. include 파일에는 적절한 문이 포함되어야 합니다. 이 include 문은 세미콜론으로 끝나지 말아야 합니다.
파일 이름(문자열 값)
#include <파일 이름>
#include "Script.hdr"
PreProcess 함수를 나타냅니다. 이 함수는 모든 store 함수 전에 항상 호출됩니다. 네트워크 마이그레이션의 경우 이 함수는 서버에서 호출됩니다. 이 함수에서는 일반 명령만 사용할 수 있습니다.
function PreProcess()
{
// statements to run before any storing takes place
PostProcess 함수를 나타냅니다. 이 함수는 모든 apply 함수 후에 항상 호출됩니다. 이 함수에서는 일반 명령만 사용할 수 있습니다.
function PostProcess()
{
// statements to run after all applying takes place
변수가 현재 범위에 대해 로컬임을 지정합니다. 스크립트에서 재귀 사용이 가능합니다.
var myLocalVariable;
function RecursionTest( strRecursionCount )
{
Print("RecursionTest 시작 = " + strRecursionCount );
if (strRecursionCount != "xxxx")
{
var strIfScope = strRecursionCount + "x";
RecursionTest( strIfScope );
}
else
{
return;
}
Print("RecursionTest 종료 = " + strRecursionCount );
}
function MyTestFunction()
{
RecursionTest( "x" );
1을 나타냅니다.
if (KeyExists( "HKLM\\Software\\Microsoft\\Plus!", true )) ApplyKey( "HKLM\\Software\\Microsoft\\Plus!" );
|
Copyright © 2013 CA.
All rights reserved.
|
|