Jump to content

Convert Link Text to Link Adress


Recommended Posts

Please check the IE UDF that comes with AutoIt.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

How did you create the embedded IE?

Can you please post the AutoIt code you have so far?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Local $oIE = _IECreateEmbedded()
$Form1 = GUICreate("Prowser", @DesktopWidth-100, @DesktopHeight -100, 5, 5)
$MenuItem1 = GUICtrlCreateMenu("File")
$MenuItem3 = GUICtrlCreateMenuItem("Go to start page", $MenuItem1)
$MenuItem4 = GUICtrlCreateMenuItem("Reload page", $MenuItem1)
$MenuItem5 = GUICtrlCreateMenuItem("Close", $MenuItem1)
$MenuItem2 = GUICtrlCreateMenu("Options")
$MenuItem6 = GUICtrlCreateMenuItem("General Options", $MenuItem2)
GUICtrlSetState(-1, $GUI_DISABLE)
$MenuItem7 = GUICtrlCreateMenuItem("Favorites Options", $MenuItem2)
$Group1 = GUICtrlCreateGroup("Browser", 8, 40, @DesktopWidth-375, 361)
GUICtrlCreateObj($oIE, 12, 56, @DesktopWidth-370, @DesktopHeight -220)

This ^^

Link to comment
Share on other sites

Insert this code in your scriptWith

$oLinks = _IELinkGetCollection($oIE)
Local $iNumLinks = @extended
MsgBox(0, "Link Info", $iNumLinks & " links found")
For $oLink In $oLinks
    ConsoleWrite("Link Info", $oLink.href & " >" & $oLink.innertext & "<" & @CRLF)
Next
You will get a list of all links.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

This example loops through all links on the page and clicks on the link with the specified text ("Contact"):

$sMyString = "Contact" ; Your link text
$oLinks = _IELinkGetCollection($oIE)
For $oLink in $oLinks
    $sLinkText = _IEPropertyGet($oLink, "innerText")
    If StringInStr($sLinkText, $sMyString) Then
        _IEAction($oLink, "click")
        ExitLoop
    EndIf
Next

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Sure. Just change the code a bit:

$aHREF = _GetHREF($oIE, "Contact") ; Your link text
ConsoleWrite($aHREF)
Exit

Func _GetHREF($oIE, $sSearchString)

    Local $oLinks = _IELinkGetCollection($oIE)
    For $oLink In $oLinks
        If $oLink.innertext = $sSearchString Then Return $oLink.href
    Next
    Return ""

EndFunc
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I tested with the page created by _IE_Example and it works fine.

Can you post the complete code you did use to test? Can you post the URL you display in the embedded IE?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

This is the page:

http://en.savefrom.net/#url=http%3A%2F%2Fyoutube.com%2Fwatch%3Fv%3DmhFxw09IX7I

Case $Download
   $aHRef = ""
   $out = StringRegExpReplace(GuiCtrlRead($URL),"http://www.","http://ss")
   _IENavigate($oIE, $out)
   Sleep (3000)
   MsgBox(0,"","Click if site is complete loaded");; I will replace this with a loop cecking if it completle works.
   $aHREF = _GetHREF($oIE, "MP4 360p") ; Your link text
   ConsoleWrite($aHREF)
  If $aHREF="" Then
  MsgBox(0,"","error!")

Else
  MsgBox(0,"",$aHREF)
  EndIf

The Func is at the end of the code.

Link to comment
Share on other sites

There is a lot of Javascript in the source of the page.

Do you get the link you need if you list all links of the page as I posted in #6.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I modified post #6 so you now get the whole text (including spaces etc.) to search for e.g. http://..... >mp4 360<

What do you get for your link?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

This was the output:

