Jump to content

StringTrim help


Damein
 Share

Recommended Posts

Alright, so I am looking to pull certain data from a website, but I am running into a problem.

Here is a snippet of the code:

$sHTML = _IEBodyReadHTML ($PanTask)
    $Result = StringInStr($sHTML, "energy_to_train")
    $Result2 = StringTrimLeft($sHTML, $Result+15)

This part works, in this example it gives me the number 570 + a bunch of HTML.

Now, I know the ending of the HTML final is: /> (Which oddly enough is the ONLY one in the whole HTML file)

So, I thought I could do something like:

$sHTML = _IEBodyReadHTML ($PanTask)
    $Result = StringInStr($sHTML, "energy_to_train")
    $Result2 = StringTrimLeft($sHTML, $Result+15)
    $Result3 = StringInStr($Result2, "/>")
    $Result4 = StringTrimRight($Result2, $Result3)
    MsgBox(0, "Test", $Result4)

And that would give me ONLY the number 570, but it does not, it gives me exactly what I got from $Result2.

Using a MsgBox at $Result3 will give me the number 18000 something, so I know it finds characters to remove, it just doesn't seem to do it.

Thanks in advance, sorry if its confusing :graduated:

Edited by Damein

MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Link to comment
Share on other sites

Can you post the output from the website and tell us what you exactly need from that output?

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Here is the output, the only thing I need is the first three chars, the number 570

