Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
User avatar
loliconth
Posts: 17
Joined: Sat Jan 11, 2014 10:05 am

Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by loliconth » Sat Jan 11, 2014 10:45 am

Hello every body :D

I use iMacros v8.6.0 in my Firefox v.26
i need to script or command to verify my ip and when it changes, than it continue to work ,im not talking about the proxy address command
i have some vpn software to change ip every 5 - 6min. but i can't set imacros to wait that because some website sometime some vpn server it's time not equal in process :(

Please Help

Regards! :o
Hello iMacros I'm ThZ
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by chivracq » Sat Jan 11, 2014 4:32 pm

Using one of those 4, I guess you can come out with a Solution, either opening the URL in a second Tab and using EVAL to decide for further Processing, or handling the Conditional Logic from a .js Script...

Retrieve own IP-Address:
http://l2.io/ip.js?var=myip
https://jsonip.appspot.com/?callback=getip
https://smart-ip.net/geoip-json
https://smart-ip.net/geoip-json?callback=ip_callback
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
User avatar
loliconth
Posts: 17
Joined: Sat Jan 11, 2014 10:05 am

Re: Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by loliconth » Sat Jan 11, 2014 4:47 pm

chivracq wrote:Using one of those 4, I guess you can come out with a Solution, either opening the URL in a second Tab and using EVAL to decide for further Processing, or handling the Conditional Logic from a .js Script...

Retrieve own IP-Address:
http://l2.io/ip.js?var=myip
https://jsonip.appspot.com/?callback=getip
https://smart-ip.net/geoip-json
https://smart-ip.net/geoip-json?callback=ip_callback
thanks Chivracq for your answer :D
but i never use .js in imcros I've just used basic commands :(
you can teach me ? please write example script to show me ? :o
Hello iMacros I'm ThZ
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by chivracq » Sat Jan 11, 2014 10:46 pm

I'm not a Javascript Gourou either... But what does your Macro do? Before and after the Wait for the Change for IP-Address...? Is it looping or not...? Are you using a .CSV to pull out Data or save some...?
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
User avatar
loliconth
Posts: 17
Joined: Sat Jan 11, 2014 10:05 am

Re: Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by loliconth » Sun Jan 12, 2014 3:51 am

chivracq wrote:I'm not a Javascript Gourou either... But what does your Macro do? Before and after the Wait for the Change for IP-Address...? Is it looping or not...? Are you using a .CSV to pull out Data or save some...?
yes i want to loop play

my imacros

VERSION BUILD=8601111 RECORDER=FX
TAB T=1
SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
SET !TIMEOUT_PAGE 20
SET !TIMEOUT_STEP 1
SET !DATASOURCE C:\*******.csv
SET !DATASOURCE_COLUMNS 3
SET !********* "{{!COL1}}"
i need command or script record current ip to .csv ? (*1)
URL GOTO=http://www.useragentstring.com
WAIT SECONDS=2
URL GOTO=http://ip.my-proxy.com/
WAIT SECONDS=2
URL GOTO=http://anypoint.com
WAIT SECONDS=5
WAIT UNTIL IP CHANGE ( if ip it same (*1) will not continue but if ip 123.123.123.123 (my real ip) will not continue too )
(if ip not same (*1) and if ip is not 123.123.123.123 will continue to play loop)


that my script and in red text i need to do that but i do not ,, help me please :(
Hello iMacros I'm ThZ
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by chivracq » Sun Jan 12, 2014 7:58 am

Not tested, but I hope you understand the idea...:

You have a "Check IP and Wait x=60 seconds" Block that you need to repeat 6 times in order to cover the 6 min before your VPN will renew your IP-Address, or 12 times if you shorten x to 30 sec, etc...

Code: Select all

VERSION BUILD=8601111 RECORDER=FX
TAB T=1
SET !ERRORIGNORE YES
'?!? Never heard of this !ERRORCONTINUE...!?!:
SET !ERRORCONTINUE YES
SET !TIMEOUT_PAGE 20
SET !TIMEOUT_STEP 1
'Set to YES or comment out if you want to check your IP-Address:
SET !EXTRACT_TEST_POPUP NO

SET !DATASOURCE C:\*******.csv
SET !DATASOURCE_COLUMNS 3
SET !********* "{{!COL1}}"
SET myRealIP "123.123.123.123"

URL GOTO=http://www.useragentstring.com
WAIT SECONDS=2

'Retrieve your current IP=Address:
TAB OPEN
TAB T=2
URL GOTO=http://ip.my-proxy.com/
TAG POS=1 TYPE=B ATTR=TXT:Your<SP>IP:
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myIP {{!EXTRACT}}
SET !EXTRACT NULL
WAIT SECONDS=2

TAB T=1
URL GOTO=http://anypoint.com
WAIT SECONDS=5

TAB T=2
REFRESH
TAG POS=1 TYPE=B ATTR=TXT:Your<SP>IP:
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myNewIP {{!EXTRACT}}
SET !EXTRACT NULL
'Compare myNewIP with myIP:
SET !VAR1 EVAL("if (\"{{myNewIP}}\" == \"{{myIP}}\") {var x = 60;} else {var x = 0;} x;")
SET !VAR2 EVAL("if (\"{{myNewIP}}\" == \"{{myRealIP}}\") {var x = 60;} else {var x = 0;} x;")
ADD !VAR1 {{!VAR2}}
WAIT SECONDS={{!VAR1}}

TAB T=2
REFRESH
TAG POS=1 TYPE=B ATTR=TXT:Your<SP>IP:
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myNewIP {{!EXTRACT}}
SET !EXTRACT NULL
'Compare myNewIP with myIP:
SET !VAR1 EVAL("if (\"{{myNewIP}}\" == \"{{myIP}}\") {var x = 60;} else {var x = 0;} x;")
SET !VAR2 EVAL("if (\"{{myNewIP}}\" == \"{{myRealIP}}\") {var x = 60;} else {var x = 0;} x;")
ADD !VAR1 {{!VAR2}}
WAIT SECONDS={{!VAR1}}

'Etc...

'Repeat the Block as many times as you want and play with the "x=60" 
'for how many seconds you want to wait before checking again...

TAB T=1
'... And continue Processing or loop again...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
User avatar
loliconth
Posts: 17
Joined: Sat Jan 11, 2014 10:05 am

Re: Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by loliconth » Sun Jan 12, 2014 9:56 am

chivracq wrote:Not tested, but I hope you understand the idea...:

You have a "Check IP and Wait x=60 seconds" Block that you need to repeat 6 times in order to cover the 6 min before your VPN will renew your IP-Address, or 12 times if you shorten x to 30 sec, etc...

Code: Select all

VERSION BUILD=8601111 RECORDER=FX
TAB T=1
SET !ERRORIGNORE YES
'?!? Never heard of this !ERRORCONTINUE...!?!:
SET !ERRORCONTINUE YES
SET !TIMEOUT_PAGE 20
SET !TIMEOUT_STEP 1
'Set to YES or comment out if you want to check your IP-Address:
SET !EXTRACT_TEST_POPUP NO

SET !DATASOURCE C:\*******.csv
SET !DATASOURCE_COLUMNS 3
SET !********* "{{!COL1}}"
SET myRealIP "123.123.123.123"

URL GOTO=http://www.useragentstring.com
WAIT SECONDS=2

'Retrieve your current IP=Address:
TAB OPEN
TAB T=2
URL GOTO=http://ip.my-proxy.com/
TAG POS=1 TYPE=B ATTR=TXT:Your<SP>IP:
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myIP {{!EXTRACT}}
SET !EXTRACT NULL
WAIT SECONDS=2

TAB T=1
URL GOTO=http://anypoint.com
WAIT SECONDS=5

TAB T=2
REFRESH
TAG POS=1 TYPE=B ATTR=TXT:Your<SP>IP:
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myNewIP {{!EXTRACT}}
SET !EXTRACT NULL
'Compare myNewIP with myIP:
SET !VAR1 EVAL("if (\"{{myNewIP}}\" == \"{{myIP}}\") {var x = 60;} else {var x = 0;} x;")
SET !VAR2 EVAL("if (\"{{myNewIP}}\" == \"{{myRealIP}}\") {var x = 60;} else {var x = 0;} x;")
ADD !VAR1 {{!VAR2}}
WAIT SECONDS={{!VAR1}}

TAB T=2
REFRESH
TAG POS=1 TYPE=B ATTR=TXT:Your<SP>IP:
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myNewIP {{!EXTRACT}}
SET !EXTRACT NULL
'Compare myNewIP with myIP:
SET !VAR1 EVAL("if (\"{{myNewIP}}\" == \"{{myIP}}\") {var x = 60;} else {var x = 0;} x;")
SET !VAR2 EVAL("if (\"{{myNewIP}}\" == \"{{myRealIP}}\") {var x = 60;} else {var x = 0;} x;")
ADD !VAR1 {{!VAR2}}
WAIT SECONDS={{!VAR1}}

'Etc...

'Repeat the Block as many times as you want and play with the "x=60" 
'for how many seconds you want to wait before checking again...

TAB T=1
'... And continue Processing or loop again...

OMG...OMGGGGGGGGGGGGGGGG :shock:
I don't know how to repay your great kindness of your answer well :oops:
" chivracq " Thank you so much :P
can i give paypal gift to you ? :)

Reverential !
Hello iMacros I'm ThZ
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by chivracq » Sun Jan 12, 2014 3:16 pm

loliconth wrote: OMG...OMGGGGGGGGGGGGGGGG :shock:
I don't know how to repay your great kindness of your answer well :oops:
" chivracq " Thank you so much :P
can i give paypal gift to you ? :)

