psychopyro212 Posted March 14, 2012 Share Posted March 14, 2012 Ok so what im trying to do is: oooooooooooo oooooooooooo oooooxoooooo oooooooooooo when i hit a directional key to move the "x" in a given direction what i have is: expandcollapse popup#include <inidir.au3> Global $x = 1 Global $y = 0 Global $sleep = 100 Global $processed IniWrite($dir, "Vars", "varx", $x) IniWrite($dir, "Vars", "vary", $y) HotKeySet("{down}", "down") HotKeySet("{up}", "up") HotKeySet("{left}", "left") HotKeySet("{right}", "right") While 1 Sleep($sleep) processed() iniw() WEnd Func Iniw() IniWrite($dir, "Vars", "varx", $x) IniWrite($dir, "Vars", "vary", $y) EndFunc ;==>Iniw Func processed() $processed = IniRead($dir, "Process", "Input", "") EndFunc ;==>processed Func down() If $processed = 1 Then $x = Int($x + 1) If $x = 5 Then $x = 4 Else EndIf EndIf IniWrite($dir, "Process", "Input", "0") EndFunc ;==>down Func up() If $processed = 1 Then $x = Int($x - 1) If $x = 0 Then $x = 1 Else EndIf EndIf IniWrite($dir, "Process", "Input", "0") EndFunc ;==>up Func right() If $processed = 1 Then $y = Int($y + 1) If $y = 97 Then $y = 96 Else EndIf EndIf IniWrite($dir, "Process", "Input", "0") EndFunc ;==>right Func left() If $processed = 1 Then $y = Int($y - 1) If $y = -1 Then $y = 0 Else EndIf EndIf IniWrite($dir, "Process", "Input", "0") EndFunc ;==>left To capture the inputs from the directional keys and expandcollapse popup#include <graphinputvars.au3> #include <grapharrayvars.au3> #include <inidir.au3> Run("keyinputf.au3", "C:\Documents and Settings\Administrator\Desktop\Projects\Tmc Log") While 1 Sleep(100) savevars() getstate() Varchangey() varchangex() WEnd Func savevars() Global $yinputold = $varyinput Global $xinputold = $varxinput EndFunc ;==>savevars Func getstate() Global $varxinput = IniRead($dir, "vars", "varx", "") Global $varyinput = IniRead($dir, "vars", "vary", "") EndFunc ;==>getstate Func Varchangey() If $varyinput > $yinputold Then MsgBox("", "", "New y var went up") ElseIf $varyinput < $yinputold Then MsgBox("", "", "New y var went down") Else EndIf IniWrite($dir, "Process", "Input", "1") EndFunc ;==>Varchangey Func Varchangex() If $varxinput > $xinputold Then MsgBox("", "", "New x var went up") ElseIf $varxinput < $xinputold Then MsgBox("", "", "New x var went down") Else EndIf IniWrite($dir, "process", "Input", "1") EndFunc ;==>Varchangex to determine if the keys i pressed more the x or y axis up or down. Im trying to make this 4x96 and i havnt a clue now that would work i do know that i need a variable for each posistion i plan to use so i made: expandcollapse popupGlobal $a0 = 0 Global $a1 = 0 Global $a2 = 0 Global $a3 = 0 Global $a4 = 0 Global $a5 = 0 Global $a6 = 0 Global $a7 = 0 Global $a8 = 0 Global $a9 = 0 Global $a10 = 0 Global $a11 = 0 Global $a12 = 0 Global $a13 = 0 Global $a14 = 0 Global $a15 = 0 Global $a16 = 0 Global $a17 = 0 Global $a18 = 0 Global $a19 = 0 Global $a20 = 0 Global $a21 = 0 Global $a22 = 0 Global $a23 = 0 Global $a24 = 0 Global $a25 = 0 Global $a26 = 0 Global $a27 = 0 Global $a28 = 0 Global $a29 = 0 Global $a30 = 0 Global $a31 = 0 Global $a32 = 0 Global $a33 = 0 Global $a34 = 0 Global $a35 = 0 Global $a36 = 0 Global $a37 = 0 Global $a38 = 0 Global $a39 = 0 Global $a40 = 0 Global $a41 = 0 Global $a42 = 0 Global $a43 = 0 Global $a44 = 0 Global $a45 = 0 Global $a46 = 0 Global $a47 = 0 Global $a48 = 0 Global $a49 = 0 Global $a50 = 0 Global $a51 = 0 Global $a52 = 0 Global $a53 = 0 Global $a54 = 0 Global $a55 = 0 Global $a56 = 0 Global $a57 = 0 Global $a58 = 0 Global $a59 = 0 Global $a60 = 0 Global $a61 = 0 Global $a62 = 0 Global $a63 = 0 Global $a64 = 0 Global $a65 = 0 Global $a66 = 0 Global $a67 = 0 Global $a68 = 0 Global $a69 = 0 Global $a70 = 0 Global $a71 = 0 Global $a72 = 0 Global $a73 = 0 Global $a74 = 0 Global $a75 = 0 Global $a76 = 0 Global $a77 = 0 Global $a78 = 0 Global $a79 = 0 Global $a80 = 0 Global $a81 = 0 Global $a82 = 0 Global $a83 = 0 Global $a84 = 0 Global $a85 = 0 Global $a86 = 0 Global $a87 = 0 Global $a88 = 0 Global $a89 = 0 Global $a90 = 0 Global $a91 = 0 Global $a92 = 0 Global $a93 = 0 Global $a94 = 0 Global $a95 = 0 Global $a96 = 0 Global $b0 = 0 Global $b1 = 0 Global $b2 = 0 Global $b3 = 0 Global $b4 = 0 Global $b5 = 0 Global $b6 = 0 Global $b7 = 0 Global $b8 = 0 Global $b9 = 0 Global $b10 = 0 Global $b11 = 0 Global $b12 = 0 Global $b13 = 0 Global $b14 = 0 Global $b15 = 0 Global $b16 = 0 Global $b17 = 0 Global $b18 = 0 Global $b19 = 0 Global $b20 = 0 Global $b21 = 0 Global $b22 = 0 Global $b23 = 0 Global $b24 = 0 Global $b25 = 0 Global $b26 = 0 Global $b27 = 0 Global $b28 = 0 Global $b29 = 0 Global $b30 = 0 Global $b31 = 0 Global $b32 = 0 Global $b33 = 0 Global $b34 = 0 Global $b35 = 0 Global $b36 = 0 Global $b37 = 0 Global $b38 = 0 Global $b39 = 0 Global $b40 = 0 Global $b41 = 0 Global $b42 = 0 Global $b43 = 0 Global $b44 = 0 Global $b45 = 0 Global $b46 = 0 Global $b47 = 0 Global $b48 = 0 Global $b49 = 0 Global $b50 = 0 Global $b51 = 0 Global $b52 = 0 Global $b53 = 0 Global $b54 = 0 Global $b55 = 0 Global $b56 = 0 Global $b57 = 0 Global $b58 = 0 Global $b59 = 0 Global $b60 = 0 Global $b61 = 0 Global $b62 = 0 Global $b63 = 0 Global $b64 = 0 Global $b65 = 0 Global $b66 = 0 Global $b67 = 0 Global $b68 = 0 Global $b69 = 0 Global $b70 = 0 Global $b71 = 0 Global $b72 = 0 Global $b73 = 0 Global $b74 = 0 Global $b75 = 0 Global $b76 = 0 Global $b77 = 0 Global $b78 = 0 Global $b79 = 0 Global $b80 = 0 Global $b81 = 0 Global $b82 = 0 Global $b83 = 0 Global $b84 = 0 Global $b85 = 0 Global $b86 = 0 Global $b87 = 0 Global $b88 = 0 Global $b89 = 0 Global $b90 = 0 Global $b91 = 0 Global $b92 = 0 Global $b93 = 0 Global $b94 = 0 Global $b95 = 0 Global $b96 = 0 Global $c0 = 0 Global $c1 = 0 Global $c2 = 0 Global $c3 = 0 Global $c4 = 0 Global $c5 = 0 Global $c6 = 0 Global $c7 = 0 Global $c8 = 0 Global $c9 = 0 Global $c10 = 0 Global $c11 = 0 Global $c12 = 0 Global $c13 = 0 Global $c14 = 0 Global $c15 = 0 Global $c16 = 0 Global $c17 = 0 Global $c18 = 0 Global $c19 = 0 Global $c20 = 0 Global $c21 = 0 Global $c22 = 0 Global $c23 = 0 Global $c24 = 0 Global $c25 = 0 Global $c26 = 0 Global $c27 = 0 Global $c28 = 0 Global $c29 = 0 Global $c30 = 0 Global $c31 = 0 Global $c32 = 0 Global $c33 = 0 Global $c34 = 0 Global $c35 = 0 Global $c36 = 0 Global $c37 = 0 Global $c38 = 0 Global $c39 = 0 Global $c40 = 0 Global $c41 = 0 Global $c42 = 0 Global $c43 = 0 Global $c44 = 0 Global $c45 = 0 Global $c46 = 0 Global $c47 = 0 Global $c48 = 0 Global $c49 = 0 Global $c50 = 0 Global $c51 = 0 Global $c52 = 0 Global $c53 = 0 Global $c54 = 0 Global $c55 = 0 Global $c56 = 0 Global $c57 = 0 Global $c58 = 0 Global $c59 = 0 Global $c60 = 0 Global $c61 = 0 Global $c62 = 0 Global $c63 = 0 Global $c64 = 0 Global $c65 = 0 Global $c66 = 0 Global $c67 = 0 Global $c68 = 0 Global $c69 = 0 Global $c70 = 0 Global $c71 = 0 Global $c72 = 0 Global $c73 = 0 Global $c74 = 0 Global $c75 = 0 Global $c76 = 0 Global $c77 = 0 Global $c78 = 0 Global $c79 = 0 Global $c80 = 0 Global $c81 = 0 Global $c82 = 0 Global $c83 = 0 Global $c84 = 0 Global $c85 = 0 Global $c86 = 0 Global $c87 = 0 Global $c88 = 0 Global $c89 = 0 Global $c90 = 0 Global $c91 = 0 Global $c92 = 0 Global $c93 = 0 Global $c94 = 0 Global $c95 = 0 Global $c96 = 0 Global $d0 = 0 Global $d1 = 0 Global $d2 = 0 Global $d3 = 0 Global $d4 = 0 Global $d5 = 0 Global $d6 = 0 Global $d7 = 0 Global $d8 = 0 Global $d9 = 0 Global $d10 = 0 Global $d11 = 0 Global $d12 = 0 Global $d13 = 0 Global $d14 = 0 Global $d15 = 0 Global $d16 = 0 Global $d17 = 0 Global $d18 = 0 Global $d19 = 0 Global $d20 = 0 Global $d21 = 0 Global $d22 = 0 Global $d23 = 0 Global $d24 = 0 Global $d25 = 0 Global $d26 = 0 Global $d27 = 0 Global $d28 = 0 Global $d29 = 0 Global $d30 = 0 Global $d31 = 0 Global $d32 = 0 Global $d33 = 0 Global $d34 = 0 Global $d35 = 0 Global $d36 = 0 Global $d37 = 0 Global $d38 = 0 Global $d39 = 0 Global $d40 = 0 Global $d41 = 0 Global $d42 = 0 Global $d43 = 0 Global $d44 = 0 Global $d45 = 0 Global $d46 = 0 Global $d47 = 0 Global $d48 = 0 Global $d49 = 0 Global $d50 = 0 Global $d51 = 0 Global $d52 = 0 Global $d53 = 0 Global $d54 = 0 Global $d55 = 0 Global $d56 = 0 Global $d57 = 0 Global $d58 = 0 Global $d59 = 0 Global $d60 = 0 Global $d61 = 0 Global $d62 = 0 Global $d63 = 0 Global $d64 = 0 Global $d65 = 0 Global $d66 = 0 Global $d67 = 0 Global $d68 = 0 Global $d69 = 0 Global $d70 = 0 Global $d71 = 0 Global $d72 = 0 Global $d73 = 0 Global $d74 = 0 Global $d75 = 0 Global $d76 = 0 Global $d77 = 0 Global $d78 = 0 Global $d79 = 0 Global $d80 = 0 Global $d81 = 0 Global $d82 = 0 Global $d83 = 0 Global $d84 = 0 Global $d85 = 0 Global $d86 = 0 Global $d87 = 0 Global $d88 = 0 Global $d89 = 0 Global $d90 = 0 Global $d91 = 0 Global $d92 = 0 Global $d93 = 0 Global $d94 = 0 Global $d95 = 0 Global $d96 = 0 So again a pointer in the right direction would be more then helpful! Link to comment Share on other sites More sharing options...
water Posted March 14, 2012 Share Posted March 14, 2012 Don't setup 96 variables. Use an array with 96 elements. Global $aiPositions[96] My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
psychopyro212 Posted March 14, 2012 Author Share Posted March 14, 2012 so i would need 4 arrays with 96 elements? one for each row? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 14, 2012 Moderators Share Posted March 14, 2012 psychopyro212, Does this give you an idea of how you might do it? expandcollapse popup#include <GUIConstantsEx.au3> ; Declare and initialise board Global $aBoard[15][10] For $i = 0 To UBound($aBoard) - 1 For $j = 0 To UBound($aBoard, 2) - 1 $aBoard[$i][$j] = "o" Next Next ; Set initial position Global $iX = 5, $iY = 5 $aBoard[$iY][$iX] = "X" ; Create GUI $hGUI = GUICreate("Test", 500, 500) $cLabel = GUICtrlCreateLabel("", 10, 10, 200, 200) $cButton_1 = GUICtrlCreateButton("Up", 210, 300, 80, 30) $cButton_2 = GUICtrlCreateButton("Left", 130, 350, 80, 30) $cButton_3 = GUICtrlCreateButton("Right", 290, 350, 80, 30) $cButton_4 = GUICtrlCreateButton("Down", 210, 400, 80, 30) GUISetState() _Redraw() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cButton_1 $aBoard[$iY][$iX] = "o" $iY -= 1 If $iY < 0 Then $iY = 0 EndIf _Redraw() Case $cButton_2 $aBoard[$iY][$iX] = "o" $iX -= 1 If $iX < 0 Then $iX = 0 EndIf _Redraw() Case $cButton_3 $aBoard[$iY][$iX] = "o" $iX += 1 If $iX > UBound($aBoard, 2) - 1 Then $iX = UBound($aBoard, 2) - 1 EndIf _Redraw() Case $cButton_4 $aBoard[$iY][$iX] = "o" $iY += 1 If $iY > UBound($aBoard) - 1 Then $iY = UBound($aBoard) - 1 EndIf _Redraw() EndSwitch WEnd Func _Redraw() $aBoard[$iY][$iX] = "X" $sBoard = "" For $i = 0 To UBound($aBoard) - 1 For $j = 0 To UBound($aBoard, 2) - 1 $sBoard &= $aBoard[$i][$j] & " " Next $sBoard &= @CRLF Next GUICtrlSetData($cLabel, $sBoard) EndFunc Please ask if anything is unclear. 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...
psychopyro212 Posted March 14, 2012 Author Share Posted March 14, 2012 now how would this work? if $xup = 1 Then $ciposition[$arrayvalue] = 0 $arrayvalue = $arrayvalue +1 $ciposition[$arrayvalue] = 1 EndIf to move to the right how would i put a variable in the array? Link to comment Share on other sites More sharing options...
psychopyro212 Posted March 14, 2012 Author Share Posted March 14, 2012 (edited) Now i feel like a total newb because ive seen you sitting in the topic for a few minutes and i get the feeling that you just wrote that script for this.... edIt: yes this gives me a good idea thank you! Edited March 14, 2012 by psychopyro212 Link to comment Share on other sites More sharing options...
water Posted March 14, 2012 Share Posted March 14, 2012 (edited) I haven't read the complete code.Could you please describe in short what you want to do with this code?I assume you want to move the "x" up, down, left, right and save the position when the program ends so when called again starts at the last position.What's the use of this? Is it something like a game?Too slow Edited March 14, 2012 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
psychopyro212 Posted March 14, 2012 Author Share Posted March 14, 2012 (edited) no the x was just for a visual its going to be used to fill out a truckers logbook each position is going to be assigned a location on a picture and im going to use gdiplus to "connect" the dots. and no the location needs to start all the way on the left on line 1 every time i run this Edited March 14, 2012 by psychopyro212 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 14, 2012 Moderators Share Posted March 14, 2012 psychopyro212,Now i feel like a total newb because ive seen you sitting in the topic for a few minutes and i get the feeling that you just wrote that script for thisYour feeling was quite correct. But do not let it worry you - I enjoy a little challenge like that. 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...
psychopyro212 Posted March 14, 2012 Author Share Posted March 14, 2012 heres a question for you if i were to turn the array into a 3 dimensional array like so adpos[$x][$y][$value] how would i modify just x and y without changeing $value? if i can do this i can just store the coord's directly into the array. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 14, 2012 Moderators Share Posted March 14, 2012 psychopyro212, Sorry, I do not understand the question. Save what coords into what array? What is the 3rd dimension representing? 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...
psychopyro212 Posted March 14, 2012 Author Share Posted March 14, 2012 (edited) basically what im trying to do is use this array to draw lines on a graph the third deminsion represents the coordinates on the graph so lets say that $x = 4 $y = 53 $coords = "800,900" ;----(ill string split this later) $array[$x][$y][$coords] so that array[$x][$y][$coords] is = $array [4][53]["800,900"] so i can plot on my graph but what im asking is you used $aBoard[$iY][$iX] i want to add [$coords] how would i use $aBoard[$iY][$iX] = "o" without destroying whats in $coords Edited March 14, 2012 by psychopyro212 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 14, 2012 Moderators Share Posted March 14, 2012 psychopyro212, I understand now, but an explanation will have to wait until tomorrow. 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...
psychopyro212 Posted March 14, 2012 Author Share Posted March 14, 2012 Understood and thank you for your time! Link to comment Share on other sites More sharing options...
psychopyro212 Posted March 15, 2012 Author Share Posted March 15, 2012 (edited) And looking at your code i noticed $iY -= 1 which i assume is the same as $y=Int($y- 1)?and i found a pic of what im trying to use this code to draw the horizontal and vertical lines on this Edited March 15, 2012 by psychopyro212 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 15, 2012 Moderators Share Posted March 15, 2012 psychopyro212,All you need to do is to declare the array with 3 dimensions - the third dimension having 2 elements - like this:Global $aBoard[15][10][2]Now you can use $aBoard[$iY][$iX][0] to hold the "o" and "X" characters as before and $aBoard[$iY][$iX][1] to hold the coordinate for each point (e.g. "800,900").You will have to write some code to initialise the [1] elements, but as you say these refer to graph coordinates, I imagine this can be done quite simply in a loop with a bit of simple maths.Please ask if you need any more explanation - or help in the initialisation process. 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...
Blue_Drache Posted March 15, 2012 Share Posted March 15, 2012 As a humorous aside... I'd usually Begin at the Beguine. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache 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