570 energy </P>to train 
<DIV id=train_success>Success chance: 35%</DIV></DIV>
<DIV class=action_row_container>
<DIV class=action_row>
<DIV class=train_row_left><IMG class=train_icon src="/images/pages/train/str_icon.jpg"> 
<DIV class=train_stat_info>
<DIV class=stat_name>Strength</DIV>
<DIV class=stat_level id=str_stat>232,042.0</DIV></DIV>
<DIV class=train_stat_amount>
<DIV class=train_desc_using>Increase using</DIV>
<DIV class=train_arrow_container><IMG class=inline_arrow onclick="sub_point('str');" src="/images/pages/train/arrow_left.gif"> 
<DIV id=str_points>0</DIV><IMG class=inline_arrow onclick="add_point('str');" src="/images/pages/train/arrow_right.gif"> </DIV>
<DIV class=train_desc_energy>Energy</DIV></DIV></DIV>
<DIV class=train_row_right><IMG class=use_all onclick="use_all('str');" src="/images/pages/train/btn_use_all.gif"> </DIV></DIV>
<DIV class=action_row>
<DIV class=train_row_left><IMG class=train_icon src="/images/pages/train/def_icon.jpg"> 
<DIV class=train_stat_info>
<DIV class=stat_name>Defense</DIV>
<DIV class=stat_level id=def_stat>321,092.2</DIV></DIV>
<DIV class=train_stat_amount>
<DIV class=train_desc_using>Increase using</DIV>
<DIV class=train_arrow_container><IMG class=inline_arrow onclick="sub_point('def');" src="/images/pages/train/arrow_left.gif"> 
<DIV id=def_points>0</DIV><IMG class=inline_arrow onclick="add_point('def');" src="/images/pages/train/arrow_right.gif"> </DIV>
<DIV class=train_desc_energy>Energy</DIV></DIV></DIV>
<DIV class=train_row_right><IMG class=use_all onclick="use_all('def');" src="/images/pages/train/btn_use_all.gif"> </DIV></DIV>
<DIV class=action_row>
<DIV class=train_row_left><IMG class=train_icon src="/images/pages/train/spd_icon.jpg"> 
<DIV class=train_stat_info>
<DIV class=stat_name>Speed</DIV>
<DIV class=stat_level id=spd_stat>16,038.0</DIV></DIV>
<DIV class=train_stat_amount>
<DIV class=train_desc_using>Increase using</DIV>
<DIV class=train_arrow_container><IMG class=inline_arrow onclick="sub_point('spd');" src="/images/pages/train/arrow_left.gif"> 
<DIV id=spd_points>0</DIV><IMG class=inline_arrow onclick="add_point('spd');" src="/images/pages/train/arrow_right.gif"> </DIV>
<DIV class=train_desc_energy>Energy</DIV></DIV></DIV>
<DIV class=train_row_right><IMG class=use_all onclick="use_all('spd');" src="/images/pages/train/btn_use_all.gif"> </DIV></DIV><BR clear=all></DIV>
<DIV class=total_points>
<TABLE>
<TBODY>
<TR>
<TD>Total Attributes: </TD>
<TD>
<DIV id=attr_total>569,172.2</DIV></TD>
<TD>Total Energy: </TD>
<TD>
<DIV id=point_total>0</DIV></TD></TR></TBODY></TABLE></DIV></DIV>
<DIV id=train_right>
<DIV class=refill_energy>Refill Energy<BR><IMG id=ene_20 onclick=refill_energy_1(); src="/images/pages/train/btn_ene_20.gif"><BR><IMG id=ene_all onclick=refill_energy(); src="/images/pages/train/btn_ene_all.gif"><BR></DIV>
<DIV class=train_right_actions><IMG class=floatleft onclick=split_points(); src="/images/pages/train/btn_split_even.gif"> <IMG class=floatleft id=train_btn onclick=train(); src="/images/pages/train/btn_train.gif"> </DIV>
<DIV class=refill_awake>Refill Awake<BR>
<CENTER><IMG id=awake_all onclick=refill_awake() src="/images/pages/train/btn_awake_all.gif"> 
<DIV class=quick_item_use><SELECT id=itemID name=id> <OPTION id=opt6688371 value=6688371 selected>Snuff (x145508)</OPTION> <OPTION id=opt6751239 value=6751239>Oriental Snuff (x1)</OPTION> <OPTION id=opt6751242 value=6751242>Harsh Coffee (x1)</OPTION></SELECT> <BR>
<DIV class=quick_item_containter><IMG class=floatleft id=use_1 onclick="UseItem('1'); return false;" src="/images/pages/train/btn_use.gif"> <IMG class=floatleft id=use_max onclick="UseItem('max'); return false;" src="/images/pages/train/btn_use_max.gif"> </DIV></DIV></CENTER></DIV></DIV></DIV><BR>
<DIV id=train_bonus>
<DIV class=bonus_box>Black Pearl gives you:<BR><BR>Awake Refill: 
<DIV class=bonus_train_green>70%</DIV>faster<BR>Min. Train Success: 
<DIV class=bonus_train_green>35%</DIV><BR>Energy Refill: 
<DIV class=bonus_train_green>70%</DIV>faster<BR><BR><A href="/index.php?on=elite"><IMG src="/images/pages/train/btn_buy_points.gif" border=0></A> </DIV>
<DIV class=bonus_box>Your house gives you<BR><BR>
<DIV class=bonus_train_green>275+</DIV>awake<BR><BR><A href="/index.php?on=house"><IMG src="/images/pages/train/btn_upgrade_house.gif" border=0></A> </DIV>
<DIV class=bonus_box>Old Captain Hat, Raven Claw Scimitar gives you<BR><BR>
<DIV class=bonus_train_green>25+</DIV>energy<BR><BR><A href="/index.php?on=inventory"><IMG src="/images/pages/train/btn_inventory.gif" border=0></A> </DIV></DIV><BR>
<CENTER><A href="/index.php?on=profile"><IMG src="/images/pages/train/btn_profile.gif" border=0></A></CENTER></DIV></DIV></DIV></DIV></DIV>
<DIV class=col2>
<DIV id=sidebar>
<script>
var confirm_functionname = '';

function confirm_refill (content,confirm_function){
    replaceHTML($('confirm_text'), content);
    //$('confirm_text').update(content);
    confirm_functionname = "usePoints('"+confirm_function+"')";
    $('confirm_refill').show();
}

function confirm_refill_ok(){
    $('confirm_refill').hide();
    try{eval(confirm_functionname);}catch(ex){}
}

function confirm_refill_cancel(){
    $('confirm_refill').hide();
}


function show_profile () {
    document.getElementById('shipbox').style.display='none'; 
    document.getElementById('profilebox').style.display=''; 
    document.getElementById('plink').className='profileactive'; 
    document.getElementById('slink').className='ship'; 
}

function show_ship () {
    document.getElementById('profilebox').style.display='none'; 
    document.getElementById('shipbox').style.display=''; 
    document.getElementById('slink').className='shipactive'; 
    document.getElementById('plink').className='profile';
}
</SCRIPT>

