heres how its done
;; Example;;
AutoItSetOption ( "ExpandEnvStrings", 1) ;; Lets you use variables like in v2
$var = "blahblah"
MsgBox(0, "AutoIt", "Here is the variable: %var%")
Exit
this is really just a VERY basic example i guess. When you use %varname% be sure you put it between "..." cuz i dont know if %varname% will work outside the quotes, just like $varname wont work inside the quotes
hope this helped