Jump to content

Recommended Posts

Posted

 

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

error array.png

Posted (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 by Musashi

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

  • Moderators
Posted

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...