Free Scripts
Example of While Statement
I = 0 While I <= 10 MsgBox I i=i+1 Wend
Example of True Keyword
onOff = True If onOff = True Then MsgBox "This item is on." Else MsgBox "This item is off." End If
Example of Stop Instruction
For I = -1 To 10 MsgBox I If I = 3 Then Stop Next I
Example of MsgBox Instruction Function
MsgBox "Please press OK button" If MsgBox("Please press OK button",vbOkCancel) = vbOK Then MsgBox "OK was pressed" Else MsgBox "Cancel was pressed" End If
Input Box
i = InputBox$("Enter Your Name:", _ "Input Box Example","Garrett") If i = "Garrett" Then MsgBox "You work for DragonScripting.com" Else MsgBox "You do not work for DragonScripting.com" End If
GoTo
GoTo toThis MsgBox"This line of code will be skipped over and go directly to toThis: unless this code is broke..." MsgBox " This line of code is not working now. toThis: MsgBox "Code is working properly."
Example of False Keyword
continueVar = False If continueVar = False Then End End If MsgBox "rest of command"
Example of End Instruction
onOff = off If onOff = off Then End End If MsgBox "onOff has been turned onto true"
Example of Empty Keyword
test = Empty If test = "empty" Then MsgBox "This should not show" End If If test = "" Then MsgBox "test is empty" End If
Example of Do Loop Until
iStart = 0 iEnd = 9 errorTime = 10 Do Wait .2 MsgBox iStart iStart = iStart + 1 Loop Until iStart = iEnd Or iStart = errorTimer If iStart = errorTimer Then MsgBox "Time Out Error" Exit Sub End If
Example of Beep
MsgBox "The system will now beep." Beep
Example of “AppBringUp” keyword
AppBringUp "www.DragonScripting.com" AppBringUp "notepad.exe"
Example of Select Case
aVariable = "A" Select Case aVariable Case "A" MsgBox "you said A" Case "B" MsgBox "you said B" Case "C" MsgBox "you said C" Case "D" MsgBox "you said D" Case "E" MsgBox "you said E" Case "F" MsgBox "you said F" Case "G" MsgBox "you said G" Case "H" MsgBox "you said...
Example of using “clipboard” keyword
Example1 = Clipboard MsgBox Example1
These are different ways to send keystrokes with dragon.
SendKeys "Hello world {enter}",True SendDragonKeys "Hello world {enter}" aVariable = "hello world {enter}" aNumber = 3 anotherNumber = aNumber + aNumber SendKeys aVariable SendKeys aNumber SendKeys "{enter}",True SendKeys anotherNumber
Contact Us
Location: Irvine, CA
Phone: (949) 346-3306
Email: Support@DragonScripting.com
Follow Us