Cooler Posted August 23, 2019 Share Posted August 23, 2019 Hi, Here am trying to assign the mouse position to an dynamic array. Am getting error as [ Array variable has incorrect number of subscripts or subscript dimension range exceeded.: ] don't know where I missed. Suggestion..! Error: "C:\Desktop\array.au3" : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $posarya[0] = $currXPos ^ ERROR >Exit code: 1 Time: 12.05 $currXPos = 20 $currYPos = 30 ; Create blank array Global $posarya[UBound($i)] Global $posaryb[UBound($j)] $i =0 $j =0 For $i = 0 to 4 ;Ubound($Data)-1 MouseMove($currXPos,$currYPos) $posarya[$i] = $currXPos $posaryb[$j] = $currYPos $currXPos = ($currXPos+10) $currYPos = ($currYPos+10) Next Link to comment Share on other sites More sharing options...
spudw2k Posted August 23, 2019 Share Posted August 23, 2019 So, I assume there is code above the $posarya and b declarations not shown in what you posted... Are $i and $j valid arrays with at least 1 element before you zero them? Cooler 1 Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
KickStarter15 Posted August 23, 2019 Share Posted August 23, 2019 @Cooler, It's either the declared variable is beyond the maximum declared of "$posarya[0] = $currXPos". Cooler 1 Programming is "To make it so simple that there are obviously no deficiencies" or "To make it so complicated that there are no obvious deficiencies" by C.A.R. Hoare. 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