<UL id=tabs>
<LI><A class=profileactive id=plink onclick="show_profile(); return false;" href=""></A></LI>
<LI><A class=ship id=slink onclick=" show_ship(); return false;" href=""></A></LI></UL><!-- Start profile box -->
<DIV id=profilebox>
<DIV class=profile_ship_top>
<DIV class=user_role><B><A style="TEXT-DECORATION: none" href="index.php?on=gang&amp;id=119">[?]</A> <A title="Black (Swashbuckler) [479 RPDays Left]" style="FONT-WEIGHT: bold; COLOR: #33332f" href="index.php?on=profile&amp;user=312153">OoSpawnoO</A> </B><BR>ID: 312153 </DIV></DIV>
<DIV class=profile_ship_content>
<DIV id=profile_info>
<DIV class=user_status><A href="#">Respected</A> <SPAN class=respected_9></SPAN></DIV>
<DIV class=user_avatar><A href="index.php?on=profile"><IMG class=avatar height=95 src="/images/avatars/av-312153.6535.jpg" width=115 align=bottom></A> </DIV>
<DIV class=user_role><B>Captain</B> </DIV>
<DIV class=user-progress-empty id=header_user_level_container title="69718 / 264847">
<DIV class=user-progress id=header_user_progress style="WIDTH: 26%"></DIV>
<DIV class=progress id=header_user_level>Level 536</DIV></DIV>
<DIV id=statbars>
<DIV id=hp_stats><!-- awake start -->
<DIV class=st_awake>
<P><SPAN class=st_title>Awake</SPAN> <SPAN class=st_link><A onclick="confirm_refill('Spend points on Awake? Cost: <b>1 point per 20%</b>. This will refill to your capacity or to the amount of points that you have.','refill_awake')" href="#">Refill</A></SPAN></P>
<DIV class=prog-empty title="275 / 275">
<DIV class=prog-bar id=prog-bar-awake title="275 / 275" style="WIDTH: 100%">&nbsp;</DIV></DIV></DIV><!-- awake end --><!-- hp start -->
<DIV class=st_hp>
<P><SPAN class=st_title>HP</SPAN> <SPAN class=st_link></SPAN></P>
<DIV class=prog-empty title="5440 / 5440">
<DIV class=prog-bar id=prog-bar-hp title="5440 / 5440" style="WIDTH: 100%">&nbsp;</DIV></DIV></DIV><!-- hp end --><!-- nerve start -->
<DIV class=st_nerve>
<P><SPAN class=st_title>Nerve</SPAN> <SPAN class=st_link><A onclick="confirm_refill('Spend points on Nerve? Cost: <b>1 point per 20%</b>. This will refill to your capacity or to the amount of points that you have.','refill_nerve')" href="#">Refill</A></SPAN></P>
<DIV class=prog-empty title="550 / 550">
<DIV class=prog-bar id=prog-bar-nerve title="550 / 550" style="WIDTH: 100%">&nbsp;</DIV></DIV></DIV><!-- nerve end --><!-- Energy start -->
<DIV class=st_energy>
<P><SPAN class=st_title>Energy</SPAN> <SPAN class=st_link><A onclick="confirm_refill('Spend points on Energy? Cost: <b>1 point per 20%</b>. This will refill to your capacity or to the amount of points that you have.','refill_energy')" href="#">Refill</A></SPAN></P>
<DIV class=prog-empty title="570 / 570">
<DIV class=prog-bar id=prog-bar-energy title="570 / 570" style="WIDTH: 100%">&nbsp;</DIV></DIV></DIV><!-- energy end --></DIV><!-- HP end --></DIV>
<DIV id=attributes style="DISPLAY: none">
<CENTER>
<TABLE>
<TBODY>
<TR>
<TH align=left>Strength</TH>
<TD>232,042.0</TD></TR>
<TR>
<TH align=left>Defense</TH>
<TD>321,092.2</TD></TR>
<TR>
<TH align=left>Speed</TH>
<TD>16,038.0</TD></TR>
<TR>
<TH align=left>Total</TH>
<TD>569,172</TD></TR></TBODY></TABLE></CENTER></DIV></DIV>
<DIV class=profile_ship_bottom></DIV></DIV></DIV><!-- profile end --><!-- Start Sea box -->
<DIV id=shipbox style="DISPLAY: none">
<DIV class=profile_ship_top>
<DIV class=user_role><B><A style="TEXT-DECORATION: none" href="index.php?on=gang&amp;id=119">[?]</A> <A title="Black (Swashbuckler) [479 RPDays Left]" style="FONT-WEIGHT: bold; COLOR: #33332f" href="index.php?on=ship">SpaWn</A></B> </DIV></DIV>
<DIV class=profile_ship_content>
<DIV id=ship_info>
<DIV class=user_ship><A href="/index.php?on=ship&amp;_s=18&amp;_p=34&amp;_r=9"><IMG title="My Ship" height=67 alt="ship image" src="/images/ships/12-small.gif" width=147></A> </DIV>
<DIV class=user_role><B>Crew</B></DIV>
<DIV class=sea-progress-empty>
<DIV class=sea-progress id=header_sea_progress title="2591 / 10000" style="WIDTH: 25%"></DIV>
<DIV class=sea-level-progress id=header_sea_level title="2591 / 10000">Level 10</DIV></DIV>
<DIV id=seastatbars><!-- hp start -->
<CENTER>
<TABLE width="80%" align=center>
<TBODY>
<TR>
<TD class=st_title onmouseover="this.innerHTML=$('ship-prog-bar-hp').title" style="WIDTH: 100px; CURSOR: pointer" onmouseout="this.innerHTML='HP'">HP</TD>
<TD><SPAN class=st_link><A href="/index.php?on=inventory&amp;_s=18&amp;_p=5&amp;_r=9&amp;action=repairship">Refill</A></SPAN></TD></TR>
<TR>
<TD colSpan=2>
<DIV class=ship-prog-empty title="6 / 165">
<DIV class=prog-bar id=ship-prog-bar-hp title="6 / 165" style="WIDTH: 3%">&nbsp;</DIV></DIV></TD></TR>
<TR>
<TD class=st_title onmouseover="this.innerHTML=$('ship-prog-bar-supplies').title" style="WIDTH: 100px; CURSOR: pointer" onmouseout="this.innerHTML='Supplies'">Supplies</TD>
<TD><SPAN class=st_link><A href="/index.php?on=point_shop&amp;_s=18&amp;_p=15&amp;_r=9">Refill</A></SPAN></TD></TR>
<TR>
<TD colSpan=2>
<DIV class=ship-prog-empty title="30 / 30">
<DIV class=prog-bar id=ship-prog-bar-supplies title="30 / 30" style="WIDTH: 100%">&nbsp;</DIV></DIV></TD></TR>
<TR>
<TD class=st_title onmouseover="this.innerHTML=$('ship-prog-bar-cargo').title" style="WIDTH: 100px; CURSOR: pointer" onmouseout="this.innerHTML='Cargo'">Cargo</TD>
<TD><SPAN class=st_link></SPAN></TD></TR>
<TR>
<TD colSpan=2>
<DIV class=ship-prog-empty title="0 / 60">
<DIV class=prog-bar id=ship-prog-bar-cargo title="0 / 60" style="WIDTH: 0%">&nbsp;</DIV></DIV></TD></TR>
<TR>
<TD class=st_title onmouseover="this.innerHTML=$('ship-prog-bar-cannons').title" style="WIDTH: 100px; CURSOR: pointer" onmouseout="this.innerHTML='Cannons'">Cannons</TD>
<TD><SPAN class=st_link></SPAN></TD></TR>
<TR>
<TD colSpan=2>
<DIV class=ship-prog-empty title="19 / 20">
<DIV class=prog-bar id=ship-prog-bar-cannons title="19 / 20" style="WIDTH: 95%">&nbsp;</DIV></DIV></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV class=user_ship2 align=center><A href="/index.php?on=sail&amp;_s=18&amp;_p=31&amp;_r=9"><IMG alt="set sail" src="/images/set-sail.gif" border=0></A> </DIV></DIV></DIV>
<DIV class=profile_ship_bottom></DIV></DIV>
<DIV class=menutop></DIV>
<UL class=menucontent>
<LI><A href="/index.php?on=city&amp;_s=14&amp;_p=2&amp;_r=9">City <EM class=rt-em>Monkey Island</EM></A> </LI>
<LI><A href="/index.php?on=train&amp;_s=14&amp;_p=9&amp;_r=9">Training</A> </LI>
<LI><A href="/index.php?on=inventory&amp;_s=14&amp;_p=5&amp;_r=9">Inventory</A> </LI>
<LI><A href="/index.php?on=search&amp;_s=14&amp;_p=23&amp;_r=9">Find Pirates</A> </LI>
<LI><A href="/index.php?on=hospital&amp;_s=14&amp;_p=25&amp;_r=9">Hospital <EM class=rt-em>41 Patients</EM></A></LI>
<LI><A href="/index.php?on=prison&amp;_s=14&amp;_p=24&amp;_r=9">Prison <EM class=rt-em>1 Prisoners</EM></A> </LI>
<LI><A href="/index.php?on=elite&amp;_s=14&amp;_p=35&amp;_r=9">Premium Store</A> </LI>
<LI><A href="/index.php?on=friendlist&amp;_s=14&amp;_p=26&amp;_r=9">Contacts</A> </LI>
<LI><A href="/index.php?on=forum&amp;_s=14&amp;_p=8&amp;_r=9">Forums</A> </LI>
<LI><A onmouseover="self.status='Pirate Quest Chat'; return true;" href="javascript:win1()">The Tavern</A> </LI>
<LI><A href="/index.php?on=newspaper&amp;_s=14&amp;_p=6&amp;_r=9">Town Crier</A> </LI>
<LI style="OVERFLOW: hidden">
<FORM action=#><SELECT class=qfcontrol onchange=location.href=this.options[this.selectedIndex].value name=quicknav> <OPTION value="" selected>Quick Fleet Control</OPTION> <OPTION value=/index.php?on=your_gang&amp;_s=14&amp;_p=7&amp;_r=9>-- Your Fleet</OPTION> <OPTION value=/index.php?on=your_gang&amp;_s=14&amp;_p=7&amp;_r=9&amp;action=vault>-- Vault</OPTION> <OPTION value=/index.php?on=your_gang&amp;_s=14&amp;_p=7&amp;_r=9&amp;action=members>-- Members</OPTION> <OPTION value=/index.php?on=your_gang&amp;_s=14&amp;_p=7&amp;_r=9&amp;action=fight_log&amp;logtype=attack>-- Attack log</OPTION> <OPTION value=/index.php?on=your_gang&amp;_s=14&amp;_p=7&amp;_r=9&amp;action=fight_log&amp;logtype=defense>-- Defense log</OPTION> <OPTION value=/index.php?on=your_gang&amp;_s=14&amp;_p=7&amp;_r=9&amp;action=gang_events>-- Events</OPTION> <OPTION value=/index.php?on=your_gang&amp;_s=14&amp;_p=7&amp;_r=9&amp;action=vault_log>-- Vault log</OPTION> <OPTION value=/index.php?on=your_gang&amp;_s=14&amp;_p=7&amp;_r=9&amp;action=gang_crime>-- Actions</OPTION> <OPTION value=/index.php?on=gangwars&amp;_s=14&amp;_r=9>-- Wars</OPTION></SELECT> </FORM></LI></UL>
<DIV class=menubottom></DIV><!-- End IF NOT HELP -->
<DIV class=left_menu_ad><A href="/index.php?on=elite&amp;_s=14&amp;_p=35&amp;_r=9"><IMG src="/themes/default/images/left_menu/rotate_ads/button-upgrade.jpg" align=center></A> <IMG src="/themes/default/images/left_menu/rotate_ads/button-line.jpg" align=center> <A href="/index.php?on=potd&amp;_s=14&amp;_r=9"><IMG src="/themes/default/images/left_menu/rotate_ads/button-potd.jpg" align=center></A></DIV>
<DIV class=menutop2></DIV><!-- user nav start -->
<UL class=menucontent>
<LI><A href="/index.php?on=killboard&amp;_s=14&amp;_r=9">Kill Board</A> </LI></UL>
<UL class=menucontent>
<LI><A href="/index.php?on=news&amp;_s=14&amp;_p=45&amp;_r=9">News</A> </LI></UL>
<UL class=menucontent>
<LI><A href="/index.php?on=rules&amp;_s=14&amp;_p=40&amp;_r=9">Game Rules</A> </LI></UL>
<UL class=menucontent>
<LI><A onclick="$('200').style.display = 'block'; return false;" href="#">Help Guides</A> </LI></UL>
<UL class=helpmenu id=200>
<LI><A href="/index.php?on=help&amp;_s=14&amp;_r=9&amp;page=4&amp;cat=2">Help Guide</A> </LI>
<LI><A href="/index.php?on=item_guide&amp;_s=14&amp;_p=46&amp;_r=9">Item Guide</A> </LI>
<LI><A href="/index.php?on=ship_guide&amp;_s=14&amp;_p=43&amp;_r=9">Ship Guide</A> </LI>
<LI><A href="/index.php?on=newb_guide&amp;_s=14&amp;_p=47&amp;_r=9">Newbie Guide</A> </LI></UL>
<UL class=menucontent>
<LI><A href="/index.php?on=support&amp;_s=14&amp;_p=39&amp;_r=9">Support</A> </LI></UL>
<UL class=menucontent>
<LI><A href="/index.php?on=logout&amp;_s=14&amp;_p=41&amp;_r=9">Logout</A> </LI></UL><!-- user nav end -->
<DIV class=menubottom></DIV></DIV></DIV></DIV><BR clear=all>
<DIV id=content-bottom>&nbsp;</DIV></DIV></DIV><!-- footer start -->
<DIV id=notice style="DISPLAY: none">
<DIV class=close onclick=noticeOff();></DIV>
<DIV id=notice_content></DIV></DIV>
<DIV id=footercontainer>
<DIV id=footercontainerinner>
<DIV id=footer>
<DIV class=top>
<P>Total pirates: <A href="/index.php?on=search&amp;_s=15&amp;_p=23&amp;_r=9">22,363</A> | Online Now: <A href="/index.php?on=online&amp;_s=15&amp;_p=36&amp;_r=9">142</A> | Online Last 24 hours: <A href="/index.php?on=online&amp;_s=15&amp;_p=36&amp;_r=9" show="24hour">997</A> | <A href="/index.php?on=world&amp;_s=15&amp;_p=32&amp;_r=9">My World</A> </P></DIV>
<DIV class=bottom>
<P><A href="/index.php?on=home&amp;_s=15&amp;_p=29&amp;_r=9">Home</A> | <A href="/tour/?_s=15&amp;_p=37&amp;_r=9">Tour</A> | <A href="/index.php?on=support&amp;_s=15&amp;_p=39&amp;_r=9">Support</A> | <A href="/legal/?_s=15&amp;_p=38&amp;_r=9">TOS &amp; Privacy</A> | <A href="/index.php?on=rules&amp;_s=15&amp;_p=40&amp;_r=9">Rules</A> | Copyright © 2010 <A href="/">Pirate Quest</A> | <A href="http://www.finalmotive.com">Final Motive</A> </P></DIV></DIV></DIV></DIV><!-- outer end -->
<script type=text/javascript>



 </SCRIPT>

