Array := [{Name:Something,Price:$129.99,Option:Brown,Stock:In Stock},{Name:SomethingElse,Price:$119.99,Option:,Stock:Limited Quantity}
. I'm just not sure how to create it. Someone mind tossing me a small bone? FYI if you run the script, prepare for the
UrlDownloadToFile
to take 30 seconds or more.Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus
#SingleInstance, Force
URL := "https://www.overstock.com/registries/wishlists/3119049/Ebay/?view&page=100"
FileName := "overstock.txt"
; Destination := "C:\Users\dgilliland\Desktop\Test\overstock.txt"
Dest_Folder := "C:\Users\Public\Desktop\"
FileArray := []
UrlDownloadToFile, %URL%, % Dest_Folder . FileName
If ErrorLevel <> 0
MsgBox There was a problem
Loop, Files, %Dest_Folder%, F
If (A_LoopFileName = FileName)
Break
Loop, Read, % Dest_Folder . FileName
FileArray.Push(A_LoopReadLine)
Loop % FileArray.MaxIndex()
{
If (InStr(FileArray[A_Index], "wl-item-img"))
{
Name := SubStr(SubStr(FileArray[A_Index+1], InStr(FileArray[A_Index + 1], "alt=")+5),1,-6)
Price := SubStr(SubStr(FileArray[A_Index + 6], InStr(FileArray[A_Index + 6], "$")),1,18)
Option := (InStr(FileArray[A_Index + 8], "<strong>Option:")) ? "Option: " . SubStr(FileArray[A_Index + 8],41) : ""
Stock_Increment := (Option = "") ? 0 : 1
Stock := (Stock_Increment = 0) ? InStr((FileArray[A_Index + 14]), "In Stock") : InStr((FileArray[A_Index + 17]), "In Stock")
Stock := (Stock <> 0) ? "In Stock" : "Limited Quantity"
MsgBox % Name "`n" Price "`n" Option "`n" Quantity "`n" Stock
}
}