Jump to content

Using Array For Collecting Data


vicev
 Share

Recommended Posts

Copies then inserts clipboard into an array for certain amount of times, defined by the user. Then sends array data.

I'm unsure on how this should be done. Obviously $i counts up every time it loops, so I thought this was enough. As the array position is changing each time.

Please can someone give me a hand with this. I can see a lot of talk about using Enum and Eval for "variable within variable" but I don't really wish to do this. I want to learn how to put data into array positions like this.

$i = 1  

$tags = InputBox("Tags", "How many tags in the list?", "", "", _
    100, 100, 500 , 500)

While $i <= $tags
    Send("{CTRLDOWN}")
    Sleep(50)
    Send("c")
    Sleep(50)
    Send("{CTRLUP}")
    Sleep(50)
    $data[$i] = ClipGet()
    Sleep(50)
    Send("{DOWN}")
    $i = $i+1
WEnd

$i = 1

While $i <= $tags
    Send($data[$i])
    Sleep(50)
    Send("{DOWN}")
    $i = $i+1
WEnd
Link to comment
Share on other sites

Copies then inserts clipboard into an array for certain amount of times, defined by the user. Then sends array data.

I'm unsure on how this should be done. Obviously $i counts up every time it loops, so I thought this was enough. As the array position is changing each time.

Please can someone give me a hand with this. I can see a lot of talk about using Enum and Eval for "variable within variable" but I don't really wish to do this. I want to learn how to put data into array positions like this.

$i = 1  

$tags = InputBox("Tags", "How many tags in the list?", "", "", _
    100, 100, 500 , 500)

While $i <= $tags
    Send("{CTRLDOWN}")
    Sleep(50)
    Send("c")
    Sleep(50)
    Send("{CTRLUP}")
    Sleep(50)
    $data[$i] = ClipGet()
    Sleep(50)
    Send("{DOWN}")
    $i = $i+1
WEnd

$i = 1

While $i <= $tags
    Send($data[$i])
    Sleep(50)
    Send("{DOWN}")
    $i = $i+1
WEnd
Instead of Send($data[$i]) try

While $i <= $tags
    ClipPut($data[$i])
    Send("^v");paste
    Sleep(50)
    Send("{DOWN}")
    $i = $i+1
WEnd
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Instead of Send($data[$i]) try

While $i <= $tags
    ClipPut($data[$i])
    Send("^v");paste
    Sleep(50)
    Send("{DOWN}")
    $i = $i+1
WEnd
To be honest I think the problem is in the data collection rather than the send at the end.

I get...

Line 13

$data[$i] = ClipGet()
$data^ ERROR

Error: Expected a "=" operator in assignment statement
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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