FORM FILLING IN RICH TEXT EDITOR iMACROS

Hello, Today we will learn. How to write command iMacro for fill out the details to text box or textarea. Actually, I called this text box is Text Editor.

So. Problem for fill the details of products to text box is, iMacro will not Enter line up for us. Cause the text we type is not pretty read.

Second problem. iMacro can fill the details to basic textarea of HTML, But mostly basic command of iMacro can't fill to tag DIV or text editor. And Now! mostly developers like to use tag DIV command for fill in the page. We will see example this tag in Facebook or twitter and famous website. So if you see that web be use that tag, you have to use iMacro record option to "Experimental event recording mode" and use command JavaScript to help.
OK Start create code.

***All detial in this page you need to see the video to understand.
Form Filling In Rich Text Editor iMacros
Form Filling In Rich Text Editor iMacros

FORM FILLING IN RICH TEXT EDITOR iMACROS

First step. I will create new folder in iMacro, This new folder name TEST02. 
Next step. I will press record button in iMacro and press STOP button, Move file #current.iim to folder TEST02.

This Step I will copy command from old job. This command is basic header code of iMacro.
First section we will create code for textarea tag and before this we will learn how to write command iMacro for DIV tag or Text Editor.


Back to code I will Edit some line.
OK. I will see my data. In my Data or CSV I want info from collum 4. Back to code iMacro, I will edit number get collum to number 4.

So. write code for textarea dispensable to write command JavaScript file, We can write command in .iim file,
but second section may be unavoidable to write command in JavaScript file.

Back to code. In csv file collum number 4. I have inserted special characters. This special characters is lowcase n uppercase n and lowcase n. I will write command SET VAR1 EVAL and use JavaScript for replace this special characters to new line code or BR tag. See example in video.

Results of EVAL command, This command send Results variable to VAR1 and iMacro will get to work.
Back to code. In EVAL command I will create variable name ss for get info from csv file in collum number 4. Don't forget single quote to cover COL4. See Example in video.

I will explain EVAL command. Structure this command will be had double quote, If we create variable in this command and that variable is string we can use single quote to cover string, But if you want to use double quote to cover that string, You have to use backslash after double quote. Definition of backslash that we use. Double quote is not meant to be programmed or the program will ignore that Double quote. See example in video.

Back to code. I will use replace command for replace lowcase n uppercase n and lowcase n to double backslash n.
backslash n, This is command for new line. See example in video.
The new line command is available to us using 2 commands. BR and double backslash n, In this video we will use double backslash n.

Next step. Replace command is we use will be replaced only one word. In this case lowcase n uppercase n and lowcase n.
So that, We must use regular expression to help. See example in video.

In video, you will see problem and how to solve problem. But I want to focus on again an how to declare variables in iMacro Before use. You should declare the variable is you want to append and do it every time before ending the command EVAL. See example result code in video.

Back to code. I will test and show between the command double backslash n and BR tag, See in results are same to Or different double backslash n.

Now you can see BR tag can be use same double backslash n by JavaScript command is we write in EVAL. But you can't use double backslash n with iMacros basic command.
All of this is created is set code for basic fill out the details to text box or textarea. But this step does not apply to other HTML tags to use fill out are not textarea.

Next section I will show how to fill out the detail product to other HTML text box or text editor.

OK. I will show HTML text box or text editor. See example in video.
You can see this text fill isn't basic textarea tags.

OK. This section I will use jQuery to help.

I will write a jquery command to access an iframe html tag on a web page. Because, the fields are inside this iframe.

OK. Now I will find class of iframe in this video I select one value of class and search.
See that this value only one in use on this page.
I will use this class for access to iframe.

Before we go to next step, We have to know basic for access to frame of iMacro.
iMacro can access to frame by 2 command.
1. Sequence number of the frame on the page command this code is FRAME F=(Sequence number of the frame).
2. Access by name of frame this command is FRAME NAME=(name of frame).

So this video I will use access to frame by name of frame. But problem now iframe on this page is not have named.

We have to use jQuery for insert name to frame.

You have to insert jQuery function everytime to run imacro code. Below code insert jQuery for .iim
URL GOTO=javascript:im_include("https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js");function<SP>im_include(path){var<SP>s=document.createElement("script");s.type="text/javascript";s.src=path;document.getElementsByTagName("head")[0].appendChild(s);}void(0);WAIT SECONDS=1



You can see example for use jquery in other video in my channel.

Back to code. I will use command jquery for access to class of iframe and use command ATTR for insert attribute name to iframe and value of attribute name is myframe.

Don't forget all command jquery is we use in iMacros should not have empty space or you must to should command <SP> replace all empty space, If you don't use <SP> all jquery comand in this line don't work.

OK, we will test this code.
You can see tag iframe has attribute NAME is we wanted.
Next step we can test to access in this iframe by command of iMacro.

Actually you can use only command of JavaScript to solve this but this. In example I will use command of jQuery.
Because jQuery easy more than JavaScript and suitable for beginners.

Back to code. I will copy last code iMacro from before step and past in this file .iim.
After, that I will edit <BR> to double backslash n.

After, that. We will create code for write text to frame.
I will copy code from #current.iim, in this class we used in the first step.

We have to focus and don't forget, every time to use jQuery in .iim.
We have to use command WAIT SECONDS about 1 second and paste the code between lines used jQuery.

Because we need to keep the code running for a moment. See example in video.
After that we use command imacro to penetrate into the frame.
After that click to element P.
After that we create code for write detail product to frame.
This Product details are deposited at the variable VAR1.
After that create code FRAME = 0 for out from iframe.
After that we go to test code.
In video, you can see word detail writing in page.
So from last code we Let you do copy and paste in new file .iim.
We will test in other element without iframe.
After, paste code we have to edit code.
  1. Remove all line has jQuery code.
  2. Remove frame code all line.
  3. Edit SELECTOR by copy old code and paste to current code.
See example in video.
In video, you can see word detail writing in page.

Thank you for watching, and we hope to enjoy all video.

1 comment:

  1. i have a file.txt includ emails on my disktop and i try to read this file for subscribe in a website using imacros
    i use this code:

    VERSION BUILD=9002379 RECORDER=FX
    SET !ERRORIGNORE YES
    SET !DATASOURCE "C:\Desktop\mailList.txt"
    SET !DATASOURCE_COLUMNS 1

    URL GOTO=https://gootobuzz.blogspot.com/
    TAG POS=1 TYPE=INPUT:EMAIL FORM=ACTION:https://gootobuzz.blogspot.com/ ATTR=ID:gscw_email_input CONTENT={{!COL1}}
    TAG POS=1 TYPE=SPAN ATTR=TXT:Subscribe
    TAG POS=1 TYPE=SPAN ATTR=CLASS:g-kv55ss

    but i have this error:
    RuntimeError: !DATASOURCE requires File IO interface, line: 4

    ReplyDelete

SCROLL DOWN THE WEBSITE WITH iMACRO.

hello, Today I will present How to scroll down web site by iMacro. If you use iMacro for your jobs and you have a problem iMacro don't ...