Xink Posted October 3, 2006 Share Posted October 3, 2006 Hello,I have a small vbs which i have already converted to autoit script. Everything is converted except the keyword Nothing in vbs.Is there a similar function in Autoit for the keyword Nothing in vbs?thanks in advance,Xink Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 3, 2006 Moderators Share Posted October 3, 2006 Hello, I have a small vbs which i have already converted to autoit script. Everything is converted except the keyword Nothing in vbs. Is there a similar function in Autoit for the keyword Nothing in vbs? thanks in advance, XinkDid you try something like: (assuming the vbs syntax looks something like)set var = Nothing To var = ''? Mind you, I'm no VB person, I just started playing with it the other day thanks to KandieMan (don't know if that's a good thing yet ) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
MHz Posted October 3, 2006 Share Posted October 3, 2006 Is there a similar function in Autoit for the keyword Nothing in vbs?AutoIt does not have a keyword same as VBScript's Nothing. @SmOke_N, Nothing and "" are different. Nothing erases the variable itself. VBScript example: Dim var ' Assign "" to var var = "" ' Set to Nothing Set var = Nothing ' Now Nothing equals an undeclared var and an error will occur msgbox var Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 3, 2006 Moderators Share Posted October 3, 2006 @MHz ... Thanks Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Xink Posted October 3, 2006 Author Share Posted October 3, 2006 AutoIt does not have a keyword same as VBScript's Nothing. @SmOke_N, Nothing and "" are different. Nothing erases the variable itself. So there is no command in autoit to check/reset the variable to nothing? thanks, Xink Link to comment Share on other sites More sharing options...
MHz Posted October 4, 2006 Share Posted October 4, 2006 (edited) Function that does Nothing, No to that also. AutoIt does not have that option. AFAIK, no one has created a capable DllCall, UDF or other means to set a Global variable to Nothing. @SmOke_N Assign it to "" again seems to bring var back to life. Dimming it will not. Guess the var may exist perhaps but really does contain Nothing. VBScript has no IsDeclared() equivalent to test if the var exists if it is set to Nothing. Option Explicit Dim var '; Assign "" var = "" '; Set to Nothing Set var = Nothing '; Reintroduce var var = "" 'Dim var msgbox var Edited October 4, 2006 by MHz Link to comment Share on other sites More sharing options...
Confuzzled Posted October 7, 2006 Share Posted October 7, 2006 I'm not sure what you are trying to accomplish. If you are trying to destroy an instance of an object, then the code to change that has changed recently. Post some code/examples... 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