<script type=text/javascript> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </SCRIPT>

<script src="http://www.google-analytics.com/ga.js" type=text/javascript></SCRIPT>

<script type=text/javascript> try { var pageTracker = _gat._getTracker("UA-658504-2"); pageTracker._trackPageview(); } catch(err) {}</SCRIPT>
<!--<script src='/js/quests.js'></script>
<script src='/js/fadepopup.js'></script>
<link href="/css/fadepopupquests.css" rel="stylesheet" type="text/css"/> 
--><!-- This is the quest fight popup -->
<DIV id=fade_popup_quests_fight style="DISPLAY: none">
<DIV id=fade_quests></DIV>
<DIV class=fadepopup_npc_fight_block id=fade_popup_quests_fight_block>
<DIV><IMG class=cntrl_fight title=Close onclick="javascript: $('fade_popup_quests_fight_block').hide(); return false;" src="/images/icon_close.png" border=0> </DIV>
<DIV class=fadepopupquestsfight id=fade_popup_quests_msg_fight>
<DIV class=npc_pic_2 id=npc_pic_fight>
<DIV class=npc_pic_fight id=npc_picture_fight></DIV>
<DIV class=npc_name id=npc_name_fight></DIV></DIV>
<DIV class=npc_info_right_fight>
<DIV class=npc_text_fight id=npc_text_fight>
<DIV id=npc_text_inner_fight></DIV></DIV>
<DIV class=npc_text_fight_log id=npc_text_fight_log style="DISPLAY: none"></DIV><BR clear=all><BR clear=all><IMG onclick=show_battle_log() src="/themes/default/images/pages/attack/attack-log.png" align=right> 
<DIV class="lookatme l" id=npc_arrow_fight style="DISPLAY: none"></DIV>
<DIV class=npc_actions id=npc_actions_fight></DIV>
<DIV class=npc_reward id=npc_reward_fight></DIV></DIV>
<DIV class=quest_progress_fight>
<DIV class=quest_book_popup><A class=item_view style="TEXT-DECORATION: underline" onclick="javascript:window.open( '/common/questbook','','left = 20, top = 20, width = 730, height = 530, toolbar = 0, resizable = 1, scrollbars=1' );"><IMG style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none" src="images/gui/quest_popup/small_quest.png" align=absMiddle></A> 
<DIV id=quest_progress_fight style="DISPLAY: inline"></DIV></DIV></DIV></DIV></DIV></DIV><!-- This is the quest popup -->
<DIV id=fade_popup_quests style="DISPLAY: none">
<DIV id=fade_quests></DIV>
<DIV class=fadepopup_npc_quests_block id=fade_popup_quests_block>
<DIV><IMG class=cntrl title=Close onclick="javascript: $('fade_popup_quests').hide(); return false;" src="/images/icon_close.png" border=0> </DIV>
<DIV class=fadepopupquests id=fade_popup_quests_msg>
<DIV class=npc_pic id=npc_pic>
<DIV class=npc_picture id=npc_picture></DIV>
<DIV class=npc_name id=npc_name></DIV></DIV>
<DIV class=npc_reward id=npc_reward></DIV>
<DIV class=npc_info_right>
<DIV class=npc_text id=npc_text>
<DIV id=npc_text_inner></DIV></DIV>
<DIV class="lookatme l" id=npc_arrow style="DISPLAY: none"></DIV>
<DIV class=npc_actions id=npc_actions></DIV></DIV>
<DIV class=quest_progress>
<DIV class=quest_book_popup><A class=item_view style="TEXT-DECORATION: underline" onclick="javascript:window.open( '/common/questbook','','left = 20, top = 20, width = 730, height = 530, toolbar = 0, resizable = 1, scrollbars=1' );"><IMG style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none" src="images/gui/quest_popup/small_quest.png" align=absMiddle></A> 
<DIV id=quest_progress style="DISPLAY: inline"></DIV></DIV></DIV></DIV></DIV></DIV><!-- <link href="/css/fadepopup.css" rel="stylesheet" type="text/css"/> -->
<DIV id=fade_popup style="DISPLAY: none">
<DIV id=fade></DIV>
<DIV class=fadepopup_block id=fade_popup_block>
<DIV><A href="javascript:toggle_fadepopup()"><IMG class=cntrl title=Close style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none" src="/images/icon_close.png"></A> </DIV>
<DIV class=fadepopup id=fade_popup_msg></DIV></DIV></DIV>
<OBJECT id=activitycheck codeBase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 height=0 width=0 classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000><PARAM NAME="_cx" VALUE="26"><PARAM NAME="_cy" VALUE="26"><PARAM NAME="FlashVars" VALUE=""><PARAM NAME="Movie" VALUE="/swf/activitycheck.swf"><PARAM NAME="Src" VALUE="/swf/activitycheck.swf"><PARAM NAME="WMode" VALUE="Window"><PARAM NAME="Play" VALUE="0"><PARAM NAME="Loop" VALUE="-1"><PARAM NAME="Quality" VALUE="High"><PARAM NAME="SAlign" VALUE=""><PARAM NAME="Menu" VALUE="-1"><PARAM NAME="Base" VALUE=""><PARAM NAME="AllowScriptAccess" VALUE="sameDomain"><PARAM NAME="Scale" VALUE="ShowAll"><PARAM NAME="DeviceFont" VALUE="0"><PARAM NAME="EmbedMovie" VALUE="0"><PARAM NAME="BGColor" VALUE=""><PARAM NAME="SWRemote" VALUE=""><PARAM NAME="MovieData" VALUE=""><PARAM NAME="SeamlessTabbing" VALUE="1"><PARAM NAME="Profile" VALUE="0"><PARAM NAME="ProfileAddress" VALUE=""><PARAM NAME="ProfilePort" VALUE="0"><PARAM NAME="AllowNetworking" VALUE="all"><PARAM NAME="AllowFullScreen" VALUE="false">
<embed src="/swf/activitycheck.swf" width="0" height="0" name="activitycheck" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</OBJECT>
<DIV id=m3_tracker_146 style="LEFT: 0px; VISIBILITY: hidden; POSITION: absolute; TOP: 0px"><IMG height=0 alt="" src="http://ads.ad4game.com/www/delivery/ti.php?trackerid=146" width=0></DIV><!-- FACEBOOK -->
<DIV class=" fb_reset" id=fb-root>
<script src="http://connect.facebook.net/en_US/all.js" async="true"></SCRIPT>

