Sign in to follow this  
Followers 0
Roofel

Global/Local/Dim?

10 posts in this topic

Hello:) Im kinda new to AutoIt and i cant find out what the benefits of using Global values and such:S

When to use it and for what?^^,

Also, anyone know the "style" on how to have a window appear ontop at all times? Just like the TaskManager that is built-in inside the Windows core:)


Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Global means that anywhere in the script...a function or case can use that...if its Local...then only that functions/case can use it...and Dim...and not exactly sure...Im still learning too :)

EDIT: didnt you just ask that question how to set it on top..? In a few topics ago...my answer works...put in the loop WinSetOnTop($gui)

Edited by Swift

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hmm, might be:S cant see it though but ill check it out:)

Somehow i couldnt see others replys only my own:P

Edit: Yep it worked<3 But i still cant find that "TRAY_EVENT_PRIMARY_DOUBLE" variable in any Includes at all:S

Edited by Roofel

Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D

Share this post


Link to post
Share on other sites

i think dim refers to a variable that is constantly changing. each time you use it again in the script, the new value is given. so if you were to add 1 to a dim variable, the new variable would be used. Global is a nonchanging variable usually?

Share this post


Link to post
Share on other sites

Yep...you cant change a global variable if im not mistaken!

Share this post


Link to post
Share on other sites

Anyone know the hex number when a window is doubleclicked?:)


Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D

Share this post


Link to post
Share on other sites

Yep...you cant change a global variable if im not mistaken!

I am amazed that none of you in this thread bothered to read the helpfile! :):):)

Dim = Local scope if the variable name doesn't already exist globally (in which case it reuses the global variable!)

Global = Forces creation of the variable in the Global scope

Local = Forces creation of the variable in the Local/Function scope

const [optional] If present, the Const keyword creates a constant rather than a variable.

Share this post


Link to post
Share on other sites

I looked up Global in the Helpfile and it didnt say anything about that:P


Never argue with an idiot, he will just bring you down to his own level and beat you with experience! :D

Share this post


Link to post
Share on other sites

Hmm, might be:S cant see it though but ill check it out:)

Somehow i couldnt see others replys only my own:P

Edit: Yep it worked<3 But i still cant find that "TRAY_EVENT_PRIMARY_DOUBLE" variable in any Includes at all:S

Because "Tray_Event_primary_Double" doen't exist. However

Global Const $TRAY_EVENT_PRIMARYDOUBLE = -13


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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  
Followers 0