Hello world
The main technique that is worth learning is recording actions in the browser and then playing them back. Let's go to the Record tab in the panel in the lower left corner of the screen and click on the Record Macro button. Now type “Hello world” into Google and press Enter. Then the Stop button (under the Record Macro button). iMacros generated code that can be run and edited repeatedly:
VERSION BUILD=7020226 RECORDER=CR URL GOTO=https://www.google.ru/?gfe_rd=cr&ei=Jw5gU4LuF9CWwAPQuIG4Ag TAG POS=1 TYPE=INPUT:TEXT FORM=ID:gbqf ATTR=ID:gbqfq CONTENT=helloworld TAG POS =1 TYPE=BUTTON FORM=ID:gbqf ATTR=ID:gbqfb
The macro recording function makes it possible to avoid having to look at the documentation once again and automate the simplest tasks without bothering with writing code.
Working with IMacros
To work, you will need to launch the installed application and open the Yandex browser. To create a new macro, users need to click on the “Record” button. You can then take certain actions in the browser that you want to save. When the work is completed, click on the “Stop” button.
All the steps you have taken will be translated into program code and recorded in a special executable file. You can select the file you need and click “Start” to execute the macro in Yandex.
Was the article helpful? Support the project - share on social networks:
Grade: 4,87
Calling iMacros from code
Any macro can be saved in a file with the iim extension and used in applications written in 16 programming languages. Just remember to install the full version (not an addon) of iMacros on your computer or web server.
Supported languages
- A.S.P.
- ASP.NET
- C#
- C++
- Delphi
- FoxPro
- Java
- JavaScript
- Perl
- PHP
- Python
- Power Shell
- Ruby
- TCL
- VBA
- VBS
How to write a script on iMacros yourself
Hello everyone, in this article we will talk about the iMacros
for the
FireFox
and it is also available for Google Chrome. This is necessary primarily in order to automate our actions in the browser, and not perform them ourselves, for example: if you need to repeat the same action many times, and you want to leave, then this will save you - and it’s very easy to set up !
I’ll also tell you how you can record macros on iMacros so as not to download other people’s or non-working macros. Or make a macro for yourself.
For example, let’s record a macro for the site addmefast.com (On this site you can get likes, reposts and subscribers on social networks or on Youtube)
1) We will need Mozilla Firefox. 2) After installing Firefox, download the iMacros plugin itself 3) Now click here:
4)Then go to the
Recording
and click
Record options
5) Check the
Use X/Y position
and click
OK
6) After completing all these steps we go to our addmefast
and start recording.
(And by the way, we must be registered there. I advise you to immediately go to Gmail or Facebook, you can also go to twitter) By the way, before starting recording, I advise you to close all unnecessary tabs and leave only the tab we need, and you need to open Firefox in full screen. 7) Now we must press exactly those screen positions that the program should remember and execute. For example, let's try to make a script for YouTube Subscribe (we must be registered on YouTube) After clicking on the record button, click Youtube Subscribe
and
Subscribe
Subscribe to the channel and close the tab.
Upon completion of all our actions, we click Stop.
After clicking Stop, a file called #Current.iim
9) Right-click on the #Current.iim
and click edit. You should end up with something like this
10) Now we need to insert WAIT SECONDS=N
, that is, the script will wait
N
seconds before each click on the button.
11) Before
TAB CLOSE
and after
TAB CLOSE
it is better to put as much time as possible so that the points are counted.
12) Now click Save & Close. Select #Current.iim
Play.
, and set
Repeat macro
to the number of times we need the program to repeat, I will enter
99999
and click
Play (Cycle).
Our script should perform
99999 times all the actions that we did, but sometimes an error appears on the site that needs to be manually close and run the script again.
Also, for convenience, you can turn off the sound in FireFox
This can be done not only with this site, but also with any other, I just showed it using the example of the site addmefast.com
WWW
- iMacros for Firefox users can share sources with each other using Delicious bookmarks. Details here: wiki.imacros.net/iMacros_for_Firefox#Bookmarking
- Full manual on iMacros: wiki.imacros.net
- Manufacturer's website: imacros.net
Batch files
Calling iMacros from batch files is the easiest and most convenient way to automate their execution. One line is enough to run the macro:
"ProgramFiles\iOpus\iMacros\iMacros.exe" -macro "..\..\Macros\Demo\RegExpSearch.iim"
C++
The main difficulty in using iMacros for C++ is setting up the development environment (look for specifics on versions of various environments in the documentation or ask support). The principle of the code is the same as in PHP:
IAppPtr app = IAppPtr(__uuidof(App)); Status s = app->iimInit("", true, "", "", "", cTimeout); s = app->iimPlay("wsh-extract-rate", cTimeout); // Run wsh-extract-rate s = app->iimExit(cTimeout);
Using JavaScript in Macros
In iMacros, you can assign the results of executing JavaScript code to variables using the EVAL command:
SET JSVAR EVAL("var JSVAR = 45+5; JSVAR;")
PHP
iMacros can be launched from a web server using a PHP script. Why might this be useful? To replenish the database by monitoring information sites, generating an online scoreboard of server condition testing results, and so on. An example of calling a macro that searches on a page:
How to install the add-on
If you need automation of actions in the Google Chrome browser, and you realized how useful this plugin is, it's time to figure out how to install it. This is done through the Google Chrome add-on store as follows:
1.
Launch your web browser and open its menu.
2.
In it you need to hover your mouse over the “Additional tools” item and select “Extensions”.
3.
In the window that opens, go to the very bottom and right-click on the “More extensions” link.
4.
A plugin store will open where you can download iMacros for Google Chrome for free in Russian. There will be a search window in the upper left corner, you need to enter iMacros into it and press the Enter key on your computer keyboard. Alas, the extension does not have an official website; more precisely, it is only available for Mozilla (another browser).
5.
A window with the results will appear, where you need to open “iMacros for Chrome” and click the “Install” button.
6.
After installing the plugin, its icon will appear in the upper right corner of the browser.
Website testing
Using iMacros, you can easily write a program to monitor reaction time to various user actions. Example:
'We load the page and record in the logbook the time it takes to load it URL GOTO=https://example.com/about STOPWATCH ID=PageAbout 'We enter the user's first and last name into the forms and measure the time spent sending the data TAG POS=1 TYPE= INPUT:TEXT ATTR=NAME:username CONTENT=Ira TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:usersurname CONTENT=Chernova TAG POS=1 TYPE=BUTTON:SUBMIT FORM=ID:SendInfo ATTR=TXT:SendInfo STOPWATCH ID= SendInfo
The measurement results are saved in Imacros\Downloads\performance_Stopwatch.csv.
Usage
Once we've figured out how the add-on is installed, we can move on to setting up iMacros for Firefox. Click on the add-on icon that appears on your browser toolbar after installation. A panel will open on the left side of the window - this is the main interface of the extension with which the user can interact. To clearly demonstrate how the program works and understand how to use iMacros for Firefox, open the “Demo – Firefox” folder:
Find the “FillForm” file in the list and click on the “Play” button. The browser will automatically go to the test page, enter data into the form and confirm it. This is the purpose of the plugin: by installing iMacros for Firefox Mozilla in your browser, you can create scripts that will help you perform the same operations much faster than it would be done manually.
To record a sequence of actions:
- Open the "Recording" tab.
- Click on the appropriate button to start recording your actions inside the browser.
- After the procedure is completed, click “Stop” and then “Save as...”.
- The saved macro will be automatically placed in the desired folder, and you can run it by going to the Play tab.
IMacros for Firefox does not require any configuration - immediately after installation, the component is ready to work and is able to play and record your scripts.
Advice! IMacros can be used as a means of quickly filling out a form when making a payment in an online store: just complete this procedure once with the add-on enabled, and the next time filling out payment information will take you only two seconds. It is completely safe - the created scripts are stored only on the computer and are not transferred anywhere.
IMacros is a common browser add-on, so it can be easily removed from Firefox if you no longer need it (you can read more about removing plugins from Firefox here), and it can also be updated periodically (how to update plugins, read here).
I hope my article helped you figure out how to use Imacros For Firefox, and with its help you can help both yourself in performing everyday tasks and your loved ones by transferring the script you created to them.
SRC
The magazine appendix contains nine macro templates (with Russian-language comments) that you can adapt to solve the following tasks:
- filling out form fields from CSV files;
- extracting data from a table into a CSV file;
- setting values in selectors and radio buttons;
- saving pictures from the site;
- processing pop-up JS dialogs;
- print page;
- taking screenshots;
- measuring the time it takes to load individual page elements and execute scripts;
- extracting data from forms and other parts of the website.
Download and install
How to install iMacros for Firefox? This can be done in the add-on store of the browser itself. Download iMacros from there. So that you don’t look for it there yourself, we provide a link: https://addons.mozilla.org/rU/firefox/addon/imacros-for-firefox/.
2.Click on the “Install” button in the small window after downloading the add-on.
3.You will be transferred to the developer’s website. There you will be greeted and thanked for the installation.
4.Restart your browser. This is a must if you want to get started with Imacros right now.