Imacros, web page to save to specific folder? - imacros

I have this macro for firefox, for web page saving (htm):
VERSION BUILD=7500718 RECORDER=FX
'
'Ask for a name
!VAR1 NoName_Time_{{!NOW:yyyymmdd_hhnnss}}
'
'Save the page
SAVEAS TYPE=CPL C:\Pages FILE={{!VAR1}}
It works OK, htm page is saved and images and css file are saved in created subfolder.
What I want to change is for jpg images and css files to be saved in specified folder such as ’C:\Images’ so that htm page can find them in that folder.
I tried:
SAVEAS TYPE=CPL FOLDER=C:\Pages FILE={{!NOW:yyyymmdd_hhnnss}} TYPE=CPL FOLDER=C:\Images
But I got error:
wrong format of SAVEAS command, line 5 (Error code: 910)
Any solution?

SAVEAS TYPE=CPL FOLDER=C:\Pages FILE={{!VAR1}}

Related

iMacros changes the source code when I save it

I have just downloaded iMacros, but it changes the source code when I do a 'SAVEAS', compared to when I manually do a 'file' -> 'saveas' -> 'web page HTML only' in Firefox.
How can I make the iMacros 'saveas' be the same as my manual FF save?
My iMacros code is:
URL GOTO=http://www.??????
SAVEAS TYPE=HTM FOLDER=C:\xampp\htdocs FILE=name.htm
Try to use this workaround:
SET myLink http://www.??????
URL GOTO={{myLink}}
SET S "var doc = window.document; var elt = doc.createElement('a'); elt.id = 'myA'; elt.href = '{{myLink}}'; doc.body.appendChild(elt); undefined;"
URL GOTO=javascript:{{S}}
ONDOWNLOAD FOLDER=C:\xampp\htdocs FILE=name.htm
TAG POS=1 TYPE=A ATTR=HREF:{{myLink}} CONTENT=EVENT:SAVETARGETAS
URL GOTO=javascript:{doc.body.removeChild(doc.getElementById("myA"));undefined;}

How to save pictures when using SAVEITEM to new folder

Using this IMacros code
TAG POS=1 TYPE=IMG ATTR=ID:"pagecontent_imgProduct" CONTENT=EVENT:SAVEITEM
How can i specify other folder for saving images, by default its saving to Imacros/Downloads
Before your line try to use the 'ONDOWNLOAD' command:
ONDOWNLOAD FOLDER=* FILE=* ...

Apex 4.2 capture filepath using file browse item

Apex 4.2 : I want to capture the filepath after browsing and selecting a file using item File browse (WWV_FLOW_FILES). The file is uploaded as a BLOB but all info regarding its original location is missing, as it is replaced by f.i. F12457/<name doc>.docx. When using File Browse (browsing for a document and selecting) however the complete path (f.i. L:\abc\def\document.docx) is shown in the field (although its value then is already F999999/document.docx).
Browser security stops JavaScript from accessing this information
How to get full path of selected file on change of <input type=‘file’> using javascript, jquery-ajax?
eg:
$('#P6_FILE').val()
"C:\fakepath\12c_notes.txt"
declare
v_doc varchar2(100);
begin
select :P_DOCUMENT into v_doc from dual;
:P59_DOCNAME := v_doc;
end;

iMacros SAVEAS (with TYPE=CPL or HTM) not saving the exact code of the page

I am running an iMacros macro that navigates a web site and saves a page to a file. I'm using a simple script as follow:
URL GOTO=http://myurl.com/
SAVEAS TYPE=HTM FOLDER=* FILE=*
The issue is that the saved HTML page is different than the one I get when saving from Firefox using File -> Save page as... and selecting "Web Page, HTML only". It seems like some processing is done on the page by iMacros I suppose. For instance this line
<meta charset="utf-8" />
becomes
<meta charset="utf-8">
This looks minor but on some occasions I had element that were reversed, hence hiding an issue with a tag wrongly closed. For example, where my page had
</form></div>
it was saved as
</div></form>
by iMacros.
Unfortunately I cannot find any reference of this issue on the iMacros forum. Any ideas?
Work for me.
Before start script create directory d:\reports or other
URL GOTO=http://your_url
'Uncomment for not show popup
'SET !EXTRACT_TEST_POPUP NO
TAG POS=1 TYPE=HTML ATTR=CLASS:* EXTRACT=HTM
SAVEAS TYPE=HTM FOLDER=d:\reports FILE=1.html
try this code.
URL GOTO=http://myurl.com/
TAG POS=1 TYPE=HTML ATTR=CLASS:* EXTRACT=HTM
SAVEAS TYPE=HTM FOLDER=* FILE=*
Also a good and easy way to test extracted data is www.jsbin.com

Imacros help, script was working but not now

This line was working before but now it doesn't extract the text, I guess this is happening because it is clicking inside the box. This only happen when I use Firefox, using Internet Explorer is ok.
VERSION BUILD=8021970
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://www.fakemailgenerator.com/
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:emailForm ATTR=ID:fName&&VALUE:* EXTRACT=TXT
it looks like the value you need is disappear when imacros tries to scrape it, but you can use this code to get email:
URL GOTO=http://www.fakemailgenerator.com/
TAG POS=1 TYPE=span attr=id:cxtEmail EXTRACT=TXT
or you can scrape htm of your tag and parse it to get value attribute