1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Tutorial] How to Make JS MacroBots and Make Imacros More POWERFUL

Discussion in 'Social Networking Sites' started by rpkrocks, Jan 17, 2015.

  1. rpkrocks

    rpkrocks Senior Member

    Joined:
    Feb 4, 2010
    Messages:
    986
    Likes Received:
    935
    Gender:
    Male
    Location:
    Bḥārata
    Home Page:
    Ok Guys its been Months since i shared something so here is my contribution to the community :cool:

    In this Tutorial you will Learn to Make Imacros Bots With JS and Imacros (It can do way way more than Simple Macros),Just like any other automation bot(with limitations that it cannot do tasks on your Local Computer),it can do almost anything :cool:


    What you will Need:-

    >>> JavaScript Knowledge
    >>> Imacros Editor
    >>> Other Info
    >>> Notepad++



    1.JavaScript Knowledge


    I would Recommend Watching Tutorials From Lynda(Search Torrents) or https://www.youtube.com/playlist?list=PL46F0A159EC02DF82 (Just 40 Videos) .That will help you gain enough knowledge ,nothing more needed .

    If you still have problems search google and stackoverflow like sites .


    2.Imacros Editor

    This is a great tool for Quickly converting IIM Code into JS script.

    Just Paste in the Recorded IIM(Macros) Lines and Click on Code Generator >> Javascript

    [​IMG]

    And This Will Generate you some code ,Save this code !


    [​IMG]

    You can Take it from Imacros 9 Installation(later versions removed its power of working independently) and ICSharpCode.TextEditor.dll(which will be there in the folder too)

    I have upload my copy to Zippy,You can download it here

    Code:
    http://www72.zippyshare.com/v/vAmA9zep/file.html
    Here is the Virustotal
    Code:
    https://www.virustotal.com/en/file/a60e03b8d95663f5a78ba27340575748d6f0a3c445d06140ffd2256a08cc61b3/analysis/1421513178/
    3.Other Info

    Now Here Comes the Real Script Making Time.

    Write this in starting of Script

    Code:
    var retcode,errtext,macro;

    Now,Copy the code you got from Imacros editor which will look something like this

    Code:
    var macro = "CODE:";
    macro += "WAIT SECONDS=5" + "\n";
    macro += "TAG POS=1 TYPE=BUTTON ATTR=ID:watch-like" + "\n";
    
    And Add
    Code:
    retcode = iimPlay(macro);
    Which makes it look something like this

    Code:
    var macro = "CODE:";
    macro += "WAIT SECONDS=5" + "\n";
    macro += "TAG POS=1 TYPE=BUTTON ATTR=ID:watch-like" + "\n";
    retcode = iimPlay(macro);
    
    That will be the BLOCK of code you script will Run i.e., Anything Between
    Code:
    var macro = "CODE:";
    
    And
    Code:
    retcode = iimPlay(macro);
    will be the running code,you want one,two or 10 BLOCKS ,use as many as according to conditions .

    So eventually code will look like this
    Code:
    var retcode,errtext,macro;
    
    var macro = "CODE:";
    macro += "WAIT SECONDS=5" + "\n";
    macro += "TAG POS=1 TYPE=BUTTON ATTR=ID:watch-like" + "\n";
    retcode = iimPlay(macro);
    
    
    The first line means that we are creating some bags(Read variable) and then sending data to it by macro += which we will eventually run using iimPlay(macros)

    That was simple no? So just save this text as Yourfile.JS in you imacros "macros" folder and run it like any other macro ,you can use all the ifs whens and buts which javascript allows you to and make it more powerful .

    Some commands you may like to use

    >>Setting a Variable into macros ,that can be done by

    Code:
    iimSet("I",i);
    small "i" is our variable(create it in starting with other vars) and BIG "I" is the character you have to use in macros(you can name them anything:eek:)


    use it in content or anywhere in macro by writing it inside double parenthesis Like this
    Code:
    {{I}}

    >>> EXTRACTING Data

    Code:
    var myString = iimGetLastExtract(1);
    iimGetLastExtract(1) means the First EXTRACT , 2 means second and 0 means all extracts in one .


    For More Imacros Codes you can use the official imacros wiki

    Code:
    [B]wiki[/B].[B]imacros[/B].net/

    4>> Notepad++


    Very handy tool for coders ,add some IIM red blue codes and that will be extra helpful ;)
    Code:
    http://forum.imacros.net/viewtopic.php?t=4828&f=2



    Anything more? Ask!
     
    • Thanks Thanks x 6
  2. rpkrocks

    rpkrocks Senior Member

    Joined:
    Feb 4, 2010
    Messages:
    986
    Likes Received:
    935
    Gender:
    Male
    Location:
    Bḥārata
    Home Page:
    No Questions? LOL
     
  3. preatz

    preatz Junior Member

    Joined:
    Jul 23, 2012
    Messages:
    188
    Likes Received:
    97
    Nice tutorial, I think I must learn from link youtube first.
     
  4. DX-GENERATION

    DX-GENERATION Jr. VIP Jr. VIP Premium Member

    Joined:
    Apr 14, 2010
    Messages:
    1,337
    Likes Received:
    294
    Sweet tutorial !!!! I will go through this tutorial today.

    Posted via Topify on Android
     
  5. Ming the Merciless

    Ming the Merciless Power Member

    Joined:
    Sep 30, 2012
    Messages:
    691
    Likes Received:
    827
    Location:
    United States
    Thanks dude! I have been trying to make the leap from imacros into something more complex. This seems to be the ticket! You rock!