trim() not working

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
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
Bassoo7
Posts: 5
Joined: Tue May 30, 2017 7:22 pm

trim() not working

Post by Bassoo7 » Tue Jun 13, 2017 9:22 pm

I'm extracting data that contains spaces, and so I use the trim() function to removes the spaces.

But It doesn't work!

Here's a sample code :

Code: Select all

VERSION BUILD=11.5.499.3066
TAB T=1
TAB CLOSEALLOTHERS

SET !VAR0 <SP><SP><SP><SP><SP><SP>Hi<SP>
SET someVar EVAL("var some='{{!VAR0}}'.trim(); some;")
PROMPT {{someVar}}
The code above should work normally but it returns this error :
Error -1250: JScript statement in EVAL contains the following error: Objects of type 'System.String' do not have such a member. Line 6: SET someVar EVAL("var some='{{!VAR0}}'.trim(); some;")

JavaScript does have trim() function and it works on IE and all browsers!

UPDATE : Apparently It works on FireFox Add-on but not on the iMacros Desktop Browser. Why doesn't it work on the iMacros Browser, which is supposed to be superior than the free add-ons ?!!
MY Config: iMacros Browser 11.5 DESKTOP; Windows 7
Post Reply