ruskiem Posted January 5, 2019 Share Posted January 5, 2019 #include <Array.au3> #include <MsgBoxConstants.au3> Global $i = 0 Global $lineX[5] ;_ArrayDisplay($lineX, "Array dissplay") Global $timerinit_lineX[5] While $i <= 4 ;MsgBox(0, "$i: ", $i, 0) Global $lineX[$i] = "comeon" & $i ;MsgBox(0, "$lineX[$i]", $lineX[$i], 0) Global $timerinit_lineX[$i] = timerinit() $i = $i + 1 sleep(1000) Wend _ArrayDisplay($lineX) ;_ArrayDisplay($timerinit_lineX) MsgBox($MB_SYSTEMMODAL, "Items 1-3", _ArrayToString($lineX, @TAB, 1, 3)) Hello, i want to add "text 0" to $lineX[0] "text 1" to $lineX[1] "text 2" to $lineX[2] "text 3" to $lineX[3] "text 4" to $lineX[4] he does not add, _arrayDisplay does not work what is wrong, please? Link to comment Share on other sites More sharing options...
Nine Posted January 5, 2019 Share Posted January 5, 2019 remove the global inside of loop ruskiem 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
ruskiem Posted January 5, 2019 Author Share Posted January 5, 2019 Goooooooood, i love You! Link to comment Share on other sites More sharing options...
Subz Posted January 5, 2019 Share Posted January 5, 2019 Would recommend using For/Next loop rather than While/Wend, example: #include <Array.au3> Global $aLinex[5] For $i = 0 To UBound($aLinex) - 1 $aLinex[$i] = "Item " & $i Next _ArrayDisplay($aLinex) MsgBox(4096, "Items 1-3", _ArrayToString($aLinex, @TAB, 1, 3)) Link to comment Share on other sites More sharing options...
Nine Posted January 5, 2019 Share Posted January 5, 2019 3 hours ago, ruskiem said: Goooooooood, i love You! I know I love me too ! JK “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy 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