Search found 239 matches

by iimfun
Tue Aug 09, 2016 6:25 am
Forum: General Support & Discussions
Topic: xpath extract multiple answer
Replies: 4
Views: 2457

Re: xpath extract multiple answer

If the number of multiple elements is known a priori, just specify them directly

Code: Select all

TAG XPATH="/PrivateHealthInsurance/PHIPolicies/PHIPolicy[1]" EXTRACT=TXT
TAG XPATH="/PrivateHealthInsurance/PHIPolicies/PHIPolicy[2]" EXTRACT=TXT
...
by iimfun
Mon Aug 08, 2016 12:09 pm
Forum: Data Extraction and Web Screen Scraping
Topic: Loop through results
Replies: 4
Views: 1784

Re: Loop through results

1. You can set the 'Max' number of loops to 99999 and the macro just will stop with an error when it doesn't find the next page.

2. What do you mean by "automated by date"? And where is a date in your macro?
by iimfun
Sat Aug 06, 2016 12:00 pm
Forum: Data Extraction and Web Screen Scraping
Topic: Loop through results
Replies: 4
Views: 1784

Re: Loop through results

Let's suppose that you are on the first page. Play the part of the macro you want to loop through in loop mode with an arbitrary value ( > 1 ) of the 'Max:' field (just for testing). ' *** this is the block I would need to loop through ' get out the text from the result table TAG POS=1 TYPE=TBODY AT...
by iimfun
Sat Aug 06, 2016 11:46 am
Forum: iMacros for Firefox
Topic: PAUSE_IF_FOUND?
Replies: 10
Views: 3689

Re: PAUSE_IF_FOUND?

Serbeer, it is talked about a conditional pause in context of the posed question (" PAUSE_IF_FOUND "). If you want this pause to appear, replace the line #5 TAG POS=1 TYPE=LI ATTR=TXT:Comprehensive<SP>CRM<SP>capabilities EXTRACT=TXT with (for instance) SET !EXTRACT "Everything but #EANF#" The condit...
by iimfun
Fri Aug 05, 2016 8:01 am
Forum: iMacros for Firefox
Topic: PAUSE_IF_FOUND?
Replies: 10
Views: 3689

Re: PAUSE_IF_FOUND?

Chivracq, I tested the macro posted above in iMacros for Chrome (not for Firefox). If you wish, make sure that it works correctly by yourself. And here is rather an original solution to imitate a conditional pause in iim macros for Firefox ' ... ' e.g. TAG POS=1 TYPE=LI ATTR=TXT:Comprehensive<SP>CRM...
by iimfun
Thu Aug 04, 2016 8:53 am
Forum: iMacros for Firefox
Topic: PAUSE_IF_FOUND?
Replies: 10
Views: 3689

Re: PAUSE_IF_FOUND?

It seems that in iMacros for Firefox you really need JS. If the type of browser doesn't matter, here is a possible solution that works in iMacros for Chrome SET !ERRORIGNORE YES SET !TIMEOUT_STEP 0 SET !EXTRACT_TEST_POPUP NO TAG POS=1 TYPE=LI ATTR=TXT:Comprehensive<SP>CRM<SP>capabilities EXTRACT=TXT...
by iimfun
Wed Aug 03, 2016 1:12 pm
Forum: Data Extraction and Web Screen Scraping
Topic: IMacros + XPATH:Count children of tag
Replies: 4
Views: 2677

Re: IMacros + XPATH:Count children of tag

I doubt if you can do it with XPATH. Nevertheless if you use iMacros for Firefox and JavaScript Scripting Interface, try this code

Code: Select all

var numberOfRows = window.document.querySelectorAll("table.tableProduct tr").length;
by iimfun
Tue Aug 02, 2016 1:58 pm
Forum: Data Extraction and Web Screen Scraping
Topic: Javascript elements - can not click to the right button
Replies: 1
Views: 1280

Re: Javascript elements - can not click to the right button

