getting line and parsing not working right

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
idiot
Macro Veteran
Posts: 152
Joined: Thu Mar 01, 2007 9:21 am

getting line and parsing not working right

Post by idiot » Mon Mar 02, 2009 10:43 pm

Code: Select all

Let>HTTP_TIMEOUT=5
Let>HTTP_TIMEOUT=5
HTTPRequest>http://checkip.dyndns.org,,GET,,HTMLResponse
Position>:,HTMLResponse,1,StartPos
Add>StartPos,2
Position><HTMLResponse>Endpos,1
MidStr>HTMLResponse,StartPos,EndPos,YourIP
HTTPRequest>http://customgameauto.com/logs/access.log,,get,info,strHTML,,,,

Pos>YourIP,strHTM,1,p
If>p>0
  Goto>grant

Endif
else>
goto>deny
endif
label>grant
Message>access granted
goto>parse
endif
label>deny
Message>access denied
endif
goto>deny
label>parse
Let>HTTP_TIMEOUT=5
HTTPRequest>http://customgameauto.com/logs/access.log,,get,info,strHTML,,,,
Separate>strHTML,CRLF,lines
Let>k=0
Repeat>k
  Let>k=k+1
  Let>this_line=lines_%k%
  //see if YourIP is in this_line
  Pos>YourIP,this_line,1,pline
    If>pline>0
    Message>yes
    else>
    goto>deny
  Endif
Until>k=lines_count
Day>dd
Month>mm
Year>yyyy
Let>MyDate=
VBSTART
VBEND
VBEval>MonthName(%mm%, True),mm
Concat>MyDate,%dd%/%mm%/%yyyy%
Repeat>j
  Let>j=j+1
  Let>this_line=lines_%j%
  //see if YourIP is in this_line
  Pos>MyDate,strHTM,1,p2
  if>p2=MyDate
     MessageModal>%MyDate% found on Line: %j%
     else>
     goto>deny
  Endif
Until>k=lines_count
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!!!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts