Hello,
I am new to Kixtart. I've used vbscript for years and also some autoit, but now I need to learn Kixtart.

I read the manual and have gotten the hang of some basic variable and string manipulation, but I'm having some difficulty using some AD scripting, including the example for FUNCTION in the manual.
My script is test2.kix:
 Code:
messagebox(ReadNC(%computername%),"")
Function ReadNC( ServerName )
  $ReadNC = ""
  $Root = GetObject( "LDAP://" + ServerName + "/rootDSE" )
  If @ERROR = 0
     $ReadNC = $Root.defaultNamingContext
  Endif
EndFunction

When I run kix32.exe test2.kix, I get
ERROR : error in parameterdefinition of [readnc]!
Script: C:\...path to test file...test2.kix

Here is a script I'm trying to convert to KIX from vbscript.
 Code:
Set $objItem = GetObject("LDAP://***Distinguised User Name***")
$msExchHomeServerName = $objItem.msExchHomeServerName
$EmailServer = Right($msExchHomeServerName,Len($msExchHomeServerName) - InstrRev($msExchHomeServerName,"="))
MessageBox($EmailServer,"")


When I run it, the error message is:
ERROR : IDispatch pointers not allowed in expressions!
Script: C:\...path to test script
Line : 2

...not sure what's going on.