0

I create code like this

a=Array(-fx,-cr,-ie)

Set iim1= CreateObject ("imacros")

    i = iim1.iimInit("a(0)", true)
    iret = iim1.iimInit()
    iret = iim1.iimSet("row", m)
    iret = iim1.iimPlay("hiren")
    iret = iim1.iimExit()

End Function

I define the array at a=Array(-fx,-cr,-ie). now i use this array like a(0) in the code like i use here

i = iim1.iimInit("a(0)", true). but it is not working plz help. what is wrong?

1 Answer 1

1

a(0) is your first array element. "a(0)" is just a string. Try removing the quotes.

Also, iimInit() requires a string for its first parameter. So you need to add quotes to your array elements during definition.

a = Array("-fx", "-cr", "-ie")

Set iim1 = CreateObject("imacros")
i = iim1.iimInit(a(0), True)    ' a(0) is the string "-fx"
Sign up to request clarification or add additional context in comments.

4 Comments

I've never used iMacros before but, from looking at their doc page, it looks like the first param to iimInit() should be a string. So your array definition should look like this: a = Array("-fx", "-cr", "-ie")
but for the that the variable should be "-fx" in execution by this it take only -fx as variable..do you know how to " special character as variable.this will solve the problem
I'm not sure what you're asking. Did changing it to a = Array("-fx", "-cr", "-ie") not work? It should.
I changed the code above to demonstrate what I'm saying. Did you notice you have two iimInit() statements in your original code? Also, does it work if you don't use the array and just specify a string literal?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.