Jump to content

bnshrdr

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by bnshrdr

  1. Hah, i guess I didn't notice everything when I translated this over. Thanks.
  2. @M23 Thanks for the help, it has cleared up that error, but it is still hiccuping on this line MouseClick("left", $Spot[$i][0], $Spot1[$i][1], 1, 0) $Spot1[$i][1] is causing : Variable used without being declared I read through that and without reading for about 20 minutes I could not find an example similar to mine. I still don't know why this wouldn't work: Global $myArr[8][2] Func MyFunc() For $i = 0 to 7 Step 1 myArr[$i] = MouseGetPos(); This returns an array with 2 elements Next EndFunc
  3. I've tried declaring $Spot like this too: Global $Spot[8][2] But that throws up a different error. To me its not blatantly obvious in this language how to declare, allocate and use multidimensional arrays.
  4. About 10 years ago I used to program in BASIC-type languages but I have forgotten most of it since I have mostly moved onto C/C++. I'm sure this is some type of syntax error but to me the logic seems at least mostly correct. Here is the code that is producing the error "Array variable subscript badly formatted". The foul is on the line that says: MouseClick("left", $Spot[$i][0], $Spot1[$i][1], 1, 0) Global $Spot[8] GetCoords() Func GetCoords() Local $i For $i = 0 to 7 Step 1 While Not _IsPressed(71) ToolTip("Please hover over the position and hit [F2]!", 0, 0, $Title) $Spot[$i] = MouseGetPos() WEnd Sleep(500) Next StartTasks() EndFunc Func StartTasks() ToolTip("Program Running, press [End] to terminate", 0, 0, $Title) Local $i For $i = 0 to 7 Step 1 While $toggle = 0 MouseClick("left", $Spot[$i][0], $Spot1[$i][1], 1, 0) Opt("MouseClickDownDelay", 200) Sleep(2000) $toggle = 1 MouseClick("left", 308, 875, 1, 0) Opt("MouseClickDownDelay", 200) Sleep(2000) WEnd $toggle = 0 Next Any help will be greatly appreciated!
×
×
  • Create New...