Reverential !
OK, sounds like my Script is working... and that you experienced some kind of triple-orgasm...! :D

Happy I could help. Enjoy...

(And I don't have a Paypal Account, but that's a good idea, I may open one one day, as you are not the first one to want to reward me for my help, but for the moment I do it for the fun...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
User avatar
loliconth
Posts: 17
Joined: Sat Jan 11, 2014 10:05 am

Re: Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by loliconth » Sun Jan 12, 2014 3:30 pm

chivracq wrote:
loliconth wrote: OMG...OMGGGGGGGGGGGGGGGG :shock:
I don't know how to repay your great kindness of your answer well :oops:
" chivracq " Thank you so much :P
can i give paypal gift to you ? :)

Reverential !
OK, sounds like my Script is working... and that you experienced some kind of triple-orgasm...! :D

Happy I could help. Enjoy...

(And I don't have a Paypal Account, but that's a good idea, I may open one one day, as you are not the first one to want to reward me for my help, but for the moment I do it for the fun...)
Thanks again and again ! :D
Hello iMacros I'm ThZ
User avatar
loliconth
Posts: 17
Joined: Sat Jan 11, 2014 10:05 am

Re: Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by loliconth » Tue Jan 14, 2014 12:20 pm

" chivracq "
I think script have bug or wrong command ,, please check

