[FREE] iMacros to Java Script Converter

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

[FREE] iMacros to Java Script Converter

by Tanckom on Thu Jun 30, 2016 12:32 pm

So, as some have seen in my previous post, I created a iMacros to Java Script converter, since the iMacros Code Creator is outdated.
Feel free to use and do whatever you want ;) (except to commercialise it)
Image

Download: iMacros to Java Script converter
FCIM
Firefox: 56.0
Os: Windows 10 x64
iMacros: 9.0.3
Tanckom
 
Posts: 79
Joined: Fri Jan 15, 2016 5:12 am

Re: [FREE] iMacros to Java Script Converter

by serbeer on Fri Jul 01, 2016 12:00 pm

Thank you Tanckom.

Could you please give a hint in what way this converter has a leg up on iMacros Code Creator v0.16? Is there a feature or improvement over it that you implemented in this release?

Thanks!
serbeer
 
Posts: 35
Joined: Thu Sep 10, 2015 10:36 pm

Re: [FREE] iMacros to Java Script Converter

by Tanckom on Mon Jul 04, 2016 7:16 am

Hello, first sorry for the late reply.
Second, yes there is/are improvements.

The iMacros Code Creator didnt escape in java scripts the " and \ symbols. Which means in several occasions that the code is finished here.
Due this, iMacros responded with an error, since it couldnt read anything what came after these two symbols.
You can however escape those symbols by adding a \ symbol BEFORE those symbols.

Try out a script with one of both symbols, and convert them with both tools. You can see the difference in the end.
FCIM
Firefox: 56.0
Os: Windows 10 x64
iMacros: 9.0.3
Tanckom
 
Posts: 79
Joined: Fri Jan 15, 2016 5:12 am

Re: [FREE] iMacros to Java Script Converter

by serbeer on Wed Jul 06, 2016 1:57 pm

Tanckom wrote:Hello, first sorry for the late reply.
Second, yes there is/are improvements.

The iMacros Code Creator didnt escape in java scripts the " and \ symbols. Which means in several occasions that the code is finished here.
Due this, iMacros responded with an error, since it couldnt read anything what came after these two symbols.
You can however escape those symbols by adding a \ symbol BEFORE those symbols.

Try out a script with one of both symbols, and convert them with both tools. You can see the difference in the end.

I got it. Yes, it is a major advantage indeed, as this problem is the main reason I did not use the Code Creator for all of my scripting--since I use Event mode a lot and it has quotes.
I am going to try out your converter, and thank you for releasing it for public use!
serbeer
 
Posts: 35
Joined: Thu Sep 10, 2015 10:36 pm

Re: [FREE] iMacros to Java Script Converter

by Tanckom on Thu Jul 07, 2016 2:20 am

You're welcome ;)
I'll think I'll combine it with the csv converter :)
FCIM
Firefox: 56.0
Os: Windows 10 x64
iMacros: 9.0.3
Tanckom
 
Posts: 79
Joined: Fri Jan 15, 2016 5:12 am

Re: [FREE] iMacros to Java Script Converter

by serbeer on Thu Jul 07, 2016 10:09 am

Tanckom wrote:You're welcome ;)
I'll think I'll combine it with the csv converter :)

Good idea. And in csv converter, would be nice to get some confirmation that the file was written. Right now, pressing Create File button has no visual indication of success of failure, which is very unusual. The only way to find out is to check the directory to see if the file was indeed created...
serbeer
 
Posts: 35
Joined: Thu Sep 10, 2015 10:36 pm

Re: [FREE] iMacros to Java Script Converter

by Tanckom on Thu Jul 07, 2016 10:12 am

Will do ;)
FCIM
Firefox: 56.0
Os: Windows 10 x64
iMacros: 9.0.3
Tanckom
 
Posts: 79
Joined: Fri Jan 15, 2016 5:12 am

Re: [FREE] iMacros to Java Script Converter

by Tanckom on Sun Jul 10, 2016 9:44 am

