EndFunc Posted April 10, 2009 Share Posted April 10, 2009 (edited) I am trying to convert this ADSI type code to autoit but getting undefined function. usr.Put "pwdLastSet", CLng(0) usr.SetInfo This is the code I tried. $UserObj.Put ("pwdLastSet", CLng(0)) $UserObj.SetInfo The setinfo part should be right but the I don't know the correct syntax for the first part. Edited April 10, 2009 by EndFunc EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
ProgAndy Posted April 10, 2009 Share Posted April 10, 2009 I think, you should replace CLng(0) with 0. CLng converts a variable to a long-type. I think, in AutoIt this is not necessary. *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Richard Robertson Posted April 10, 2009 Share Posted April 10, 2009 Put could also be a reference to a property, and not a real function. If replacing the CLng(0) with 0 isn't enough, try $UserObj.pwdLastSet = 0 Link to comment Share on other sites More sharing options...
EndFunc Posted April 10, 2009 Author Share Posted April 10, 2009 I think, you should replace CLng(0) with 0. CLng converts a variable to a long-type. I think, in AutoIt this is not necessary.Awesome, that worked. Thanks all EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now