VERSION BUILD=8601111 RECORDER=FX
CLEAR
TAB T=1
SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
SET !TIMEOUT_PAGE 30
SET !TIMEOUT_STEP 1
SET !EXTRACT_TEST_POPUP NO
SET !DATASOURCE C:\*********.csv
SET !DATASOURCE_COLUMNS 1
SET !************** "{{!COL1}}"
SET myRealIP "123.123.123.123"

URL GOTO=http://www.anyweb1.com
WAIT SECONDS=3

TAB OPEN
TAB T=2
URL GOTO=http://l2.io/ip.js?var=myip
TAG POS=1 TYPE=B ATTR=TXT:myip<SP>=
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myIP {{!EXTRACT}}
SET !EXTRACT NULL
WAIT SECONDS=3

TAB T=1
URL GOTO=http://anyweb2.com
WAIT SECONDS=8
CLICK X=*** Y=***
TAG POS=1 TYPE=A ATTR=ID:*****
TAB T=1
URL GOTO=http://anyweb3.com
WAIT SECONDS=9
CLICK X=**** Y=***
TAG POS=1 TYPE=A ATTR=ID:******

TAB T=2
URL GOTO=http://l2.io/ip.js?var=myip
TAG POS=1 TYPE=B ATTR=TXT:myip<SP>=
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myNewIP {{!EXTRACT}}
SET !EXTRACT NULL
'Compare myNewIP with myIP:
SET !VAR1 EVAL("if (\"{{myNewIP}}\" == \"{{myIP}}\") {var x = 50;} else {var x = 0;} x;")
SET !VAR2 EVAL("if (\"{{myNewIP}}\" == \"{{myRealIP}}\") {var x = 50;} else {var x = 0;} x;")
ADD !VAR1 {{!VAR2}}
WAIT SECONDS={{!VAR1}}

