So where can I get CamStudio and how much does it cost?
You can download CamStudio and use it completely free - yep - completely 100% free for your personal and commercial projects as CamStudio and the Codec are released under the GPL (for more details on this license, click here.)
There are no royalties or any monies to pay.
(번역)
그렇다면 CamStudio는 어디서 구할 수 있으며 비용은 얼마입니까?
CamStudio를 다운로드하여 완전히 무료로 사용할 수 있습니다. CamStudio와 코덱은 GPL에 따라 출시되므로 개인 및 상업 프로젝트에 완전히 100% 무료로 사용할 수 있습니다(이 라이센스에 대한 자세한 내용은 여기를 클릭하십시오). 로열티나 지불할 돈이 없습니다.
vbscript는외부의 .vbs를 쉽게 가져와 실행이 불가, 그래서 전역변수를 만들어 가져오는 방법이다.
아래의 예시는,
a.vbs와 b.vbs가 동일 경로에 있을 때 아래와 같은 방법으로 Include 함수로 해당 .vbs 파일을 불러와 사용.
1. a.vbs에 전역변수로 선언되어있는 값을 msgbox로 보기
2. a.vbs에서 선언된 함수의 리턴값을 msgbox로 보기
3. a.vbs의 sub루틴 함수 실행하기
a.vbs 파일에 있는 Add() 함수를 가져와서 b.vbs 에 실행하는 방법.
a.vbs 파일
'
' 공용함수를 보관할 스크립트
'
Option Explicit
' 전역변수로 쓸 값 확인, 결과값에 +3을 함
Dim AddResult_Plus3
' Function으로 값 리턴하기
Function Add(a, b)
Dim fun_result
' 전역변수에 값을 대입
AddResult_Plus3 = a + b + 3
' Add함수의 리턴 값. Add함수명에 아래와 같이 값을 넣어주어야 함.
fun_result = a + b
Add = fun_result
End Function
' Sub-routine은 리턴기능이 없음. 자체적 기능 수행.
Sub MySubRoutine
MsgBox TimeValue(Time)
End Sub
반응형
b.vbs 파일
Option Explicit
' import external .vbs file
Sub Include(sFilePath)
On Error Resume Next
Dim oFSO, oTextFile, sText
Set oFSO = CreateObject("Scripting.FileSystemObject")
If oFSO.FileExists(sFilePath) Then
Set oTextFile = oFSO.OpenTextFile(sFilePath, 1) ' 1 = for Reading
sText = oTextFile.ReadAll
oTextFile.Close
ExecuteGlobal sText
End If
Set oFSO = Nothing
Set oTextFile = Nothing
End Sub
' a.vbs 불러오기
Call Include("a.vbs")
' 1. a.vbs 내에 있는 함수를 실행하기, 전역변수 출력하기
Call Add(1,2)
' a에 선언되어있는 전역변수값 출력, 해당 변수는 Add()결과 값
MsgBox AddResult_Plus3
' 2. 리턴된 함수값 확인
Dim FromExternalValue
FromExternalValue = Add(1,2)
MsgBox FromExternalValue
' 3. sub 루틴 함수 실행
Call MySubRoutine()
(결과)
b를 실행시키면, a.vbs 내 선언된 Add() 함수를 연산하여, msgbox로 아래 순서대로 띄움.
12 = vbVariant는 - 변형 나타냄 (used only with arrays of Variants)
13 = vbDataObject은 - 데이터 액세스 개체를 나타낸다
17 = vbByte는 - 바이트를 나타냄
8192 = vbArray - 배열을 나타낸다
8204 = vbArray of Arrays - 배열 내 배열을 나타낸다
해당 타입을 Msgbox로 출력해보면 숫자로 나오니 확인.
만약 매번 숫자로 타입확인하기 싫다. 문자로 확인하고 싶다 하는 경우는 아래와 같이 Function을 만든다.
Function GetVarTypeDescription(varExpression)
Select Case VarType(varExpression)
Case 0
GetVarTypeDescription = "Empty"
Case 1
GetVarTypeDescription = "Null"
Case 2
GetVarTypeDescription = "Integer"
Case 3
GetVarTypeDescription = "Long"
Case 4
GetVarTypeDescription = "Single"
Case 5
GetVarTypeDescription = "Double"
Case 6
GetVarTypeDescription = "Currency"
Case 7
GetVarTypeDescription = "Date"
Case 8
GetVarTypeDescription = "String"
Case 9
GetVarTypeDescription = "Object"
Case 10
GetVarTypeDescription = "Error"
Case 11
GetVarTypeDescription = "Boolean"
Case 12
GetVarTypeDescription = "Variant"
Case 8204
GetVarTypeDescription = "Array of Arrays (Jagged Array)"
Case Else
GetVarTypeDescription = "Unknown Type"
End Select
End Function
반응형
그리고 이 함수를 이용해서 해당 변수의 타입이 무엇인지 쉽게 확인할 수 있다.
함수를 사용하는 방법은 아래.
a = ""
b = 123
c = 32.12
d = "hello world"
e = true
x = Array(Array(1,2,3), Array(4,5,6))
MsgBox(GetVarTypeDescription(a))
MsgBox(GetVarTypeDescription(b))
MsgBox(GetVarTypeDescription(c))
MsgBox(GetVarTypeDescription(d))
MsgBox(GetVarTypeDescription(e))
MsgBox(GetVarTypeDescription(x))
Function GetVarTypeDescription(varExpression)
Select Case VarType(varExpression)
Case 0
GetVarTypeDescription = "Empty"
Case 1
GetVarTypeDescription = "Null"
Case 2
GetVarTypeDescription = "Integer"
Case 3
GetVarTypeDescription = "Long"
Case 4
GetVarTypeDescription = "Single"
Case 5
GetVarTypeDescription = "Double"
Case 6
GetVarTypeDescription = "Currency"
Case 7
GetVarTypeDescription = "Date"
Case 8
GetVarTypeDescription = "String"
Case 9
GetVarTypeDescription = "Object"
Case 10
GetVarTypeDescription = "Error"
Case 11
GetVarTypeDescription = "Boolean"
Case 12
GetVarTypeDescription = "Variant"
Case 8204
GetVarTypeDescription = "Array of Arrays (Jagged Array)"
Case Else
GetVarTypeDescription = "Unknown Type"
End Select
End Function