Javascript to Imacros converter?

Discussions and Tech Support related to the iMacros Google Chrome extension.

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.

Javascript to Imacros converter?

by kendrick89 on Sun Sep 24, 2017 5:54 pm

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()
}
}
kendrick89
 
Posts: 2
Joined: Sun Sep 24, 2017 5:47 pm

Re: Javascript to Imacros converter?

by chivracq on Sun Sep 24, 2017 10:09 pm

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 Sun Sep 24, 2017 10:38 pm, edited 2 times in total.
- (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: 6477
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Javascript to Imacros converter?

by kendrick89 on Sun Sep 24, 2017 10:19 pm

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...
kendrick89
 
Posts: 2
Joined: Sun Sep 24, 2017 5:47 pm

Re: Javascript to Imacros converter?

by chivracq on Sun Sep 24, 2017 10:37 pm

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)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: 6477
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Javascript to Imacros converter?

by chivracq on Sun Sep 24, 2017 10:42 pm

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)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: 6477
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Javascript to Imacros converter?

by chivracq on Mon Sep 25, 2017 10:14 am

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)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: 6477
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to iMacros for Chrome

Who is online

Users browsing this forum: No registered users and 3 guests

-->