Sign in to follow this  
Followers 0
furby

Know what I want but just can't achieve it

5 posts in this topic

Hi,

This program is the bee's Knee's, I have been teaching myself how to script with Autoit by pulling apart and adding stuff to example scripts. I have fiddled with this script and it functions fine. Mind you I haven't modified in any brilliant way. Can anyone tell me how I can output the information from the message box to a text file updating with all the links that it fines?.

I have fiddle with the send( & $oLink & ">> c:\temp\myfile.txt") but it doesn't work

; *******************************************************

; Example 1 - Open browser with basic example, get link collection,

; loop through items and display the associated link URL references

; *******************************************************

;

#include <IE.au3>

#include<Array.au3>

#include<File.au3>

Dim $a_Test

#Region --- CodeWizard generated code Start ---

;InputBox features: Title=Yes, Prompt=Yes, Default Text=Yes

If Not IsDeclared("sInputBoxAnswer") Then Local $web

$web = InputBox("Web Content Extractor","Insert your url here to extract the url link from.","www.google.com"," ","-1","-1","-1","-1")

Select

Case @Error = 0 ;OK - The string returned is valid

Case @Error = 1 ;The Cancel button was pushed

Case @Error = 3 ;The InputBox failed to open

EndSelect

#EndRegion --- CodeWizard generated code End ---

$oIE = _IECreate ($web)

$oLinks = _IELinkGetCollection ($oIE)

$iNumLinks = @extended

MsgBox(0, "Link Info", $iNumLinks & " links found")

For $oLink In $oLinks

MsgBox(0, "Link Info", $oLink.href)

Next

Share this post


Link to post
Share on other sites

#2 ·  Posted (edited)

Can anyone tell me how I can output the information from the message box to a text file updating with all the links that it fines?.

FileWriteLine("c:\temp\myfile.txt",$oLink.href)

:shocked:

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

FileWriteLine("c:\temp\myfile.txt",$oLink.href)

:shocked:

Your a legend :(

Share this post


Link to post
Share on other sites

Your a legend :shocked:

Well, a living legend to be precise :(

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