Sunday, March 21, 2010

AppleScript의 property 변수

property 로 정의한 variable 은 그 값이 저장되어 있다.
따라서 AppleScript Editor 에서 Command + R 로 거듭 실행하면 그때마다 값이 올라간다.
substitute()
property var : 0
on substitute()
set var to var + 1
return var
end substitute
인용 :
Hi there, with applescript you can declare variables as properties. this means that the value of the variable is not reset every time you restart a script but every time you recompile it. this offers a convenient way to store data.

레퍼런스 :
applescript property declaration
Basic AppleScript information and syntax - built-in basic events

No comments:

Post a Comment