greenmachine Posted April 6, 2006 Share Posted April 6, 2006 But Val, isn't that pointless? You're overwriting what's in the variable with the variable name (wow that's a dumb idea) so you can display the variable... if you're going to do that why even have a variable? Why not just use a string? Link to comment Share on other sites More sharing options...
Valuater Posted April 6, 2006 Share Posted April 6, 2006 But Val, isn't that pointless? You're overwriting what's in the variable with the variable name (wow that's a dumb idea) so you can display the variable... if you're going to do that why even have a variable? Why not just use a string?I totally agree green.... it was "Pointless"( so is the whole thread to me )8) Link to comment Share on other sites More sharing options...
greenmachine Posted April 6, 2006 Share Posted April 6, 2006 I totally agree green.... it was "Pointless"( so is the whole thread to me )8)And yet we're still posting stupid ideas, while he's offline. Won't he be happy when he gets back to this thread. Link to comment Share on other sites More sharing options...
Infinitex0 Posted April 6, 2006 Share Posted April 6, 2006 Couldn't you just define your variable with another variable? The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center] Link to comment Share on other sites More sharing options...
Valuater Posted April 6, 2006 Share Posted April 6, 2006 (edited) And yet we're still posting stupid ideas, while he's offline. Won't he be happy when he gets back to this thread.nopper... he sure won'the didn't reply to our first posts... ( as if they worked )he probably wont even look here now8) Edited April 6, 2006 by Valuater Link to comment Share on other sites More sharing options...
cppman Posted April 6, 2006 Author Share Posted April 6, 2006 whoa whoa.. calm down peoples. lol i just wanted to know if you can do that. or if their is a way. Miva OS Project Link to comment Share on other sites More sharing options...
MHz Posted April 6, 2006 Share Posted April 6, 2006 (edited) Here is a simple way to get the variable name. Needs to be uncompiled. Global $test $result = _GetVarName($test, @ScriptLineNumber) MsgBox(0, '', $result) Func _GetVarName($var, $linenumber) If Not @Compiled Then $line = FileReadLine(@ScriptFullPath, $linenumber) $regex = StringRegExpReplace($line, '.*(_GetVarName.)', '') $regex = StringRegExpReplace($regex, ', @ScriptLineNumber.*', '') Return $regex EndIf EndFunc though, to make use of it, then you are preseting the function call literally. Edited April 6, 2006 by MHz Link to comment Share on other sites More sharing options...
cppman Posted April 6, 2006 Author Share Posted April 6, 2006 thanks. Miva OS Project Link to comment Share on other sites More sharing options...
gamerman2360 Posted April 6, 2006 Share Posted April 6, 2006 (edited) Here is a simple way to get the variable name. Needs to be uncompiled. Global $test $result = _GetVarName($test, @ScriptLineNumber) MsgBox(0, '', $result) Func _GetVarName($var, $linenumber) If Not @Compiled Then $line = FileReadLine(@ScriptFullPath, $linenumber) $regex = StringRegExpReplace($line, '.*(_GetVarName.)', '') $regex = StringRegExpReplace($regex, ', @ScriptLineNumber.*', '') Return $regex EndIf EndFunc though, to make use of it, then you are preseting the function call literally. But if you call it twice on one line it gets the second one twice, which is why I used vars to mark how many times it has been called per line. Edited April 6, 2006 by gamerman2360 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