<script src="/social/facebook/facebook_login.js" async="true"></SCRIPT>

<DIV style="WIDTH: 0px; POSITION: absolute; TOP: -10000px; HEIGHT: 0px">
<DIV>
<OBJECT id=XdComm type=application/x-shockwave-flash classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 name=XdComm allowscriptaccess="always"><PARAM NAME="_cx" VALUE="5080"><PARAM NAME="_cy" VALUE="5080"><PARAM NAME="FlashVars" VALUE=""><PARAM NAME="Movie" VALUE="http://static.ak.fbcdn.net/rsrc.php/zx/r/DmvbpGB-fMy.swf"><PARAM NAME="Src" VALUE="http://static.ak.fbcdn.net/rsrc.php/zx/r/DmvbpGB-fMy.swf"><PARAM NAME="WMode" VALUE="Window"><PARAM NAME="Play" VALUE="0"><PARAM NAME="Loop" VALUE="-1"><PARAM NAME="Quality" VALUE="High"><PARAM NAME="SAlign" VALUE=""><PARAM NAME="Menu" VALUE="-1"><PARAM NAME="Base" VALUE=""><PARAM NAME="AllowScriptAccess" VALUE="always"><PARAM NAME="Scale" VALUE="ShowAll"><PARAM NAME="DeviceFont" VALUE="0"><PARAM NAME="EmbedMovie" VALUE="0"><PARAM NAME="BGColor" VALUE=""><PARAM NAME="SWRemote" VALUE=""><PARAM NAME="MovieData" VALUE=""><PARAM NAME="SeamlessTabbing" VALUE="1"><PARAM NAME="Profile" VALUE="0"><PARAM NAME="ProfileAddress" VALUE=""><PARAM NAME="ProfilePort" VALUE="0"><PARAM NAME="AllowNetworking" VALUE="all"><PARAM NAME="AllowFullScreen" VALUE="false"></OBJECT></DIV>
<DIV><IFRAME class=FB_UI_Hidden id=f1a9a9f8dafc07a style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none" name=fd738fd711509 src="http://www.facebook.com/extern/login_status.php?api_key=151629744623&amp;display=hidden&amp;extern=2&amp;locale=en_US&amp;method=auth.status&amp;next=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23cb%3Df367431fd6a77dc%26origin%3Dhttp%253A%252F%252Fwww.piratequest.net%252Ff160d896821cc16%26relation%3Dopener%26transport%3Dflash%26frame%3Dfbf6f1ac04eee5%26result%3D%2522xxRESULTTOKENxx%2522&amp;no_session=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23cb%3Df64502cf5941%26origin%3Dhttp%253A%252F%252Fwww.piratequest.net%252Ff160d896821cc16%26relation%3Dparent%26transport%3Dflash%26frame%3Dfbf6f1ac04eee5&amp;no_user=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23cb%3Df2a09e414f269d8%26origin%3Dhttp%253A%252F%252Fwww.piratequest.net%252Ff160d896821cc16%26relation%3Dparent%26transport%3Dflash%26frame%3Dfbf6f1ac04eee5&amp;ok_session=http%3A%2F%2Fstatic.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%23cb%3Df482edbe9ad19%26origin%3Dhttp%253A%252F%252Fwww.piratequest.net%252Ff160d896821cc16%26relation%3Dparent%26transport%3Dflash%26frame%3Dfbf6f1ac04eee5&amp;sdk=joey&amp;session_version=3" frameBorder=0 scrolling=no onload=FB.Content._callbacks.f2b4db7b84e1d2() allowTransparency></IFRAME></DIV></DIV></DIV>
<script type=text/javascript>
    var APP_ID = '151629744623';
  window.fbAsyncInit = function() {
    FB.init({appId: APP_ID, status: true, cookie: true, xfbml: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
  
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = '/social/facebook/facebook_login.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</SCRIPT>
<!-- END FACEBOOK --><!--0.468462 second(s) @ 15:57:13--><BR clear=all></DIV>

This output is made using the code:

$sHTML = _IEBodyReadHTML ($PanTask)
    $Result = StringInStr($sHTML, "energy_to_train")
    $Result2 = StringTrimLeft($sHTML, $Result+15)
    FileWrite($File, $Result2)
Edited by Damein

MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Link to comment
Share on other sites

No doubt cleverer people here might suggest a RegEx, but if the first bit is always the number followed by a space, then stringsplit with " " as delimiter should work. just use the second element of the array - array[1] - the first, array[0], being the number of elements in the array.

William

Edited by saywell
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...