Advertisement
etofok

PathOfExile EzPrice

Sep 26th, 2016
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Path of Exile EzPrice v011016
  2. ; Hover on item and press the hotkey. It'll retrieve the name of that item, open a new browser tab with poe.trade, paste the name and search for it. Easy way to price-check that I've done primarily for myself, just wanted to share.
  3.  
  4. ; I'd advise to map the script onto some macro hotkey like ctrl+numpad7 (^Numpad7)
  5.  
  6. ; Save this code and as .ahk (dl Autohotkey if you don't have it)
  7.  
  8.  
  9.  
  10.  
  11. #IfWinActive Path of Exile
  12.  
  13. #c:: ; Windows - C   <------------------ T H E   H O T K E Y ------- Look up there https://autohotkey.com/docs/KeyList.htm
  14.  
  15.     clipboard =     ; Empty the clipboard
  16.     Sleep, 50
  17.     Send, ^c        ; Ctrl - C
  18.  
  19.     ClipWait, 1.5
  20.    
  21.     If clipboard=
  22.     {
  23.         Tooltip, No item data
  24.         SetTimer, RemoveToolTip, 1500      
  25.         return
  26.     }
  27.  
  28.     ClipSaved := clipboard
  29.  
  30.     StringReplace ClipSaved, ClipSaved, <<set:MS>><<set:M>><<set:S>>, , A
  31.     ItemNameStartPos = % InStr(ClipSaved, "`r", false, 1, 1) ; 1st carriage return symbol
  32.     ItemNameEndPos = % InStr(ClipSaved, "--", false) ; "--------"
  33.  
  34.     ItemNameLength := (ItemNameEndPos - ItemNameStartPos)
  35.  
  36.     StringMid, OutputResult, ClipSaved, ItemNameStartPos + 2, ItemNameLength - 4
  37.     Sleep, 50  
  38.  
  39.     Clipboard = %OutputResult%
  40.     Tooltip, %OutputResult%
  41.     SetTimer, RemoveToolTip, 2500
  42.  
  43.     ; >-->
  44.     ; this is the part that opens your browser. If you prefer this script to only copy the name of the item, delete this part (leave return)
  45.  
  46.     Run, http://poe.trade/search
  47.     Sleep, 2500         ; if your PC is slow, up this number. <-------------------------
  48.     Send, ^v
  49.     Sleep, 300
  50.     Send {Enter}
  51.     ; >-->
  52. return
  53.  
  54.  
  55.  
  56. RemoveToolTip:
  57.  
  58.     SetTimer, RemoveToolTip, Off
  59.     ToolTip
  60.  
  61. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement