iMacros not working with redirect

Discussions and Tech Support specific to the iMacros Firefox Add-on.
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
talz13
Posts: 8
Joined: Mon Dec 01, 2008 6:58 pm

iMacros not working with redirect

Post by talz13 » Sun Dec 14, 2008 2:50 pm

I just set up a VM yesterday to run my imacros scrips and keep them contained in a window of its own (annoying having windows popping up over what I'm doing while it's running). I am using ubuntu 8.10 x86 on virtualbox 2.0.6 with firefox 3.0.4 and imacros for firefox version 6.1.1.0 (previously and currently working on versions 6.1.1.0 and 6.0.7.6 on my desktop)

In set up, I:
1. made a new VM
2. Installed ubuntu 8.10
3. Made new firefox profile
4. Installed iMacros in said profile
5. copied my scripts from the iMacros/Macros folder on my desktop to the iMacros/Macros folder on the VM
6. set firefox homepage to my redirect page

Anyway, my setup is this:
1. cron job launches my bash shell script
2. my shell script launches my firefox profile that I have set up for imacros
3. firefox's profile has a redirect page I made set as the homepage (to redirect to my local javascript macro after 5 seconds)
3.a. Html redirect page redirects to a url of the form: http://run.imacros.net/?m=<scriptNameHere>.js
4. the javascript macro calls the first iim macro to get some data from my page
5. the javascript macro calls the second iim macro to fill out a form on another page
and it goes on from here for a while, looping over successive datasets...

On my main pc and my work pc, it works fine (in both of my firefox profiles with two different versions of imacros for firefox), but when I ran the exact same setup on the virtual machine, I kept getting redirected to the page that says:

You tried to run an embedded iMacros script but the iMacros Firefox Add-on is not installed yet. Please install the free, open source iMacros Firefox extension to run the shared browser scripts:

even though I have definitely installed it (repeatedly, and in new/old firefox profiles, I might add). If I then manually run any script in the imacros sidebar, it will start up without giving me the error page.

The second issue I've been having is, apparently when it gets to my for loop in my javascript, it just quits. (I just now figured it out while typing this response, but it's also a head scratcher!) What was wrong was, I was extracting a table cell as HTM, and my script outside of the virtual machine is having no trouble getting the int value out of the cell for some reason, while in the VM, it was extracting the whole TD brackets and everything and was not able to interpret the int out of that. I changed the VM script to extract with TXT and it started running correctly again.

Still unable to launch a script from a redirect, though.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: iMacros not working with redirect

Post by Tech Support » Sun Dec 14, 2008 10:38 pm

even though I have definitely installed it (repeatedly, and in new/old firefox profiles, I might add). If I then manually run any script in the imacros sidebar, it will start up without giving me the error page.
When you first start Firefox via the command line the iMacros extension is not immediately active . It takes a few seconds for Firefox to activate it. So the run.imacros.net command does not get intercepted and the "iMacros not installed" web page is shown. See also http://wiki.imacros.net/iMacros_for_Fir ... ne_Support

Solution: Make sure that Firefox is already running. If you start Firefox a second time, Firefox will direct this new command automatically to the already running instance. Now iMacros can "see" the run.imacros.net bookmark URL and start the macro.

The second issue I've been having is, apparently when it gets to my for loop in my javascript, it just quits. (I just now figured it out while typing this response, but it's also a head scratcher!)
Does this issue happen all the time or "only" in the virtual machine?
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: iMacros not working with redirect

Post by Tech Support » Sun Dec 14, 2008 10:39 pm

(annoying having windows popping up over what I'm doing while it's running)
What kind of windows do you mean? iMacros messages should not steal the focus.
talz13
Posts: 8
Joined: Mon Dec 01, 2008 6:58 pm

Re: iMacros not working with redirect

Post by talz13 » Sun Dec 14, 2008 11:45 pm

Well, that's the issue. I made a page that does a redirect after 5 seconds to my macro. So, upon loading, it waits 5 seconds before calling it. Even if I wait for the browser to load, go to a few pages, run a macro or two from the sidebar, if I click the home button and let it redirect me, it will fail.

Also, the flashing windows I was mentioning are the new windows I am opening to submit data to an external site, nothing related to iMacros being annoying :mrgreen:
talz13
Posts: 8
Joined: Mon Dec 01, 2008 6:58 pm

Re: iMacros not working with redirect

Post by talz13 » Tue Dec 16, 2008 8:23 pm

Any idea why running a macro from a timed redirect page doesn't work in my virtual machine while it works fine elsewhere?
Post Reply