Jump to content

syntax of variables


Recommended Posts

I'm not a programmer and a child understands better english then I. But I want to learn both. To easier read your scripts I want to know how to generally name variables.

I think you use ...

...$oXXXX -> for object variables and

...$hXXXX -> for handles variables.

Please would you explain if this is right and how is the naming for other variables?

Link to comment
Share on other sites

When i create a script with much variables then i do it this way

$Button_Green ...
$Button_Blue..
$Label_xxx
$Object_shell
$Handle_xxx

and so on.

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Link to comment
Share on other sites

You can name a variable anything you want. You could name a string $notastring and it really wouldnt matter. There is no set syntax. Some people just like to use things like $a_Array or $s_String so that its easier to read and remember.

Link to comment
Share on other sites

  • Moderators

There are some variable names you can't use... look at $CmdLine and $CmdLineRaw... those are preset variable names with a purpose.

That's a good link plato offered there, I do try to follow the standard, but find myself sometimes off in left field.

Edited by SmOke_N

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...