Jump to content
Sign in to follow this  
T0M50N

See all variables used and their values.

Recommended Posts

T0M50N

Is there any code I can put into my script which displays all variables and their values in order of declaration?

For example:

$var1 = 5

$var2 = 3

$var3 = $var1 + $var2

Would give you:

$var1 = 5

$var2 = 3

$var3 = 8

Just thought it would be a time saver.

Edited by T0M50N

Share this post


Link to post
Share on other sites
NewPlaza

I don't think you can automatically.  I suppose you could call a function

Local $var = 1
_DisplayVars("$var", $var)

Local $var2 = 55
_DisplayVars("$var2", $var2)

Local $var3 = 125
_DisplayVars("$var3", $var3)


Func _DisplayVars($Variable, $Value)
    ConsoleWrite($Variable & " = " & $Value & @LF)
EndFunc

EVERY time you declare and assign.

or

Local $var = 1
ConsoleWrite("$var = " & $var & @LF)

Local $var2 = 55
ConsoleWrite("$var2 = " & $var2 & @LF)

Local $var3 = 125
ConsoleWrite("$var3 = " & $var4 & @LF)
Edited by NewPlaza

Share this post


Link to post
Share on other sites
orbs

search for "AutoIt Debugger":

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×