Script variables always undefined

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
whanaki
Posts: 8
Joined: Sun Jan 18, 2009 11:54 am

Script variables always undefined

Post by whanaki » Sun Jan 18, 2009 2:16 pm

Hi,

I am using Excel to call an iMacro script in FF.

In VBA I have the following lines:

iret = iim.iimSet("-var_startdatum", "20070707")
iret = iim.iimSet("-var_enddate", CStr(Format(Cells(1, 2).Value, "yyyymmdd")))

before calling iimPlay. Inside the iMacro I tried

PROMPT {{!var_startdatum}}
PROMPT {{!startdatum}}
PROMPT {{var_startdatum}}
PROMPT {{startdatum}}

to check the value but all 4 prompts return ___undefined___

What am I doing wrong?

And whats the correct syntax for this if I want to select by the value of the entry
TAG POS=1 TYPE=SELECT FORM=NAME:selector ATTR=NAME:v_zeitraum_bis CONTENT=%{{var_startdatum}}

or do I leave the % out?

Cheers
Martin
dharmendra2000
Posts: 214
Joined: Fri Jul 04, 2008 1:28 pm
Location: Ahmedabad
Contact:

Re: Script variables always undefined

Post by dharmendra2000 » Tue Jan 20, 2009 5:30 am

I am not sure about VB Script, but you can try below in Java Script
iimSet("var_startdatum","20070707")
iimPlay("YourMacro.iim")

In your current code you can try....
iim.iimSet("-var_startdatum", "20070707")
iim.iimSet("-var_enddate", CStr(Format(Cells(1, 2).Value, "yyyymmdd")))
iimPlay("YourMacro.iim")

Let me know for any further help (related to java script/macro)
Post Reply