trim() not working

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

trim() not working

by Bassoo7 on Tue Jun 13, 2017 2: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
Bassoo7
 
Posts: 5
Joined: Tue May 30, 2017 12:22 pm

Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: Bing [Bot] and 3 guests

-->