Flickblue Posted September 26, 2022 Posted September 26, 2022 Hello, The script run 4 times and I´m getting this error. How can I fix it for it running correctly? Local $arr[4] ; Make room for three elements ;Assign some data $arr[0] = example1 $arr[1] = example2 $arr[2] = example3 $arr[3] = example4 Local $arr1[4] ; Make room for three elements ;Assign some data $arr1[0] = example1 $arr1[1] = "example2 $arr1[2] = example3 $arr1[3] = example4 For $d = 0 To 4 Step 1 MouseClick($MOUSE_CLICK_LEFT, 1196, 53, 1) ClipPut ("google.com") sleep(500) Send("^v") sleep(500) Send("{ENTER}") Sleep(5000) MouseClick($MOUSE_CLICK_LEFT, 1886, 110, 1) sleep(2000) MouseClick($MOUSE_CLICK_LEFT, 1722, 470, 1) sleep(2000) MouseClick($MOUSE_CLICK_LEFT, 1886, 110, 1) sleep(2000) MouseClick($MOUSE_CLICK_LEFT, 930, 613, 1) sleep(2000) MouseClick($MOUSE_CLICK_LEFT, 1063, 540, 1) sleep(2000) MouseClick($MOUSE_CLICK_LEFT, 1018, 657, 1) sleep(500) ClipPut ($arr[$d]) sleep(500) Send("^a") sleep(500) Send("^v") sleep(500) Send("{ENTER}") sleep(500) Send("{ENTER}") sleep(500) ClipPut ($arr1[$d]) sleep(1000) Send("^v") sleep(1000) Send("{ENTER}") sleep(5000) Next
Musashi Posted September 26, 2022 Posted September 26, 2022 (edited) 26 minutes ago, Flickblue said: For $d = 0 To 4 Step 1 This should be 0 To 3 Edit : @Subz was quicker Edit2 : This does not look correct either : $arr1[0] = example1 $arr1[1] = "example2 If the elements of your array are strings, then they would have to be enclosed in quotes. If they are variables, they should start with $. If they are return values of functions, then -> function name and round brackets. Edited September 26, 2022 by Musashi "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."
Flickblue Posted October 1, 2022 Author Posted October 1, 2022 Hello, Thanks for the reply. The error was solved. After it run 0 to 4 it stop the script. Is there a possible way the script run endlessly?
Moderators Melba23 Posted October 1, 2022 Moderators Posted October 1, 2022 Flickblue, This is exactly the same script as you posted in your other (now locked) thread. Post it again and you will be removed from the community. 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
Recommended Posts