Sign in to follow this  
Followers 0
AutoItUser49

_StringBetween - more explanations

4 posts in this topic

Sup guys, i need a little bit of help for copy and paste in clipboard a value named nameOrMail1 containedin the code source of an URL.

Code source of URL is :

<form name="guestPassForm" method="post" action="/guestpass/pickFriend.do" id="guestPassForm"><input type="hidden" name="org.apache.struts.taglib.html.TOKEN" value="b85dd396164e1e202923819144d2ffcb">
       <div class="gp-body">
           <div class="gp-form inl">             
               
               <label for="firstname" class="send inl " style="height:20px; line-height:20px;">Your First Name:</label>
               <input type="text" name="firstname" maxlength="16" value="" class="send inl">
               <div class="clear"></div>
 
               <div class="hr-dots"></div><div class="clear"></div>
 
               <div class="col2-only bold inl">
                    
                    <a href="javascript:void(0);" onclick="goto('guestPassForm','http://www.pogo.com/guestpass/pickFriend.do?action=chooseFriendList');return false;">Choose from your friend list</a>
               </div>
               <div class="clear"></div>
               <!--Mail-->
                   <label for="nameOrMail1" class="send inl ">
                       Friend's e-mail or <br />Pogo screen name:
                   </label>
 
                   <input type="text" name="nameOrMail1" maxlength="50" value="HereWhatIwant" style="margin-top:5px;" class="send inl">

I dont know what i have to put instead of "?"

$sHTML = _IEBodyReadHTML ($oIE)

$sString = ?

$sStart = ?

$sEnd = ?

_StringBetween ( $sString, $sStart, $sEnd )

and i need the fonction to paste the value in the clipboard.

If anyone could help me please, i looked many topics and tried things that didnt work :-/

Share this post


Link to post
Share on other sites



$String is the string to operate on. $Start is the string to search for before the wanted string. $End is the string to search for after the wanted string. This should do.

;$Website = "http:\\www.pogo.com"
;$Source = _INetGetSource($Website)

_StringBetween($Source, '<label for="', '"')

You will have to change the website. To paste the result look at clipput.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

Thats failed, that copy only "0" in clipboarc :-/

In fact its only the last line i care about in the code source html

<input type="text" name="nameOrMail1" maxlength="50" value="HereWhatIwant" style="margin-top:5px;" class="send inl">

and what i try to copy is HereWhatIwant

I forgot to give u the top of the code source html for identificate the page ;

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ie>
<head>
    
        
        
            <title>[b]Club Pogo: Send a Guest Pass[/b]</title>

Here what ended with :

For $i=1 to 3

$URL1 = $URL & $i

_IENavigate ($oIE, $URL1)

_IELinkClickByText ($oIE, "I Want Word Games")

$Source = _INetGetSource("Club Pogo: Send a Guest Pass")

_StringBetween($Source, '<input type="text" name="nameOrMail1" maxlength="50" value="', '"')

ClipPut (_StringBetween($Source, '<input type="text" name="nameOrMail1" maxlength="50" value="', '"'))

WinWaitActive("Sans titre - Bloc-notes")

Send("^v")

Send("{ENTER}")

Share this post


Link to post
Share on other sites

looks like _INetGetSource doesnt works for the URL. i looked the code source of the URL and the body doesnt stat by <body> but

<body onload="if (window.setupPage) {setupPage()}; if (window.Markup ) Markup.initMarkup();">

i tryed to see code source with ConsoleWrite_INetGetSource'www.pogo.com/guestpass/pickCard.do?action=pick&cardId=card1')) but it doesnt works :-/ idk ... any suggestions?

Share this post


Link to post
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
Sign in to follow this  
Followers 0