Javascript to Imacros converter?

Discussions and Tech Support specific to the iMacros for Chrome extension.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
kendrick89
Posts: 2
Joined: Mon Sep 25, 2017 12:47 am

Javascript to Imacros converter?

Post by kendrick89 » Mon Sep 25, 2017 12:54 am

Hey guys,

I'm new to the forum, and I'm pretty ignorant when it comes to computer programming so please forgive me if I sound too stupid.

I need a simple program for a task I'm doing on a daily basis and I managed miraculously to make it happen somehow on firefox using .js

I searched the Internet for all possible information("thinks") and I can see a bunch of programs, tutorials on how to convert imacros to .js,

but I couldn't find anything on how to convert .js back to imacros.

The reason why I need to do this is I need to run this .js on Chrome which doesn't support javascript. So my only option is to convert it to imacros.

Code is probably very simple for some of you guys, a little bit of help is very much appreciated. I could also pay some $ for your time. Please help a ignorant on programming guy :(

Here's my .js code that works fine on Firefox.

for (i = 1; i < 100000000; i++)
{
var macro = "CODE:";
macro += "SET !TIMEOUT_STEP 0\n";
macro += "SET !ERRORIGNORE YES\n";
macro += "URL GOTO=http://www.xxx.com/\n";
macro += "TAG POS=1 TYPE=DT ATTR=TXT:xxx EXTRACT=TXT\n";
iimPlay(macro)
extract = iimGetLastExtract();
if (extract == "xxx")
{
iimPlay("xxx")
iimClose()
}
}
chivracq
Posts: 9288
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Javascript to Imacros converter?

Post by chivracq » Mon Sep 25, 2017 5:09 am

kendrick89 wrote:Hey guys,

I'm new to the forum, and I'm pretty ignorant when it comes to computer programming so please forgive me if I sound too stupid.

I need a simple program for a task I'm doing on a daily basis and I managed miraculously to make it happen somehow on firefox using .js

I searched the Internet for all possible information("thinks") and I can see a bunch of programs, tutorials on how to convert imacros to .js,

but I couldn't find anything on how to convert .js back to imacros.

The reason why I need to do this is I need to run this .js on Chrome which doesn't support javascript. So my only option is to convert it to imacros.

Code is probably very simple for some of you guys, a little bit of help is very much appreciated. I could also pay some $ for your time. Please help a ignorant on programming guy :(

Here's my .js code that works fine on Firefox.

Code: Select all

for (i = 1; i < 100000000; i++)
{
	var macro = "CODE:";
	macro += "SET !TIMEOUT_STEP 0\n";
	macro += "SET !ERRORIGNORE YES\n";
	macro += "URL GOTO=http://www.xxx.com/\n";
	macro += "TAG POS=1 TYPE=DT ATTR=TXT:xxx EXTRACT=TXT\n";
	iimPlay(macro)
	extract = iimGetLastExtract();
if (extract == "xxx") 
{
   iimPlay("xxx")
   iimClose()
}
}
Yep, Thread approved because not Spam, but nothing specific to iMacros for CR I would think, especially if you don't even mention your FCI... :roll: Try to select the correct Sub-Forum, next time you want to open a Thread...! :idea: (But, pfff..., no need to duplicate your Thread now in some other Sub-Forum...!!)
Read my Sig and mention your FCI for me to read your Qt...! (.. as you were too lazy to read the Forum Rules!, ah-ah, can I call you "Stupido"...?, or "Lazydo"...?...!) :mrgreen: (Yep I know, I can be some kind of an Autistic-Weirdo, until you give in and mention you FCI, then you'll find me your best Friend., hum or not..., but you can pull the Concl. yourself, ah-ah...)

But seriously, try to select the correct Sub-Forum next time you open a Thread, and always mention your FCI...
Last edited by chivracq on Mon Sep 25, 2017 5:38 am, edited 2 times in total.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
kendrick89
Posts: 2
Joined: Mon Sep 25, 2017 12:47 am

Re: Javascript to Imacros converter?

Post by kendrick89 » Mon Sep 25, 2017 5:19 am

chivracq wrote: Yep, Thread approved because not Spam, but nothing specific to iMacros for CR I would think, especially if you don't even mention your FCI... :roll: Try to select the correct Sub-Forum, next time you want to open a Thread...! :idea: (But, pfff..., no need to duplicate your Thread now in some other Sub-Forum...!!)
Read my Sig and mention your FCI for me to read your Qt...! (.. as you were too lazy to read the Forum Rules!, ah-ah, can I call you "Stupido"...?, or "Lazydo"...?...!) :mrgreen:
Thank you very much Chivracq for approving my thread. Yes sorry, I was in a bit too hurry. I'm stupid I agree haha.

My settings are Firefox 55.0.3, iMacros for Firefox 9.0.3, Windows 10, it works fine but I need to make it work on Chrome so I need to convert the .js to .iim,

Chiv could u help me move the thread elsewhere?

Thanks...
chivracq
Posts: 9288
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Javascript to Imacros converter?

Post by chivracq » Mon Sep 25, 2017 5:37 am

kendrick89 wrote:Thank you very much Chivracq for approving my thread. Yes sorry, I was in a bit too hurry. I'm stupid I agree haha.

My settings are Firefox 55.0.3, iMacros for Firefox 9.0.3, Windows 10, it works fine but I need to make it work on Chrome so I need to convert the .js to .iim,

Chiv could u help me move the thread elsewhere?

Thanks...
Euh....!, gooood-gooood-goood..., wait-wait, you are nearly too quick for me...

Euh, moving the Thread, I think I have enough Forum-Mod-Admin-Rights to do it, but never done it, the Forum Admin does it normally..., then don't worry, not too bad...:
=> FCI: iMacros for FF 9.0.3, FF v55.0.3, Win10.
But OK, FCI mentioned, I can read..., hum, and OK, you want to get that Script to work on CR as well, OK..., is my "Specialty"... , ah-ah..., hum, even if I don't like CR......

(I had edited a bit my previous Post btw, before/while you ... pff whatever...)

But hum, give me 10 min to read you OP and to reply, I'm a "slow Thinker", I don't help everybody, but I will reply within 10 min anyway...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 9288
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Javascript to Imacros converter?

Post by chivracq » Mon Sep 25, 2017 5:42 am

OK, I don't need 10 min ah-ah...!, sorry I don't help for "xxx" - "yyy" - "zzz", ah-ah...! :roll:
OK, next Case, ah-ah...!? :twisted:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 9288
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Javascript to Imacros converter?

Post by chivracq » Mon Sep 25, 2017 5:14 pm

Yeah..., 2nd Look, then yep, you "apparently" can simply reconvert your Script back to pure '.iim' and use the 'Play Loop' Functionality..., your Script doesn't look very "complicated"..., but everything depends a bit on your Conditional Logic and what your 'IF' is doing... (=> probably using "Relative Positioning" if your Script is then clicking on "stg"...?, or otherwise with 'EVAL()'...), but everything is obfuscated with "xxx", then it's difficult to help you..., tja...! :roll:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply