Code: Select all
#SingleInstance force
#notrayicon
Start:
SetWorkingDir %A_ScriptDir%
FileSelectFile, file,,, Select your Link text file, Data File (*.txt)
FileRead, fileData, %file%
If ErrorLevel = 1
{ Msgbox, 5,No file to work with..?, You must choose a file to read! ; If no file was chosen, show message box offering a retry or cancel option.
IfMsgBox Retry
Goto Start
else
MsgBox,,Bye!,OK, see you soon! ;
ExitApp
}
; Init lineIndex to 1
lineIndex := 1
KeyWait, F3
F3::
Loop, Parse, fileData, `n
{
; A_Index holds the current loop-itteration
if (A_Index == lineIndex) {
clipboard = %A_LoopField%
LinkURL = %clipboard%
;ComObjError(false)
App2IE(URL)
{
For ie in ComObjCreate( "Shell.Application" ).Windows
If InStr(ie.FullName, "iexplore.exe" ) && InStr(ie.LocationURL, URL)
Return ie
}
ie := App2IE(URL)
ie.Visible := True
y = 8
loop, 2
{
ie.Navigate("%LinkURL%")
y++
}
break
}
}
return
~Esc::ExitApp