here an example code:
if LocationData%Counter% <> StatusData%Counter%=1 else StatusData%Counter%=0 [color=red]MsgBox %StatusData%Counter%%[/color]
if LocationData%Counter% <> StatusData%Counter%=1 else StatusData%Counter%=0 [color=red]MsgBox %StatusData%Counter%%[/color]
Loop, %NumberOfDataDrives% { DataDriveCounter+=1 Menu, ListMenu, Add, &Files from % LocationData%DataDriveCounter%, CommandList }
Loop, %NumberOfDataDrives% { DataDriveCounter+=1 Menu, ListMenu, Add, &Files from % LocationData . DataDriveCounter, CommandList }
Loop, %NumberOfDataDrives% { DataDriveCounter+=1 Menu, ListMenu, Add,% "&Files from " LocationData . DataDriveCounter, CommandList }
Menu, ListMenu, Add,% LocationData%DataDriveCounter%, CommandList
Loop, %NumberOfDataDrives% { DataDriveCounter+=1 DriveNumberForListCommand=%DataDriveCounter% MsgBox, % LocationData%DataDriveCounter% temp=% LocationData%DataDriveCounter% Menu, ListMenu, Add, Data %DataDriveCounter% : %temp%, CommandList }
Loop, %NumberOfDataDrives% { DataDriveCounter+=1 Menu, ListMenu, Add,% "&Files from " LocationData%DataDriveCounter%, CommandList }
global ReadingStatusDrive%DriveLetter%
If you explain what you're tying to do, there is almost certainly a workaround....it is not currently possible to declare a dynamic variable such as global Array%i%.
Within a function, any dynamic variable reference such as Array%i% always resolves to a local variable unless no variable of that name exists, in which case a global is used if it exists. If neither exists and the usage requires the variable to be created, it is created as a local variable unless the assume-global mode is in effect.
Source: Functions
GGV(var){ ;GetGlobalVar global local __TEMP __TEMP:=%var% Return __TEMP } SGV(var,value=""){ ;SetGlobalVar global %var%:=value Return }