Jump to content

Know what I want but just can't achieve it


 Share

Recommended Posts

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

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...