Toggling between proxies

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
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
psenatori
Posts: 4
Joined: Fri Oct 29, 2010 6:35 pm

Toggling between proxies

Post by psenatori » Thu Aug 08, 2013 7:32 pm

I just upgraded from 6.9 to 7.22 and my approach to switching between proxies is now broken.

In 6.9 I could configure a proxy using the standard:

imacros:
ONLOGIN USER={{USERNAME}} PASSWORD={{PASSWORD}}
PROXY ADDRESS={{PROXY}}

vbscript:
iret = iim1.iimSet("PROXY", proxy_address)
iret = iim1.iimSet("USERNAME", proxy_username)
iret = iim1.iimSet("PASSWORD", proxy_password)

where proxy_address, proxy_username and proxy_password have been set earlier in vbscript.

If I set proxy_address = "", then imacros simply ignored the proxy without an error. with 7.22 I now get URL error when I pass an empty value to the proxy. I want to avoid writing 2 macros, one with proxy commands, the other without, where I have to evaluate the use of a proxy in my calling program.

So my question is, how can I continue to pass an ip proxy value to my macro, and using the same variable structure, turn the proxy off like i could do in 6.9?

I hope that explanation makes some sense.

Thanks
Paul
Post Reply