Link Info,http://en.savefrom.net/faq.php >Help<
Link Info,http://en.savefrom.net/advertising.php >Advertising<
Link Info,http://ru.savefrom.net/#url=http%3A%2F%2Fyoutube.com%2Fwatch%3Fv%3Dcysf01Ikmj4%26feature%3Dg-logo >0<
Link Info,http://en.savefrom.net/#suppres >Download files from more than 40 web-sites. Fast and free.<
Link Info,http://www.facebook.com/sharer.php?u=http%3A%2F%2Fen.savefrom.net%2F >0<
Link Info,http://twitter.com/share?text=Free+Download+from+Rapidshare%2C+FileFactory.+Free+Download+Videos+from+Youtube%2C+Google%2C+Metacafe+-+SaveFrom.net&url=http%3A%2F%2Fen.savefrom.net%2F >0<
Link Info,https://m.google.com/app/plus/x/?v=compose&content=Free+Download+from+Rapidshare%2C+FileFactory.+Free+Download+Videos+from+Youtube%2C+Google%2C+Metacafe+-+SaveFrom.net%20-%20http%3A%2F%2Fen.savefrom.net%2F >0<
Link Info,http://vk.com/share.php?url=http%3A%2F%2Fen.savefrom.net%2F >0<
Link Info,http://o-o.preferred.ams03s07.v18.lscache8.c.youtube.com/videoplayback?upn=xe5YQ1QD0hU&sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cid%2Cip%2Cipbits%2Citag%2Csource%2Cupn%2Cexpire&fexp=903903%2C919321%2C914102%2C907217%2C907335%2C921602%2C919306%2C919316%2C904455%2C919324%2C904452&algorithm=throttle-factor&itag=5&ip=80.0.0.0&burst=40&sver=3&signature=637DB37DB5A28E172C8EAB2D2DA40E77527CA639.B0D68B391235E9A980D14B89FD360B1B23A06D0A&source=youtube&expire=1337575988&key=yt1&ipbits=8&factor=1.25&cp=U0hSTFVSU19NUkNOMl9NTFdKOklQdWlUNVpyS3JZ&id=732b1fd352249a3e&title=GermanLetsPlay%27s+Highlights+-+%2305+Timmy+begeht+Inzest%21 >FLV 240p<
Link Info,http://o-o.preferred.ams03s07.v3.lscache4.c.youtube.com/videoplayback?upn=xe5YQ1QD0hU&sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cid%2Cip%2Cipbits%2Citag%2Csource%2Cupn%2Cexpire&fexp=903903%2C919321%2C914102%2C907217%2C907335%2C921602%2C919306%2C919316%2C904455%2C919324%2C904452&algorithm=throttle-factor&itag=34&ip=80.0.0.0&burst=40&sver=3&signature=093930D1D91ED60D26A030E6A8D939DA582A5A5E.0D8FEF105BF41062A1027B03CD48957D6B487841&source=youtube&expire=1337575988&key=yt1&ipbits=8&factor=1.25&cp=U0hSTFVSU19NUkNOMl9NTFdKOklQdWlUNVpyS3JZ&id=732b1fd352249a3e&title=GermanLetsPlay%27s+Highlights+-+%2305+Timmy+begeht+Inzest%21 >FLV 360p<
Link Info,http://o-o.preferred.ams03s07.v13.lscache7.c.youtube.com/videoplayback?upn=xe5YQ1QD0hU&sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cid%2Cip%2Cipbits%2Citag%2Csource%2Cupn%2Cexpire&fexp=903903%2C919321%2C914102%2C907217%2C907335%2C921602%2C919306%2C919316%2C904455%2C919324%2C904452&algorithm=throttle-factor&itag=35&ip=80.0.0.0&burst=40&sver=3&signature=15A897C4BA9392A333100E313E1575484F345942.9134A46848F29F313B973F11BC4D83FB20E66CBB&source=youtube&expire=1337575988&key=yt1&ipbits=8&factor=1.25&cp=U0hSTFVSU19NUkNOMl9NTFdKOklQdWlUNVpyS3JZ&id=732b1fd352249a3e&title=GermanLetsPlay%27s+Highlights+-+%2305+Timmy+begeht+Inzest%21 >FLV 480p<
Link Info,http://o-o.preferred.ams03s07.v6.lscache5.c.youtube.com/videoplayback?upn=xe5YQ1QD0hU&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&fexp=903903%2C919321%2C914102%2C907217%2C907335%2C921602%2C919306%2C919316%2C904455%2C919324%2C904452&itag=18&ip=80.0.0.0&signature=A446AEF233A3B992F93C56A13B18CA7F96FD5008.8303346B4F777122D5D6AE8B147267F2DA67E57F&sver=3&ratebypass=yes&source=youtube&expire=1337575988&key=yt1&ipbits=8&cp=U0hSTFVSU19NUkNOMl9NTFdKOklQdWlUNVpyS3JZ&id=732b1fd352249a3e&title=GermanLetsPlay%27s+Highlights+-+%2305+Timmy+begeht+Inzest%21 >MP4 360p<
Link Info,http://o-o.preferred.ams03s07.v6.lscache5.c.youtube.com/videoplayback?upn=xe5YQ1QD0hU&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&fexp=903903%2C919321%2C914102%2C907217%2C907335%2C921602%2C919306%2C919316%2C904455%2C919324%2C904452&itag=22&ip=80.0.0.0&signature=03A8D32A9DFABEEAE3C3EE17A8283F30578B1C44.67CD1C929412ED9C31D11F5299985177B46B43EC&sver=3&ratebypass=yes&source=youtube&expire=1337575988&key=yt1&ipbits=8&cp=U0hSTFVSU19NUkNOMl9NTFdKOklQdWlUNVpyS3JZ&id=732b1fd352249a3e&title=GermanLetsPlay%27s+Highlights+-+%2305+Timmy+begeht+Inzest%21 >MP4 720p<
Link Info,http://o-o.preferred.ams03s07.v15.lscache7.c.youtube.com/videoplayback?upn=xe5YQ1QD0hU&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&fexp=903903%2C919321%2C914102%2C907217%2C907335%2C921602%2C919306%2C919316%2C904455%2C919324%2C904452&itag=43&ip=80.0.0.0&signature=902F2B72D948FC48AF8246BD39A6F83CDCAC7AF0.5303C2629B80C27F8CAFC42A47E9BE97349EC1E2&sver=3&ratebypass=yes&source=youtube&expire=1337575988&key=yt1&ipbits=8&cp=U0hSTFVSU19NUkNOMl9NTFdKOklQdWlUNVpyS3JZ&id=732b1fd352249a3e&title=GermanLetsPlay%27s+Highlights+-+%2305+Timmy+begeht+Inzest%21 >WebM 360p<
Link Info,http://o-o.preferred.ams03s07.v23.lscache4.c.youtube.com/videoplayback?upn=xe5YQ1QD0hU&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&fexp=903903%2C919321%2C914102%2C907217%2C907335%2C921602%2C919306%2C919316%2C904455%2C919324%2C904452&itag=44&ip=80.0.0.0&signature=3024779D9D1C83A7D19745F0B4206D588C003FC2.3C1E9B36EEE3D7391DFCD54E78A919CF5D921682&sver=3&ratebypass=yes&source=youtube&expire=1337575988&key=yt1&ipbits=8&cp=U0hSTFVSU19NUkNOMl9NTFdKOklQdWlUNVpyS3JZ&id=732b1fd352249a3e&title=GermanLetsPlay%27s+Highlights+-+%2305+Timmy+begeht+Inzest%21 >WebM 480p<
Link Info,http://o-o.preferred.ams03s07.v2.lscache6.c.youtube.com/videoplayback?upn=xe5YQ1QD0hU&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&fexp=903903%2C919321%2C914102%2C907217%2C907335%2C921602%2C919306%2C919316%2C904455%2C919324%2C904452&itag=45&ip=80.0.0.0&signature=618DEBC6CA1914F33DE2CE7262DB7C7288B8C1E9.747E96A8504E9BE2B9975082A7B764A7148FCE41&sver=3&ratebypass=yes&source=youtube&expire=1337575988&key=yt1&ipbits=8&cp=U0hSTFVSU19NUkNOMl9NTFdKOklQdWlUNVpyS3JZ&id=732b1fd352249a3e&title=GermanLetsPlay%27s+Highlights+-+%2305+Timmy+begeht+Inzest%21 >WebM 720p<
Link Info,http://o-o.preferred.ams03s07.v1.lscache3.c.youtube.com/videoplayback?el=watch&begin=0&yms=ArfVYfQFcfk&dnc=1&itag=36&ip=80.0.0.0&app=youtube_mobile&signature=457F7B4B8F6FFA5B281138F6490AB93B6AA2A19A.1314DD5C674C7C62624CBF00B71FFCB6D823F509&sparams=begin%2Ccp%2Cid%2Cip%2Cipbits%2Citag%2Clen%2Cratebypass%2Csource%2Cexpire&len=112000&ratebypass=yes&source=youtube&expire=1337575988&sver=3&key=yt1&ipbits=8&cp=U0hSTFVSU19NUkNOMl9NTFdKOkVvZVVCZ1RHaGpv&id=732b1fd352249a3e&title=GermanLetsPlay%27s+Highlights+-+%2305+Timmy+begeht+Inzest%21 >3GP 240p<
Link Info,http://en.savefrom.net/# >More<
Link Info,http://www.youtube.com/watch?v=cysf01Ikmj4 >youtube.com/watch?v=cysf01Ikmj4<
Link Info,http://en.savefrom.net/user.php#helper >SaveFrom.net helper<
Link Info,http://en.savefrom.net/#howtouse >»<
Link Info,http://sfrom.net/http://youtube.com/watch?v=u7deClndzQw >sfrom.net/http://youtube.com/watch?v=u7deClndzQw<
Link Info,http://en.savefrom.net/user.php#bookmarklet >bookmarklets<
Link Info,http://en.savefrom.net/user.php#userjs >UserJS<
Link Info,http://en.savefrom.net/#suppres >»<
Link Info,http://en.savefrom.net/6-download-rapidshare.com-for-free/ >rapidshare.com<
Link Info,http://en.savefrom.net/1-how-to-download-youtube-video/ >youtube.com<
Link Info,http://en.savefrom.net/user.php?helper=chrome >SaveFrom.net helper<
Link Info,http://en.savefrom.net/user.php >SaveFrom.net helper<
Link Info,http://rapidshare.com/ >RapidShare<
Link Info,http://en.savefrom.net/news.php >All news<
Link Info,http://narod.tv/ >0<
Link Info,http://en.savefrom.net/advertising.php >Advertising<
Link Info,http://en.savefrom.net/contact.php >Feedback<
Link Info,http://en.savefrom.net/webmaster.php >For webmasters<
Link Info,http://en.savefrom.net/user.php >For users<
Link Info,http://en.savefrom.net/faq.php >FAQ<
Link Info,javascript:MyOtziv.mo_show_box(); >0<
Link Info,http://idea.informer.com/ >0<
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...