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++.

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.

Toggling between proxies

by psenatori on Thu Aug 08, 2013 12: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
psenatori
 
Posts: 4
Joined: Fri Oct 29, 2010 11:35 am

Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: Bing [Bot] and 3 guests

-->