AutoItUser49 Posted July 20, 2009 Posted July 20, 2009 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 :-/
dantay9 Posted July 20, 2009 Posted July 20, 2009 $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.
AutoItUser49 Posted July 20, 2009 Author Posted July 20, 2009 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 HereWhatIwantI 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}")
AutoItUser49 Posted July 20, 2009 Author Posted July 20, 2009 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?
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