Search found 239 matches

by iimfun
Tue Aug 23, 2016 6:36 am
Forum: General Support & Discussions
Topic: Help using EVAL to remove text
Replies: 2
Views: 1147

Re: Help using EVAL to remove text

You should try this

Code: Select all

SET !VAR2 EVAL("'{{!EXTRACT}}'.replace(/(\\[EXTRACT\\]|#EANF#)/g, '');")
by iimfun
Mon Aug 22, 2016 6:56 am
Forum: iMacros for Firefox
Topic: Run macro with variable for CONTENT field
Replies: 2
Views: 973

Re: Run macro with variable for CONTENT field

Did you hear about the !DATASOURCE variable ( http://wiki.imacros.net/!DATASOURCE ) ?
by iimfun
Fri Aug 19, 2016 2:50 pm
Forum: iMacros for Chrome
Topic: Selecting items from dropdown list and extracting data.
Replies: 6
Views: 3530

Re: Selecting items from dropdown list and extracting data.

Play the following macro on the page with some country ( e.g. https://www.rio2016.com/en/search-athletes?q=&c=Slovenia ) in usual mode SET startLoop 1 SET !EXTRACT_TEST_POPUP NO TAG POS=1 TYPE=SPAN ATTR=CLASS:"search__total-results txt-uppercase" EXTRACT=TXT SET maxLoop EVAL("('{{maxLoop}}' == '__un...
by iimfun
Thu Aug 18, 2016 1:16 pm
Forum: iMacros for Chrome
Topic: Selecting items from dropdown list and extracting data.
Replies: 6
Views: 3530

Re: Selecting items from dropdown list and extracting data.

At last I get that worked. Below is a sample code which loops over the countries. Try to play it on https://www.rio2016.com/en in loop mode with the 'Max:' value equal to 208 or less. TAG POS=1 TYPE=SPAN ATTR=TXT:Athletes<SP>&<SP>Teams SET !EXTRACT_TEST_POPUP NO TAG SELECTOR=".sidebar-menu--advanced...
by iimfun
Thu Aug 18, 2016 10:07 am
Forum: iMacros for Chrome
Topic: Selecting items from dropdown list and extracting data.
Replies: 6
Views: 3530

Re: Selecting items from dropdown list and extracting data.

Hi, I couldn't make 'iMacros for Chrome' loop over the countries on this site. It seems to me that there's some sort of a bug in loop mode because my macro works flawlessly in usual mode for any country (from 1 to 208). My conclusion is the following: for your task it's better to apply the free exte...
by iimfun
Tue Aug 16, 2016 6:37 am
Forum: Data Extraction and Web Screen Scraping
Topic: Extract text from multiple url's
Replies: 3
Views: 1589

Re: Extract text from multiple url's

Yes, I'm running free extension 'iMacros for Firefox'. As I can't reproduce your error, only the way with two 'SAVEAS' may be recommended to you so far TAB T=1 URL GOTO=https://maps.googleapis.com/maps/api/distancematrix/json?origins=Balmain+East,+NSW,+Australia&destinations=Sydney,+NSW,+Australia&k...
by iimfun
Mon Aug 15, 2016 3:12 pm
Forum: iMacros for Firefox
Topic: Unable to close Firefox
Replies: 8
Views: 5297

Re: Unable to close Firefox

Alternatively you can try the following code

Code: Select all

'TAB T=1
'TAB CLOSEALLOTHERS
EVENT TYPE=KEYPRESS SELECTOR=* CHAR="w" MODIFIERS="ctrl,shift"
by iimfun
Mon Aug 15, 2016 1:56 pm
Forum: Data Extraction and Web Screen Scraping
Topic: Extract text from multiple url's
Replies: 3
Views: 1589

Re: Extract text from multiple url's

Hi, When I play the macro you provided, it saves all the text and csv file is as follows "{ ""destination_addresses"" : [], ""error_message"" : ""The provided API key is invalid."", ""origin_addresses"" : [], ""rows"" : [], ""status"" : ""REQUEST_DENIED"" } ","{ ""destination_addresses"" : [], ""err...
by iimfun
Mon Aug 15, 2016 9:29 am
Forum: iMacros for Chrome
Topic: Using tab Buttons on an HTML page - timeout
Replies: 8
Views: 3348

Re: Using tab Buttons on an HTML page - timeout

The last code must work and I can't guess what may be wrong. However the loop problem wasn't your main issue. What d'you think about the idea from the 2nd part of my first post here?
by iimfun
Fri Aug 12, 2016 12:37 pm
Forum: iMacros for Chrome
Topic: Using tab Buttons on an HTML page - timeout
Replies: 8
Views: 3348

Re: Using tab Buttons on an HTML page - timeout

OK. And what about this macro played both in usual and loop modes?

Code: Select all

SET locUrl http://localhost/asin3.htm
SET currUrl EVAL("({{!LOOP}} == 1) ? '{{locUrl}}' : 'javascript:void(0);';")
URL GOTO={{currUrl}}

TAG POS={{!LOOP}} TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton EXTRACT=TXT
by iimfun
Fri Aug 12, 2016 8:27 am
Forum: iMacros for Chrome
Topic: Using tab Buttons on an HTML page - timeout
Replies: 8
Views: 3348

Re: Using tab Buttons on an HTML page - timeout

Does the following code work fine in usual mode? SET locUrl http://localhost/asin3.htm SET currUrl EVAL("({{!LOOP}} == 1) ? '{{locUrl}}' : 'javascript:void(0);';") URL GOTO={{currUrl}} TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton EXTRACT=TXT TAG POS=2 TYPE=INPUT:SUBMIT FORM=...
by iimfun
Thu Aug 11, 2016 2:23 pm
Forum: General Support & Discussions
Topic: xpath extract multiple answer
Replies: 4
Views: 2457

Re: xpath extract multiple answer

1. How can I eval the extract text from 1963-11-09 to 09/11/1963?
Here is a code for that

Code: Select all

SET !EXTRACT EVAL("'{{!EXTRACT}}'.split('-').reverse().join('/');")
by iimfun
Thu Aug 11, 2016 10:03 am
Forum: iMacros for Chrome
Topic: Using tab Buttons on an HTML page - timeout
Replies: 8
Views: 3348

Re: Using tab Buttons on an HTML page - timeout

1. First of all I recommend rewriting the macro so that you could play it in loop mode SET locUrl http://localhost/asin3.htm SET currUrl EVAL("({{!LOOP}} == 1) ? '{{locUrl}}' : 'javascript:void(0);';") URL GOTO={{currUrl}} TAG POS={{!LOOP}} TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton...
by iimfun
Wed Aug 10, 2016 8:07 am
Forum: General Support & Discussions
Topic: [SOLVED] Firefox Dev Edition imacro bookmarks and URLs..
Replies: 11
Views: 13054

Re: Firefox Dev Edition imacro bookmarks and URLs don't work

Hi @irxr, it's interesting. Can't you even play the macro from a bookmarklet compatible with Chrome too? For example javascript:(function() {try{var e_m64 = "UFJPTVBUJTIwSEVMTE8h", n64 = "bWFjcm8uaWlt";if(!/^(?:chrome|https?|file)/.test(location)){alert('iMacros: Open webpage to run a macro.');retur...
by iimfun
Tue Aug 09, 2016 6:33 am
Forum: General Support & Discussions
Topic: [SOLVED] Firefox Dev Edition imacro bookmarks and URLs..
Replies: 11
Views: 13054

Re: Firefox Dev Edition imacro bookmarks and URLs don't work

Maybe the following bookmark location will work in FDE

Code: Select all

javascript:{setTimeout('location.href="imacros://run/?m=mymacro.iim"',1000);void(0);}
(Sometimes I had to use the way like that instead of the standard one for some unexplained reasons.)