Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- ; #Warn ; Enable warnings to assist with detecting common errors.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- #include tf.ahk ;
- ^!x::
- Send, ^c
- ClipWait
- sleep, 1000
- buffer := clipboard
- MapName := TF_ReadLines(buffer, 2, 2)
- NewMapName := StrReplace(MapName, "Superior ", "")
- VeryNewMapName := StrReplace(NewMapName, A_Space, "_")
- SuperVeryNewMapName := StrReplace(VeryNewMapName, "`n", "")
- url := "https://pathofexile.gamepedia.com/" . SuperVeryNewMapName . "_(War_for_the_Atlas)"
- UrlDownloadToFile, %url%, D:\poeparse\1.txt
- FileRead, ParsedFile, D:\poeparse\1.txt
- StartPos := RegExMatch(ParsedFile, "<table class=""wikitable sortable item-table"">")
- EndPos := RegExMatch(ParsedFile, "<td data-sort-value=""1"" class=""tc -value"">1</td></tr>")
- StringLenght := (EndPos - StartPos)
- ParsedData := SubStr(ParsedFile, StartPos , StringLenght)
- FileRead, ParsedData, D:\poeparse\1.txt
- str := ""
- Pos=1
- While Pos := RegExMatch(ParsedData, "<span class=""divicard-header"">(.*?)</span>", m,Pos+StrLen(m))
- str .= ((A_Index=1) ? "" : "`n") m
- ;msgbox, % str
- FiltPage := RegExReplace(str, "<.+?>" , "")
- ToolTip, Multiline`nTooltip, 100, 150
- #Persistent
- ToolTip, %FiltPage%
- SetTimer, RemoveToolTip, -5000
- return
- RemoveToolTip:
- ToolTip
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement