Regency Posted May 6, 2008 Posted May 6, 2008 I need to compare a section of html to a number. I remember readng somewhere about a html readbetween function. where you put the beginning of the section and the end and it reads the section between the two, anyone remmber the function? i know how to do the script but it hinges if i can find this function... thanks
Regency Posted May 6, 2008 Author Posted May 6, 2008 Ar yu positive this is it? I am looking and thinking about it and i dont think this is it. How would i check and compare There is <span id="ctl00_MainPageContent_lblHandgunFMJStock" style="font-weight:bold;">0</span> Handgun FMJ left. I need to check to see i that "0" goes up to anything. Like i would say if bla blah > 0 then the bla blah would be th compare f the strig i posted above.. any help?
weaponx Posted May 6, 2008 Posted May 6, 2008 $result = _StringBetween ('<span id="ctl00_MainPageContent_lblHandgunFMJStock" style="font-weight:bold;">0</span>', '<span id="ctl00_MainPageContent_lblHandgunFMJStock" style="font-weight:bold;">', '</span>') It would probably be more reliable to use the IE functions to get the value by id.
weaponx Posted May 6, 2008 Posted May 6, 2008 #include <IE.au3> ;$oIE = _IE_Example ("basic") $oIE = _IECreate ("www.yourwebsite.com") $oDiv = _IEGetObjById ($oIE, "ctl00_MainPageContent_lblHandgunFMJStock") ConsoleWrite(_IEPropertyGet($oDiv, "innertext") & @CR)
weaponx Posted May 6, 2008 Posted May 6, 2008 What does consolewrite do?It dumps the value you are trying to get to the SciTe console.
Regency Posted May 6, 2008 Author Posted May 6, 2008 So, by writting it to the consle i can compare it?
weaponx Posted May 6, 2008 Posted May 6, 2008 So, by writting it to the consle i can compare it? This is what you said in your first post: i know how to do the script but it hinges if i can find this function... You can do whatever you want with the output work with me here man: $variable = _IEPropertyGet($oDiv, "innertext") MsgBox(0,"", $variable) If $variable = 666 Then....
Regency Posted May 6, 2008 Author Posted May 6, 2008 lol i am trying to work with you, but i dont understand... And the first post was for the function i couldnt find not the one you offered there is another one) #include <IE.au3> #include <string.au3> $BF = _IECreate("http://www.tmnx.net/Authenticated/bulletfactory.aspx",0,1,1,0) _IELoadWait($BF) $oDiv = _IEGetObjById ($BF, "ctl00_MainPageContent_lblHandgunFMJStock") ConsoleWrite(_IEPropertyGet($oDiv, "innertext") & @CR) $variable = _IEPropertyGet($oDiv, "innertext") If $variable > 0 Then while 1 sleep(100) MsgBox(0,"Sniper FMJ", "G Buy Some") WEnd endif This iswat i got.. kina like you explained,, but all it does it exits...i goes through it all guess but exits
weaponx Posted May 6, 2008 Posted May 6, 2008 When I search for Mafia Network in this forum I find six different topics started by you. I see heavy use of IE functions, did you not write any of that yourself?
Regency Posted May 6, 2008 Author Posted May 6, 2008 I wrote almost all of it, other then the minimize and other random functions. But i havent wrote anything in like 2 months and i am new to this whole fuction way your tellig me. Are you saying i am retarded? sorry i dont know how to do this
weaponx Posted May 6, 2008 Posted May 6, 2008 I wrote almost all of it, other then the minimize and other random functions. But i havent wrote anything in like 2 months and i am new to this whole fuction way your tellig me.Are you saying i am retarded? sorry i dont know how to do thisI haven't said you were retarded. The link in your last post requires a login so your script is failing since it isn't actually logged in. You might be better off using _IEAttach to connect to an already open IE window that is logged in.
Regency Posted May 6, 2008 Author Posted May 6, 2008 No, i am already loggd in. It isnt reading correctly. And i dont know how to work this functon and as you said, there is alot of topics. I need lot of help with my scripts, hence me asking on the forums alot....
weaponx Posted May 6, 2008 Posted May 6, 2008 You are experiencing the same thing as this guy:http://www.autoitscript.com/forum/index.php?showtopic=70624Just because you have an Internet Explorer window open with the game logged in doesn't mean the script has access to the same page. These are two seperate sessions. You will need to add the functionality to the script to login or use _IEAttach instead of _IECreate to access the page.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now