Jump to content
Tuts 4 You

How to declare not declared variables?


Recommended Posts


so does someone know how to auto declare not declared variables?

So I wrote a long script now and have tons of lines with many used variables where I don't have declare all of them with var before and now I am looking for a automatic way to log all not declared used variables etc you know what I mean?Or something like this....

var test1

mov test1, test2

cmp test3, test1

...here I have just declare test1 and the other 2 not.So now I need a way or tool which can mark all declared variables and found commands in the txt file.So I mean in that case above the tool should mark all test1 now so that I now can scroll the text and check all used variables which are not marked so that I know aha this I have to declare with var.So I checked already the Notepad++ tool but I get it not so working like I want it etc.So do you know a solution for this without to check all manually?Maybe you have a idea how to use the Notepad++ with this or you know a other tool or something so would be nice if you could help me with this again.Thank you.


Link to comment
Share on other sites


I am one of thousands of persons that

admired your Scripts

Settings For Notepad++


Make sure that you have the plugin


To Test it Delete Variable


Search and down your going to have all the Commands

The trick is you see the name (var xxxx) then is already declared

bye and thanks you

  • Like 1
Link to comment
Share on other sites

Hi delldell,

thanks for the answer but I mean how to do it in automatic style?So i don't want to enter each variable manually to check then whether it is already declared with var or not you know?

I looking for a way where I can enter maybe just "var" and then the plugin etc should check the whole script for all var xy commands then it should take the xy name after var "xy" and should search the whole script each line for this xy command and if it was found then it should mark it in any color and now I can scroll the script and check all lines which are not marked whether there is a variable and if yes then its a variable which is not declared so that I then know aha this I have to declare now with var etc.Something like this you know.Some automatic way.Do you maybe know a another method for this to use the Notepad++ tool?So I dont know the functions of this tool so I use it very rarly.


Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

an opcode matching script on an assembly dump shouldn't be too hard pushing declares and checking op usages against them, I've never looked into notepad++ macros though except one I did for generating html templates. You could do a tool for this in PureBasic inside an hour probably.

Link to comment
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
  • Create New...