TAB T=2
REFRESH
TAG POS=1 TYPE=B ATTR=TXT:myip<SP>=
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myNewIP {{!EXTRACT}}
SET !EXTRACT NULL
'Compare myNewIP with myIP:
SET !VAR1 EVAL("if (\"{{myNewIP}}\" == \"{{myIP}}\") {var x = 20;} else {var x = 0;} x;")
SET !VAR2 EVAL("if (\"{{myNewIP}}\" == \"{{myRealIP}}\") {var x = 20;} else {var x = 0;} x;")
ADD !VAR1 {{!VAR2}}
WAIT SECONDS={{!VAR1}}

TAB T=2
REFRESH
TAG POS=1 TYPE=B ATTR=TXT:myip<SP>=
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myNewIP {{!EXTRACT}}
SET !EXTRACT NULL
'Compare myNewIP with myIP:
SET !VAR1 EVAL("if (\"{{myNewIP}}\" == \"{{myIP}}\") {var x = 20;} else {var x = 0;} x;")
SET !VAR2 EVAL("if (\"{{myNewIP}}\" == \"{{myRealIP}}\") {var x = 20;} else {var x = 0;} x;")
ADD !VAR1 {{!VAR2}}
WAIT SECONDS={{!VAR1}}

TAB T=2
REFRESH
TAG POS=1 TYPE=B ATTR=TXT:myip<SP>=
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myNewIP {{!EXTRACT}}
SET !EXTRACT NULL
'Compare myNewIP with myIP:
SET !VAR1 EVAL("if (\"{{myNewIP}}\" == \"{{myIP}}\") {var x = 20;} else {var x = 0;} x;")
SET !VAR2 EVAL("if (\"{{myNewIP}}\" == \"{{myRealIP}}\") {var x = 20;} else {var x = 0;} x;")
ADD !VAR1 {{!VAR2}}
WAIT SECONDS={{!VAR1}}

TAB T=1
TAB CLOSEALLOTHERS

=================================

myNewIP same myRealIP = Waiting = that OK
myNewIP same myIP = Waiting = that OK

but... this problems
myNewIP not same myIP = still wait = Problem
myNewIP not same myRealIP = still wait = Problem

where bug or wrong command :cry:
Hello iMacros I'm ThZ
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by chivracq » Tue Jan 14, 2014 3:05 pm

Yes, Mister or Miss Clever Loliconth!,

That's normal... You changed something in my Script which broke it, and you end up with the always TRUE Condition "#EANF#=#EANF#", which means always WAITING...

Comment out the "SET !ERRORIGNORE YES" Line (or set it temporarily to NO) and you'll understand straight away from the Runtime Error you are going to get what you did wrong...
And I don't know where you got that "SET !ERRORCONTINUE YES", I don't know this Command...

Use PROMPT to debug your Script...

Come back with Feedback after your Debugging and I will give you the Solution if you don't find it by yourself...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
User avatar
loliconth
Posts: 17
Joined: Sat Jan 11, 2014 10:05 am

Re: Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by loliconth » Tue Jan 14, 2014 6:03 pm

chivracq wrote:Yes, Mister or Miss Clever Loliconth!,

That's normal... You changed something in my Script which broke it, and you end up with the always TRUE Condition "#EANF#=#EANF#", which means always WAITING...

Comment out the "SET !ERRORIGNORE YES" Line (or set it temporarily to NO) and you'll understand straight away from the Runtime Error you are going to get what you did wrong...
And I don't know where you got that "SET !ERRORCONTINUE YES", I don't know this Command...

Use PROMPT to debug your Script...

Come back with Feedback after your Debugging and I will give you the Solution if you don't find it by yourself...
I'm Mister :D "chivracq"
and i found bug..it my fault :oops:

