Sign in to follow this  
Followers 0
inwmsn

Cannot access to the first element of Array

3 posts in this topic

Hi I try to figure out and search all topci how to get access to the first element but it seem doesn't work for me. here script

#include <IE.au3>

#include <Array.au3>

$oIE = _IEAttach("On call service")

$oForm = _IEFormGetObjByName($oIE, "Form1")

$oQuery = _IEFormElementGetObjByName($oForm, "Menud1:txtSearch")

$oButton = _IEFormElementGetObjByName($oForm, "Menud1:imgSearch")

Dim $Array [3]

$Array [0] = "Hello"

$Array [1] = "How are you"

$Array [2] = "Good bye"

For $i = 0 to $Array ;;;; I only got the "0", "How areyou" , "Good bye"

;; For $i = 0 to Ubound ($Array) - 1 ;;; I got the number as "0", "1", "2"

Msgbox (0,"This is", $i)

_IEFormElementSetValue($oQuery, $i)

_IEFormImageClick($oIE,"Images/imagesN/SEARCH_aa_89.jpg","src")

_IELoadWait($oIE)

_IELinkClickByText($oIE,$i)

_IELoadWait($oIE)

_IEImgClick($oIE,"Images/logo/newlogo.gif","src")

_IELoadWait($oIE)

Next

Exit

Can somebody help me please. Thank you

Share this post


Link to post
Share on other sites



Dim $Array [3] 
    $Array [0] =  "Hello"
    $Array [1] =  "How are you"
    $Array [2] =  "Good bye"
                
For $i = 0 to Ubound ($Array) - 1 

   Msgbox (0,"This is element $i",$Array[$i])
   _IEFormElementSetValue($oQuery, $Array[$i])
.
.


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.

Share this post


Link to post
Share on other sites

Dim $Array [3] 
    $Array [0] =  "Hello"
    $Array [1] =  "How are you"
    $Array [2] =  "Good bye"
                
For $i = 0 to Ubound ($Array) - 1 

   Msgbox (0,"This is element $i",$Array[$i])
   _IEFormElementSetValue($oQuery, $Array[$i])
.
.

Hi, Thanks for the replies ! Works great, Thanks again. martin

Share this post


Link to post
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
Sign in to follow this  
Followers 0