Advertisement
Guest User

Untitled

a guest
Oct 10th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn  ; Enable warnings to assist with detecting common errors.
  3. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  5. #include tf.ahk ;
  6.  
  7. ^!x::
  8.  
  9. Send, ^c
  10. ClipWait
  11. sleep, 1000
  12. buffer := clipboard
  13. MapName := TF_ReadLines(buffer, 2, 2)
  14. NewMapName := StrReplace(MapName, "Superior ", "")
  15. VeryNewMapName := StrReplace(NewMapName, A_Space, "_")
  16. SuperVeryNewMapName := StrReplace(VeryNewMapName, "`n", "")
  17. url := "https://pathofexile.gamepedia.com/" . SuperVeryNewMapName . "_(War_for_the_Atlas)"
  18.  
  19.  
  20. UrlDownloadToFile, %url%, D:\poeparse\1.txt
  21.  
  22. FileRead, ParsedFile, D:\poeparse\1.txt
  23.  
  24. StartPos := RegExMatch(ParsedFile, "<table class=""wikitable sortable item-table"">")
  25.  
  26. EndPos := RegExMatch(ParsedFile, "<td data-sort-value=""1"" class=""tc -value"">1</td></tr>")
  27.  
  28. StringLenght := (EndPos - StartPos)
  29.  
  30.  
  31. ParsedData := SubStr(ParsedFile, StartPos , StringLenght)
  32.  
  33.  
  34. FileRead, ParsedData, D:\poeparse\1.txt
  35.  
  36.  
  37. str := ""
  38.  
  39. Pos=1
  40. While Pos :=    RegExMatch(ParsedData, "<span class=""divicard-header"">(.*?)</span>", m,Pos+StrLen(m))
  41.    str .= ((A_Index=1) ? "" : "`n") m
  42. ;msgbox, % str
  43.  
  44. FiltPage := RegExReplace(str, "<.+?>" , "")
  45.  
  46. ToolTip, Multiline`nTooltip, 100, 150
  47.  
  48. #Persistent
  49. ToolTip, %FiltPage%
  50. SetTimer, RemoveToolTip, -5000
  51. return
  52.  
  53. RemoveToolTip:
  54. ToolTip
  55. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement