Skip to content

Commit

Permalink
Added ctrl+i for custom input search by name
Browse files Browse the repository at this point in the history
  • Loading branch information
thirdy committed Oct 3, 2016
1 parent 4852400 commit 099632d
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions TradeMacro.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
; Support for modifiers
; Allow user to customize which mod and value to use

;--------
; NOTE, there's two places where LeagueName is set, one for price check, and one for custom input search
; I can't find a way to get global variable work on included ahk file...
;--------

^x::
IfWinActive, Path of Exile ahk_class Direct3DWindowClass
{
Expand All @@ -15,8 +20,8 @@ IfWinActive, Path of Exile ahk_class Direct3DWindowClass
Sleep 250
TradeMacroMainFunction()
SuspendPOEItemScript = 0 ; Allow Item info to handle clipboard change event
return
}
return
^w::
IfWinActive, Path of Exile ahk_class Direct3DWindowClass
{
Expand All @@ -27,8 +32,29 @@ IfWinActive, Path of Exile ahk_class Direct3DWindowClass
WikiUrl := "http://pathofexile.gamepedia.com/" Item.Name
Run % WikiUrl
SuspendPOEItemScript = 0 ; Allow Item info to handle clipboard change event
return
}
}
return
^i::
IfWinActive, Path of Exile ahk_class Direct3DWindowClass
{
Global X
Global Y
MouseGetPos, X, Y
InputBox,ItemName,Price Check,Item Name,,250,100,X-160,Y - 250,,30,
if ItemName {
RequestParams := new RequestParams_()
LeagueName := "Essence"
RequestParams.name := ItemName
RequestParams.league := LeagueName
Item.Name := ItemName
Payload := RequestParams.ToPayload()
Html := FunctionDoPostRequest(Payload)
ParsedData := FunctionParseHtml(Html, Payload)
SetClipboardContents(ParsedData)
ShowToolTip(ParsedData)
}
}
return
TradeMacroMainFunction()
{
LeagueName := "Essence"
Expand Down

0 comments on commit 099632d

Please sign in to comment.