*
*
*
SET !ERRORIGNORE YES because i setting YES it make me not see mistake of script
SET !ERRORCONTINUE YES my unknow command :(
*
*
SET !EXTRACT_TEST_POPUP NO now i change to YES
*
*
*
*

*
*

TAB OPEN
TAB T=2
URL GOTO=http://l2.io/ip.js?var=myip i change point for ip checker
TAG POS=1 TYPE=B ATTR=TXT:myip<SP>= but this!!! i enter wrong parameter
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myIP {{!EXTRACT}}
SET !EXTRACT NULL
WAIT SECONDS=3

*
*
*
*
*
*
*
*
*
*

TAB T=2
URL GOTO=http://l2.io/ip.js?var=myip i change point for ip checker
TAG POS=1 TYPE=B ATTR=TXT:myip<SP>= wrong parameter !!
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myNewIP {{!EXTRACT}}
SET !EXTRACT NULL
'Compare myNewIP with myIP:
SET !VAR1 EVAL("if (\"{{myNewIP}}\" == \"{{myIP}}\") {var x = 50;} else {var x = 0;} x;")
SET !VAR2 EVAL("if (\"{{myNewIP}}\" == \"{{myRealIP}}\") {var x = 50;} else {var x = 0;} x;")
ADD !VAR1 {{!VAR2}}
WAIT SECONDS={{!VAR1}}

*
*
TAG POS=1 TYPE=B ATTR=TXT:myip<SP>= wrong parameter !!
*
*
*
*
*
*
*
*

*
*
*
*
*
*
*
*
*
*
*

*
*
*
*
*
*
*
*
*
*
*

TAB T=1
TAB CLOSEALLOTHERS


but "chivracq" i want to change point ip checker to website recommended from you "http://l2.io/ip.js?var=myip"
because sometime "http://ip.my-proxy.com/" It very very slow to download
can you help me to fill that parameter to success ? :o
URL GOTO=http://l2.io/ip.js?var=myip
TAG POS=1 TYPE=B ATTR=TXT:*******

Reverential ! :)
Hello iMacros I'm ThZ
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by chivracq » Tue Jan 14, 2014 10:35 pm

Very good, Mister Clever (without irony this time...) Loliconth, I'm impressed! I honestly didn't believe you would find it by yourself, as I already promised sbd else with another problem that I would soon post in your Thread some useful Code for him in this Thread:
http://forum.imacros.net/viewtopic.php?f=2&t=22255#p56277

The useful Code he'll be waiting for was related to PROMPT and this is what I used in your case to follow the different Variables that I used:

Code: Select all

TAB T=2
'URL GOTO=http://l2.io/ip.js?var=myip
'TAG POS=1 TYPE=B ATTR=TXT:myip<SP>=
'TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
URL GOTO=http://ip.my-proxy.com/
TAG POS=1 TYPE=B ATTR=TXT:Your<SP>IP:
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myNewIP {{!EXTRACT}}
PROMPT myNewIP:<SP>{{myNewIP}}<br>myIP:<SP{{myIP}}<br>myRealIP:<SP>{{myRealIP}}

SET !EXTRACT NULL
'Compare myNewIP with myIP:
SET !VAR1 EVAL("if (\"{{myNewIP}}\" == \"{{myIP}}\") {var x = 50;} else {var x = 0;} x;")
SET !VAR2 EVAL("if (\"{{myNewIP}}\" == \"{{myRealIP}}\") {var x = 50;} else {var x = 0;} x;")
PROMPT VAR1:<SP>{{!VAR1}}<br>VAR2:<SP>{{!VAR2}}
ADD !VAR1 {{!VAR2}}
PROMPT VAR1:<SP>{{!VAR1}}<br>(After<SP>adding<SP>VAR1+VAR2...)
WAIT SECONDS={{!VAR1}}
OK, let's get back to your problem.
Well you found out that

Code: Select all

URL GOTO=http://l2.io/ip.js?var=myip
TAG POS=1 TYPE=B ATTR=TXT:myip<SP>=
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
doesn't work because the 2 TAG POS Lines are specific for the

Code: Select all

URL GOTO=http://ip.my-proxy.com/
Web-Page and do not work for the

Code: Select all

URL GOTO=http://l2.io/ip.js?var=myip
Web-Page...

Honestly, the "http://ip.my-proxy.com/" Variant is the easiest because it's easy to grab directly the IP=Address without any manipulation, you don't really care about the time the Web-Page takes to load because anyway your Macro spends most of the time waiting for Mister Godot to come in action and renew your IP-Address...
The Page takes indeed a long time to fully load, but the info that interests you, i.e. your IP-Address is displayed within a few seconds, then you just add a "SET !TIMEOUT 10" before loading that URL and you reset it to 30 sec just afterwards like this:

Code: Select all

VERSION BUILD=8601111 RECORDER=FX
'CLEAR
TAB T=1
SET !ERRORIGNORE YES
'SET !ERRORCONTINUE YES
SET !TIMEOUT_PAGE 30
SET !TIMEOUT_STEP 1
SET !EXTRACT_TEST_POPUP NO
SET !DATASOURCE C:\*********.csv
SET !DATASOURCE_COLUMNS 1
SET !************** "{{!COL1}}"
SET myRealIP "123.123.123.123"
'PROMPT myRealIP:<SP>{{myRealIP}}


