pcjunki Posted January 14, 2015 Share Posted January 14, 2015 I'm redesigning one of my gui's , it has allot of buttons I took a hard look, and saw that I have duplicate code that sets fonts and what not I'd like to create a global variable, or would it be a function? I'm trying to set properties for the cursor, font, and resizing of the gui button btw, this is my first time using global variables, but I have an idea of what they are $Form1 = GUICreate("PC TOOLS V2", 1001, 724, 147, 131, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP, $WS_HSCROLL, $WS_VSCROLL)) $Tab1 = GUICtrlCreateTab(8, 8, 1257, 985) Global $cursor = "GUICtrlSetCursor(-1, 0)" Global $font = "GGUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")" Global $resize = "GUICtrlSetResizing ( -1, 1)" $TabSheet1 = GUICtrlCreateTabItem("WOL") $Button1 = GUICtrlCreateButton("1stFloor", 24, 56, 179, 153) $cursor $font $resize GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
guinness Posted January 14, 2015 Share Posted January 14, 2015 All that code can be in a function and the variables declared as Local. I would also recommend using ExitLoop and then GUIDelete() at the end to tidy resources (even though AutoIt does this for you automagically!) UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
MikahS Posted January 14, 2015 Share Posted January 14, 2015 (edited) I'm feeling generous #include <GUIConstants.au3> Global $Form1, $Tab1, $Button1 GUI() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $Button1 ; do something here EndSwitch WEnd Func GUI() $Form1 = GUICreate("PC TOOLS V2", 1001, 724, 147, 131, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP, $WS_HSCROLL, $WS_VSCROLL)) $Tab1 = GUICtrlCreateTab(8, 8, 1257, 985) Local $TabSheet1 = GUICtrlCreateTabItem("WOL") $Button1 = GUICtrlCreateButton("1stFloor", 24, 56, 179, 153) Local $cursor = GUICtrlSetCursor(-1, 0) Local $font = GUICtrlSetFont($Button1, 14, 400, 0, "MS Sans Serif") Local $resize = GUICtrlSetResizing($Button1, 1) EndFunc Something like this? EDIT: The difference between local and global.. Local: means that it will only be in the scope of the script, if declared outside of a function, or if declared in a function can only be used in that function. Global: Once declared can be used anywhere that is linked to that particular script that it has been declared by. If declared again in another script or function, the original will be overwritten. Edited January 14, 2015 by MikahS Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
pcjunki Posted January 14, 2015 Author Share Posted January 14, 2015 is this the start down the right path? ;~ global variable settings for gui buttons Func buttonsettings() Global $cursor = "GUICtrlSetCursor(-1, 0)" Global $font = "GGUICtrlSetFont(-1, 14, 400, 0, 'MS Sans Serif')" Global $resize = "GUICtrlSetResizing ( -1, 1)" EndFunc Link to comment Share on other sites More sharing options...
kylomas Posted January 14, 2015 Share Posted January 14, 2015 pcjunki, I suppose you could do something like... expandcollapse popup; *** Start added by AutoIt3Wrapper *** #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ; *** End added by AutoIt3Wrapper *** #AutoIt3Wrapper_Add_Constants=n $Form1 = GUICreate("PC TOOLS V2", 1001, 724, 147, 131, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP, $WS_HSCROLL, $WS_VSCROLL)) $Tab1 = GUICtrlCreateTab(8, 8, 1257, 985) Global $cursor = "GUICtrlSetCursor(-1, 0)" Global $font = "GUICtrlSetFont(-1, 14, 400, 0, ""MS Sans Serif"")" Global $resize = "GUICtrlSetResizing ( -1, 1)" $TabSheet1 = GUICtrlCreateTabItem("WOL") $Button1 = GUICtrlCreateButton("1stFloor", 24, 56, 179, 153) execute($cursor) execute($font) execute($resize) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd but it is not saving alot and is far less readable. kylomas pcjunki 1 Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
pcjunki Posted January 14, 2015 Author Share Posted January 14, 2015 kylomas that's exactly what I was looking for! didn't know about the "Execute" now if I want to change font size or what ever, I can just do it in one place Link to comment Share on other sites More sharing options...
kylomas Posted January 14, 2015 Share Posted January 14, 2015 Beware, your syntax better be dead nuts...you have a typo in the OP... Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
pcjunki Posted January 14, 2015 Author Share Posted January 14, 2015 just found it, double g's Link to comment Share on other sites More sharing options...
JohnOne Posted January 14, 2015 Share Posted January 14, 2015 (edited) I code like this sometimes, when I'm bored. Global $hGui = _Gui() Global $ahButtons = _Buttons() GUISetState() While 3 _MsgHandler(GUIGetMsg()) WEnd Func _MsgHandler($msg) Switch $msg Case -3 Exit Case $ahButtons[0] MsgBox(0, 0, "B1") Case $ahButtons[1] MsgBox(0, 0, "B2") EndSwitch EndFunc Func _Gui() Return GUICreate("GUI", 200, 200) EndFunc ;==>_Gui Func _Buttons() Local $aB[2] = [GUICtrlCreateButton("B1", 10, 10), GUICtrlCreateButton("B2", 40, 10)] Return $aB EndFunc ;==>_Buttons Edited January 15, 2015 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
BrewManNH Posted January 15, 2015 Share Posted January 15, 2015 Your definitions are incorrect in regards to AutoIt. The difference between local and global.. Local: means that it will only be in the scope of the script, if declared outside of a function, or if declared in a function can only be used in that function. Global: Once declared can be used anywhere that is linked to that particular script that it has been declared by. If declared again in another script or function, the original will be overwritten. Local when declared in a function, and not using the Static keyword: the variable can only be seen by the script as long as it is running inside that function. After that function ends or is "Return"ed from, that variable no longer exists and can't be accessed. Local when declared outside of a function, and Global: Can be seen everywhere in the script, inside functions and out. It exists as long as the script runs. Variable names are not shared between running scripts. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Guest Posted January 15, 2015 Share Posted January 15, 2015 (edited) Local when declared in a function, and not using the Static keyword: the variable can only be seen by the script as long as it is running inside that function. After that function ends or is "Return"ed from, that variable no longer exists and can't be accessed. You can still change,Access, read, a local variable in a function from another function this way: Example() Func Example() Local $var = 1 ConsoleWrite($var&@CRLF) ; This will print $var as 1 (The variable has not changed) ChangeVar($var) ConsoleWrite($var&@CRLF) ; This will print $var as 2 (The variable was changed in ChangeVar()) EndFunc Func ChangeVar(ByRef $lVar) $lVar = 2 EndFunc I guess that this knowledge will be useful for you.Unfortunately I learned this only recently Edited January 15, 2015 by Guest Link to comment Share on other sites More sharing options...
MikahS Posted January 15, 2015 Share Posted January 15, 2015 Your definitions are incorrect in regards to AutoIt. Local when declared in a function, and not using the Static keyword: the variable can only be seen by the script as long as it is running inside that function. After that function ends or is "Return"ed from, that variable no longer exists and can't be accessed. Local when declared outside of a function, and Global: Can be seen everywhere in the script, inside functions and out. It exists as long as the script runs. Variable names are not shared between running scripts. You can still change,Access, read, a local variable in a function from another function this way: Example() Func Example() Local $var = 1 ConsoleWrite($var&@CRLF) ; This will print $var as 1 (The variable has not changed) ChangeVar($var) ConsoleWrite($var&@CRLF) ; This will print $var as 2 (The variable was changed in ChangeVar()) EndFunc Func ChangeVar(ByRef $lVar) $lVar = 2 EndFunc I guess that this knowledge will be useful for you.Unfortunately I learned this only recently Thank you both for correcting this for me, seems I needed it. Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 15, 2015 Moderators Share Posted January 15, 2015 MikahS,The Variables - using Global, Local and ByRef tutorial in the Wiki might be worth a look. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
MikahS Posted January 15, 2015 Share Posted January 15, 2015 (edited) The Variables - using Global, Local and ByRef tutorial in the Wiki might be worth a look. Just FYI that is a deleted page. EDIT: This is the page you mean Thank you by the way, M23. Edited January 15, 2015 by MikahS Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 15, 2015 Moderators Share Posted January 15, 2015 MikahS,Oops! I have amended the link in my autoposting utility. :blush:M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
MikahS Posted January 15, 2015 Share Posted January 15, 2015 MikahS, Oops! I have amended the link in my autoposting utility. :blush: M23 Glad to help, and thanks for yours. Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
guinness Posted January 15, 2015 Share Posted January 15, 2015 (edited) That whole Local in "Global" scope is a bug in my humble opinion, as functions should not be able to see it, due to it be local only to that scope. Then again I don't know why Var isn't used, because we tend not to declare Global variables inside functions (bad practice), thus it would force people to declare Global variables outside of functions, which is the only reason I can see for having Local and Global, to differentiate between when a variable in a function is actually Global and not the default Local. Edited January 15, 2015 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Guest Posted January 15, 2015 Share Posted January 15, 2015 Usually people create Global varibales to access them from other functions. What I suggested in #11 is a way to achieve the goal without creating global variable. So you're saving memory by reducing global variables and still achieve the goal. Of course, this is not always correct to use this method. But I think that in many cases this is the correct way Link to comment Share on other sites More sharing options...
guinness Posted January 15, 2015 Share Posted January 15, 2015 (edited) What I suggested in #11 is a way to achieve the goal without creating global variable.Yes, what you suggested is one approach, though I can think of a couple of more ways as well. Edited January 15, 2015 by guinness UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
czardas Posted January 15, 2015 Share Posted January 15, 2015 (edited) That whole Local in "Global" scope is a bug in my humble opinion, as functions should not be able to see it, due to it be local only to that scope. Surely this is similar to a hierarchical system with limited access to locals which are not elevated to global status. The design is by choice and doesn't seem to qualify as a bug in that sense. Saying 'local to the global scope' only makes sense if these variables share the same scope as all other variables declared globally regardless of syntax. ...My thoughts. Edited January 15, 2015 by czardas operator64 ArrayWorkshop 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