is there a way to read text from a website without open ie?
Moderators: JRL, Dorian (MJT support)
is there a way to read text from a website without open ie?
basically was wanting to have a website store ip adresses on a page and then when i run a macro have it detect my ip adress and see if it matches one that i have on a website i have no code and no idea how to do any of this
if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
If it's a basic web page you should just be able to retrieve it with HTTPRequest. This will retrieve the data to a variable which you can then parse.
HTTPRequest will get more tricky if the page is something you need to log into and cookies are required to track the session.
HTTPRequest will get more tricky if the page is something you need to log into and cookies are required to track the session.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
ok i get that looked up command very simple but how would i scan my pc with a macro scheduler script like how to get it to look for what my ip adress is?
if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Try this UNTESTED script that should work to get the IP of your computer.
(Based on XP PRO, Macro Scheduler 11.1)
Code: Select all
Let>RP_WAIT=1
Let>RP_WINDOWMODE=2
RunProgram>cmd /c ipconfig /all >temp.txt
ReadFile>temp.txt,vTempIP
DeleteFile>temp.txt
Position>IP Address,%vTempIP%,1,vStart
Add>vStart,18
MidStr>%vTempIP%,%vStart%,15,vIP
MessageModal>IP address is %vIP%
Last edited by Bob Hansen on Mon Jan 26, 2009 12:31 am, edited 1 time in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
I'm guessing you want the external IP, and not the LAN IP, so this should work:
[code]
Let>HTTP_TIMEOUT=5
HTTPRequest>http://checkip.dyndns.org,,GET,,HTMLResponse
Position>:,HTMLResponse,1,StartPos
Add>StartPos,2
Position>Endpos,1
MidStr>HTMLResponse,StartPos,EndPos,YourIP
MessageModal>YourIP
[/code]
Original discussion here http://www.mjtnet.com/forum/viewtopic.p ... whatismyip
[code]
Let>HTTP_TIMEOUT=5
HTTPRequest>http://checkip.dyndns.org,,GET,,HTMLResponse
Position>:,HTMLResponse,1,StartPos
Add>StartPos,2
Position>Endpos,1
MidStr>HTMLResponse,StartPos,EndPos,YourIP
MessageModal>YourIP
[/code]
Original discussion here http://www.mjtnet.com/forum/viewtopic.p ... whatismyip
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Here is another one for the external WAN IP:
First one I submitted for LAN was not tested originally, but it works OK for me now that I can try it.
How does it not work for you? If you cut/paste from forum, did you remove any trailing spaces?
Code: Select all
HTTPRequest>http://www.ip-adress.com/,temp.txt,GET
ReadFile>temp.txt,vTempIP
Position>My IP address:,%vTempIP%,1,vStart
Add>vStart,15
MidStr>%vTempIP%,%vStart%,15,vIP
StringReplace>%vIP%,<,,vIP
StringReplace>%vIP%,/,,vIP
StringReplace>%vIP%,s,,vIP
StringReplace>%vIP%,p,,vIP
MessageModal>IP address is %vIP%
DeleteFile>temp.txt
How does it not work for you? If you cut/paste from forum, did you remove any trailing spaces?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!