URL GOTO=http://www.anyweb1.com
WAIT SECONDS=3

TAB OPEN
TAB T=2
'URL GOTO=http://l2.io/ip.js?var=myip
'TAG POS=1 TYPE=B ATTR=TXT:myip<SP>=
'TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET !TIMEOUT 10
URL GOTO=http://ip.my-proxy.com/
SET !TIMEOUT 10
SET !TIMEOUT_STEP 1
TAG POS=1 TYPE=B ATTR=TXT:Your<SP>IP:
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myIP {{!EXTRACT}}
'PROMPT myIP:<SP>{{myIP}}
SET !EXTRACT NULL
WAIT SECONDS=3

TAB T=1
URL GOTO=http://anyweb2.com
WAIT SECONDS=8
CLICK X=*** Y=***
TAG POS=1 TYPE=A ATTR=ID:*****
TAB T=1
URL GOTO=http://anyweb3.com
WAIT SECONDS=9
CLICK X=**** Y=***
TAG POS=1 TYPE=A ATTR=ID:******

TAB T=2
'URL GOTO=http://l2.io/ip.js?var=myip
'TAG POS=1 TYPE=B ATTR=TXT:myip<SP>=
'TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET !TIMEOUT 10
URL GOTO=http://ip.my-proxy.com/
SET !TIMEOUT 10
SET !TIMEOUT_STEP 1
TAG POS=1 TYPE=B ATTR=TXT:Your<SP>IP:
TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
SET myNewIP {{!EXTRACT}}
PROMPT myNewIP:<SP>{{myNewIP}}<br>myIP:<SP{{myIP}}<br>myRealIP:<SP>{{myRealIP}}

SET !EXTRACT NULL
'Compare myNewIP with myIP:
SET !VAR1 EVAL("if (\"{{myNewIP}}\" == \"{{myIP}}\") {var x = 50;} else {var x = 0;} x;")
SET !VAR2 EVAL("if (\"{{myNewIP}}\" == \"{{myRealIP}}\") {var x = 50;} else {var x = 0;} x;")
PROMPT VAR1:<SP>{{!VAR1}}<br>VAR2:<SP>{{!VAR2}}
ADD !VAR1 {{!VAR2}}
PROMPT VAR1:<SP>{{!VAR1}}<br>(After<SP>adding<SP>VAR1+VAR2...)
WAIT SECONDS={{!VAR1}}

'etc...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
User avatar
loliconth
Posts: 17
Joined: Sat Jan 11, 2014 10:05 am

Re: Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by loliconth » Wed Jan 15, 2014 5:02 am

" chivracq "
but some vpn server it block out to visit " ip.my-proxy.com " :wink:
but ok with " l2.io/ip.js?var=myip " :P
you can make second choice with " l2.io/ip.js?var=myip " ?

Reverential !
Hello iMacros I'm ThZ
User avatar
loliconth
Posts: 17
Joined: Sat Jan 11, 2014 10:05 am

Re: Any way to "WAIT UNTIL IP CHANGE" OR seomthing?

Post by loliconth » Wed Jan 15, 2014 11:04 am

Ahh.... :shock:
i try and try to find website faster than " ip.my-proxy.com "
and i found " whatismyip.com " it ok!
next step i try to find parameter and experimental in imacros
it good result :P

Code: Select all

'URL GOTO=http://ip.my-proxy.com/
'TAG POS=1 TYPE=B ATTR=TXT:Your<SP>IP:
'TAG POS=R1 TYPE=B ATTR=TXT:* EXTRACT=TXT
TAB T=1
SET !TIMEOUT 10
URL GOTO=http://www.whatismyip.com/
SET !TIMEOUT 10
SET !TIMEOUT_STEP 1
TAG POS=1 TYPE=DIV ATTR=TXT:IP:
TAG POS=R1 TYPE=DIV ATTR=TXT:* EXTRACT=TXT
SET myIP {{!EXTRACT}}
'PROMPT myIP:<SP>{{myIP}}
SET !EXTRACT NULL
WAIT SECONDS=3
Hello iMacros I'm ThZ
Post Reply