v1.0.1 is out. Bugfix of: When last line was empty it didnt add the iimPlay. Fixed it and now working flawlessly
Last edited by Tanckom on Mon Jul 11, 2016 2:51 pm, edited 1 time in total.
FCIM
Firefox: 56.0
Os: Windows 10 x64
iMacros: 9.0.3
Tanckom
 
Posts: 79
Joined: Fri Jan 15, 2016 5:12 am

Re: [FREE] iMacros to Java Script Converter

by serbeer on Mon Jul 11, 2016 12:33 pm

Thank you!
serbeer
 
Posts: 35
Joined: Thu Sep 10, 2015 10:36 pm

Re: [FREE] iMacros to Java Script Converter

by chivracq on Sun Sep 18, 2016 8:05 am

FYI, some new Forum User (@lemot) developed a similar Tool:
- Javascript Bootstrap for iMacros Code
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6489
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: [FREE] iMacros to Java Script Converter

by Tanckom on Mon Sep 19, 2016 3:36 am

Isnt that the same? :p
FCIM
Firefox: 56.0
Os: Windows 10 x64
iMacros: 9.0.3
Tanckom
 
Posts: 79
Joined: Fri Jan 15, 2016 5:12 am

Re: [FREE] iMacros to Java Script Converter

by chivracq on Mon Sep 19, 2016 6:01 am

Tanckom wrote:Isnt that the same? :p

I don't know, I don't use '.js' Scripts so I don't really know where to look to test it/them a bit...

Would be interesting if you could test it and post an (objective!) Comparison with your own Converter..., with strong points for both..., and maybe this new Tool will contain some Features that could help you even improve your own Tool... :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6489
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: [FREE] iMacros to Java Script Converter

by Tanckom on Tue Sep 20, 2016 1:10 pm

Hehe, mine is better. This tool doesnt escape special characters like " and \ and is therefore till a level useless. Moreover is the converted code incomplete. :D = I WIN
FCIM
Firefox: 56.0
Os: Windows 10 x64
iMacros: 9.0.3
Tanckom
 
Posts: 79
Joined: Fri Jan 15, 2016 5:12 am

Re: [FREE] iMacros to Java Script Converter

by chivracq on Tue Sep 20, 2016 1:29 pm

Tanckom wrote:Hehe, mine is better. This tool doesnt escape special characters like " and \ and is therefore till a level useless. Moreover is the converted code incomplete. :D = I WIN

OK, I'm not surprised about the not escaped Chars, your Converter was not working perfectly either from the first Version, would be more useful if you could be more precise, maybe with some Table and Checks on Features for both Tools, together with some Test '.iim' Script that you used to test them both, together with both Results... (and the Differences)...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6489
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: [FREE] iMacros to Java Script Converter

by Tanckom on Thu Oct 06, 2016 6:12 am

True that ;) but I worked on it and quickly fixed it after release.

No need for tables etc.
1. In fact, that the JavaScript can work, you need to specify the used variable which would be in our case "macro".
2. Next you need to add every line of iMacros to your new variable in JavaScript, but the first added line must be "CODE:".
3. Then you need to check all lines for special characters like " and \, if they contains these characters, they need to be escaped with \ characters.
4. When checked, add in the end of each line a + "\n";
5. Finally, add the iimPlay(macro) where macro is your used variable.

The RegExr tool maybe only provides part 4 and some others. The RegExr tool doesnt escaped the " and \ symbols, you can't specifiy the used variable and the first two lines (Standard -> part 1 and part 2) and the last line (part 5) are missing.

My tool however allows you to specify a variable, adds the beginning and ending and escaped the characters.


var macro;
macro = "CODE:";
... <-- EVERYTHING BETWEEN HERE IS WHAT REGEXR DOES
iimPlay(macro)
FCIM
Firefox: 56.0
Os: Windows 10 x64
iMacros: 9.0.3
Tanckom
 
Posts: 79
Joined: Fri Jan 15, 2016 5:12 am

Next

Return to General Support & Discussions

Who is online

Users browsing this forum: No registered users and 6 guests

-->