Max size of variable using iimSet()?

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
erikcw
Posts: 34
Joined: Sun Nov 13, 2005 5:08 pm

Max size of variable using iimSet()?

Post by erikcw » Fri Dec 02, 2005 6:59 pm

Hi,

I have a web form to fill out that takes several hundred words of data. (textarea).

I've loaded the variable in the scripting interface using iimSet(), but all of the data doesn't end up in the form.

Is there a max length to an IIM variable? If so, how do I get around it? Is it possible to append data to a textarea repeatedly with a loop?

Thanks!
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Fri Dec 02, 2005 11:57 pm

Variables can contain up to 1 MB of text. If you need to transfer more then 1 MB from your script to the macro, you can use two or more variables:

In the script this would look like this:
i = iim1.iimSet ("-var_text1", text_part1)
i = iim1.iimSet ("-var_text2", text_part2)
i = iim1.iimSet ("-var_text3", text_part3)

And in the macro:
TAG.... CONTENT={{text1}}{{text2}}{{text3}}

If you still encounter problems, please post your script and macro, and we will investigate it.
erikcw
Posts: 34
Joined: Sun Nov 13, 2005 5:08 pm

Post by erikcw » Sat Dec 03, 2005 12:28 am

Here is a chunk of test code I put togeather to illustrate the problem.

Code: Select all

'Excel VBA

primary = Empty
For i = 0 To 1000
    primary = primary & vbNewLine & CStr(i)
Next
       
        'create
        iret = iim1.iimSet("-var_MARKET", Cells(row, 2).Value)
        iret = iim1.iimSet("-var_PRIMARY", primary)
        iret = iim1.iimSet("-var_SECONDARY", sec)
        iret = iim1.iimSet("-var_URLS", urls)
        iret = iim1.iimPlay("cmam")

Code: Select all

VERSION BUILD=5010115     
TAB T=1     
TAB CLOSEALLOTHERS     
SIZE X=976 Y=883    
ATTR=NAME:market CONTENT={{MARKET}} 
TAG POS=1 TYPE=TEXTAREA FORM=ACTION:markets.php ATTR=NAME:primary CONTENT={{PRIMARY}} 
TAG POS=1 TYPE=TEXTAREA FORM=ACTION:markets.php ATTR=NAME:secondary CONTENT={{SECONDARY}} 
TAG POS=1 TYPE=TEXTAREA FORM=ACTION:markets.php ATTR=NAME:urls CONTENT={{URLS}}

When I run the script, {{PRIMARY}} only fills the field with:
0
1
2
3
...
225
It should go all the way to 1000.
erikcw
Posts: 34
Joined: Sun Nov 13, 2005 5:08 pm

Post by erikcw » Sat Dec 03, 2005 1:03 am

NOTE: I created a test webpage with just a big textarea and a seperate script with just a loop to 1000 and the IM scripting code. Same issue as above.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Sat Dec 03, 2005 2:41 am

We found and fixed the problem. It will be generally available with the next IIM update in 1-2 weeks. If you need the patch earlier, just contact us via http://www.iopus.com/service/support/ and we can email it to you.
Frank

PS: Thanks for the detailed reproduction scenario. This helped a lot in locating and fixing the issue so quickly!

Update: I posted a download link to the patched file below.
Last edited by Tech Support on Sat Dec 03, 2005 10:11 pm, edited 1 time in total.
Guest

Post by Guest » Sat Dec 03, 2005 8:01 am

As an added issue with IM, there's a limit of 32K characters for all textareas in html. I did a bit of reserach, and it seems there should be no limit, any limits imposed are browser specific.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Sat Dec 03, 2005 10:09 pm

Here is the patch:
http://www.iopus.com/download/forum/iim ... _v501b.zip (92K)

Please download the file, unzip it and replace the current "iimInterface.dll" in c:\program files\Internet Macros with the new one.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Sat Dec 03, 2005 10:14 pm

As an added issue with IM, there's a limit of 32K characters for all textareas in html.
The IIM browser does not have this size limit. We tested it with huge amounts of text (1 MB) with no problems.
Guest

Post by Guest » Mon Dec 05, 2005 6:42 pm

Tech Support wrote:
As an added issue with IM, there's a limit of 32K characters for all textareas in html.
The IIM browser does not have this size limit. We tested it with huge amounts of text (1 MB) with no problems.
I will have to restest it then. It is also possible that the limitation is on the back-end of the page, namely in the script that handles the text put into the textarea of the field. If that's the case, then you are completely right, IM would not have the 32k limitation.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Fri Jan 13, 2006 5:55 pm

This issue has been fixed in V5.02
Post Reply