Perhaps the way suggested below is not the easiest one, but I just took the function that had been written formerly for other case ' function to get the last position of the "add_media_type" elements on the 'My Profile' page SET selectScr "var num = document.querySelectorAll(\"a[class^='add_media_ty...
by iimfun
Sat Jul 30, 2016 12:57 pm
Forum: iMacros Consultants
Topic: JS file help, willing to pay! Need ASAP
Replies: 1
Views: 5468

Re: JS file help, willing to pay! Need ASAP

Try this js-script var i, retcode; // set your value below var linesInCsv = 5; for (i=1; i<=linesInCsv; i++) { iimSet("i", i); iimPlay("CNN2.iim"); } with the following iim-macro TAB T=1 SET !DATASOURCE JSTest.csv SET !DATASOURCE_COLUMNS 7 SET !DATASOURCE_LINE {{i}} URL GOTO=https://www.google.com/ ...
by iimfun
Fri Jul 29, 2016 6:36 am
Forum: iMacros for Firefox
Topic: Pass variable within Javascript
Replies: 4
Views: 1698

Re: Pass variable within Javascript

It's alright! Different recording modes - different tags. It seems, the problem that the 'macro2' doesn't find the 'TAG' may be solved with an additional line to identify the frame, i.e. var macro2 = "CODE:"; macro2 += "FRAME NAME=content" + "\n"; macro2 += "TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:cel...
by iimfun
Thu Jul 28, 2016 2:19 pm
Forum: iMacros for Firefox
Topic: Pass variable within Javascript
Replies: 4
Views: 1698

Re: Pass variable within Javascript

Yes, your code is not ideal indeed but i just rewrote it so that you could understand the right way to go var macro1 = "CODE:"; macro1 += "TAB CLOSEALLOTHERS" + "\n"; macro1 += "SET !REPLAYSPEED MEDIUM " + "\n"; macro1 += "URL GOTO=https://10.11.1.17/" + "\n"; macro1 += "SET !ENCRYPTION NO" + "\n"; ...
by iimfun
Thu Jul 28, 2016 8:29 am
Forum: iMacros for Chrome
Topic: Play loop option fields too small
Replies: 1
Views: 1406

Re: Play loop option fields too small

I wouldn't advise to fight with the iMacros visibility. Below is a macro that simulates the loop mode when one plays it in usual mode. Instead of {{!LOOP}} for 1, 2, 3... you simply have to use the {{normLoop}} variable. Maybe it will be more convenient for your tasks. SET startLoop 1 SET maxLoop EV...
by iimfun
Wed Jul 27, 2016 3:10 pm
Forum: General Support & Discussions
Topic: how to get random line form txt file
Replies: 3
Views: 2257

Re: how to get random line form txt file

Sayuto, check out my post in the following thread
http://forum.imacros.net/viewtopic.php? ... 125#p70125
by iimfun
Wed Jul 27, 2016 3:05 pm
Forum: iMacros for Chrome
Topic: How to run a macro from the command line using Chrome
Replies: 22
Views: 25047

Re: How to get it working in Chrome

Another workaround to use iMacros for Chrome via the command line. 1. Make sure "Allow access to file URLs" is checked: http://wiki.imacros.net/iMacros_for_Chrome#Using_Chrome_with_the_iMacros_RunAs_Agent_.28iimRunner.29 2. Let's assume that file 'D:\Temp\crIimLaunch.html' has the following content:...
by iimfun
Wed Jul 27, 2016 11:33 am
Forum: iMacros for Firefox
Topic: EVAL and window/document objects
Replies: 6
Views: 3790

Re: EVAL and window/document objects

Some notes as to the 'EVAL' command ( http://wiki.imacros.net/EVAL ): The code evaluation occurs in an execution context that is separate from the browser process, therefore access to the web page DOM is not available. and For DOM/GUI access you can use URL GOTO with Javascript. And, of course, this...