Created
June 11, 2019 04:55
-
-
Save koosemose/5f583a77433d08c1f4889a48308e5e03 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SingleInstance Force | |
;Instructions for Calibration: | |
;When the script is started the first time, it needs calibrated | |
;Open Enhancement Tray and Convert Subtray | |
;Hover of the first enhancement slot and press F1 | |
;Hover over last enhancement slot and press F1 | |
;Hover over "In-set Conversion" and press F1 | |
;Hover over "Out of set Conversion" and press F1 | |
;Hover over the drop-down menu and press F1 | |
;Hover over "Category: XXXX" in the drop-down menu and press F1 | |
;Hover over the Convert button and press F1 | |
;Hover over the area to drop enhancements to be converted (the close to the | |
; enhancement tray the better) and press F1 | |
; | |
;To operate: | |
;F1 is used in Calibration only | |
;F2 turns off all other Hotkeys (when doing anything other than converting, | |
; this allows the script to be left on, rather than opened and closed when | |
; converting and finishing (or just stopping to sell) | |
;F3 saves you calibration settings (as long as the script exits normally, it saves | |
; anyways, this is just to be sure) | |
;Esc exits | |
;numbers 1-0 on the keyboard select an enhancement to convert | |
;numbers 1-3 on the numberpad select conversion mode | |
;enter on the numpad converts | |
; | |
; A minor assumption is made about layout, it is assumed that you conversion subtray | |
; is attached to the enhancement tray or it is at least as wide as the enhancement | |
; tray and is in line with it as enhancements are drug straight up, rather than to | |
; the exact spot selected (for slightly more speed). | |
; Also it is advised to wait until the previous action is completed before starting | |
; a new one, otherwise the macros will interfere with each other. | |
active :=true | |
IniRead, slot1X, AuctionHelper2.ini, initialization, slot1X, 0 | |
IniRead, slot1Y, AuctionHelper2.ini, initialization, slot1Y, 0 | |
IniRead, slot10X, AuctionHelper2.ini, initialization, slot10X, 0 | |
IniRead, spacing, AuctionHelper2.ini, initialization, spacing, 0 | |
IniRead, inSetX, AuctionHelper2.ini, initialization, inSetX, 0 | |
IniRead, inSetY, AuctionHelper2.ini, initialization, inSetY, 0 | |
IniRead, outSetX, AuctionHelper2.ini, initialization, outSetX, 0 | |
IniRead, outSetY, AuctionHelper2.ini, initialization, outSetY, 0 | |
IniRead, dropDownX, AuctionHelper2.ini, initialization, dropDownX, 0 | |
IniRead, dropDownY, AuctionHelper2.ini, initialization, dropDownY, 0 | |
IniRead, changeCategoryX, AuctionHelper2.ini, initialization, changeCategoryX, 0 | |
IniRead, changeCategoryY, AuctionHelper2.ini, initialization, changeCategoryY, 0 | |
IniRead, changeRarityX, AuctionHelper2.ini, initialization, changeRarityX, 0 | |
IniRead, changeRarityY, AuctionHelper2.ini, initialization, changeRarityY, 0 | |
IniRead, convertX, AuctionHelper2.ini, initialization, convertX, 0 | |
IniRead, convertY, AuctionHelper2.ini, initialization, convertY, 0 | |
IniRead, dropSiteX, AuctionHelper2.ini, initialization, dropSiteX, 0 | |
IniRead, dropSiteY, AuctionHelper2.ini, initialization, dropSiteY, 0 | |
calibration :=0 | |
CoordMode, Mouse, Screen | |
if(slot1X == 0) { | |
ToolTip, Hover over the first Enhancement Slot and press F1 | |
} | |
OnExit("ExitFunc") | |
f2:: | |
active := !active | |
return | |
#if active | |
Escape:: | |
ExitApp | |
Return | |
^f1:: | |
calibration :=0 | |
Return | |
f1:: | |
if(calibration==0) { | |
MouseGetPos, slot1X, slot1Y | |
calibration :=1 | |
ToolTip, Hover over the last Enhancement Slot and press F1 | |
} | |
else if(calibration==1) { | |
MouseGetPos, slot10X | |
spacing := (slot10X - slot1X)/9 | |
calibration :=2 | |
ypos := slot1Y -16 | |
Loop, 10 { | |
xpos := (A_Index - 1) * spacing + slot1X - 16 | |
; SplashImage, %A_Index%:dot.png, B X%xpos% Y%ypos% | |
} | |
ToolTip, Hover over "In Set Conversion" and press F1 | |
} | |
else if(calibration==2) { | |
Loop, 10 { | |
SplashImage, %A_Index%:Off | |
} | |
MouseGetPos, inSetX, inSetY | |
ToolTip, Hover over "Out of Set Conversion" and press F1 | |
calibration :=3 | |
} | |
else if(calibration==3) { | |
MouseGetPos, outSetX, outSetY | |
ToolTip, Hover over the dropdown menu for out of set and press F1 | |
calibration :=4 | |
} | |
else if(calibration==4) { | |
MouseGetPos, dropDownX, dropDownY | |
ToolTip, Hover over "Rarity: XXXX" in the dropdown menu and press F1 | |
ToolTip, Hover over "Category: XXXX" in the dropdown menu and press F1 | |
calibration :=6 | |
} | |
else if(calibration==5) { | |
MouseGetPos, changeCategoryX, changeCategoryY | |
ToolTip, Hover over "Category: XXXX" in the dropdown menu and press F1 | |
calibration :=6 | |
} | |
else if(calibration==6) { | |
MouseGetPos, changeRarityX, changeRarityY | |
ToolTip, Hover over "Convert" Button and press F1 | |
calibration :=7 | |
} | |
else if(calibration==7) { | |
MouseGetPos, convertX, convertY | |
ToolTip, Hover over where to drop enhancements to be converted and press F1 | |
calibration :=8 | |
} | |
else if(calibration==8) { | |
MouseGetPos, dropSiteX, dropSiteY | |
ToolTip | |
calibration :=0 | |
} | |
return | |
NumPad1:: | |
MouseClick,,%inSetX%, %inSetY% | |
Sleep,10 | |
MouseClick,,%inSetX%, %inSetY% | |
Return | |
NumPad2:: | |
MouseClick,,%outSetX%, %outSetY% | |
Sleep,10 | |
MouseClick,,%outSetX%, %outSetY% | |
Return | |
NumPad3:: | |
MouseClick,,%outSetX%, %outSetY% | |
MouseClick,,%dropDownX%, %dropDownY% | |
Sleep,10 | |
mouseClick,,%changeRarityX%, %changeRarityY% | |
Return | |
1:: | |
DragEnh(1) | |
Return | |
2:: | |
DragEnh(2) | |
Return | |
3:: | |
DragEnh(3) | |
Return | |
4:: | |
DragEnh(4) | |
Return | |
5:: | |
DragEnh(5) | |
Return | |
6:: | |
DragEnh(6) | |
Return | |
7:: | |
DragEnh(7) | |
Return | |
8:: | |
DragEnh(8) | |
Return | |
9:: | |
DragEnh(9) | |
Return | |
0:: | |
DragEnh(10) | |
Return | |
NumPadEnter:: | |
MouseClick,,convertX,convertY | |
Sleep,10 | |
MouseClick,,convertX,convertY | |
Return | |
f3:: | |
ExitFunc(0,0) | |
Return | |
#if | |
DragEnh(slotNum) { | |
global slot1X | |
global spacing | |
global slot1Y | |
global dropSiteY | |
xloc := slot1X+((slotNum-1) * spacing) | |
Drag(xloc,slot1Y,xloc,dropSiteY) | |
} | |
Drag(ax,ay,bx,by) { | |
Send {Click %ax%, %ay%,0} | |
sleep,100 | |
Send {LButton down} | |
sleep,500 | |
Send {Click %bx%, %by%,0} | |
sleep,100 | |
Send {LButton up} | |
} | |
ExitFunc(ExitReason, ExitCode) | |
{ | |
global slot1X | |
global slot1Y | |
global slot10X | |
global spacing | |
global inSetX | |
global inSetY | |
global outSetX | |
global outSetY | |
global dropDownX | |
global dropDownY | |
global changeCategoryX | |
global changeCategoryY | |
global changeRarityX | |
global changeRarityY | |
global convertX | |
global convertY | |
global dropSiteX | |
global dropSiteY | |
IniWrite, %slot1X%, AuctionHelper2.ini, initialization, slot1X | |
IniWrite, %slot1Y%, AuctionHelper2.ini, initialization, slot1Y | |
IniWrite, %slot10X%, AuctionHelper2.ini, initialization, slot10X | |
IniWrite, %spacing%, AuctionHelper2.ini, initialization, spacing | |
IniWrite, %inSetX%, AuctionHelper2.ini, initialization, inSetX | |
IniWrite, %inSetY%, AuctionHelper2.ini, initialization, inSetY | |
IniWrite, %outSetX%, AuctionHelper2.ini, initialization, outSetX | |
IniWrite, %outSetY%, AuctionHelper2.ini, initialization, outSetY | |
IniWrite, %dropDownX%, AuctionHelper2.ini, initialization, dropDownX | |
IniWrite, %dropDownY%, AuctionHelper2.ini, initialization, dropDownY | |
IniWrite, %changeCategoryX%, AuctionHelper2.ini, initialization, changeCategoryX | |
IniWrite, %changeCategoryY%, AuctionHelper2.ini, initialization, changeCategoryY | |
IniWrite, %changeRarityX%, AuctionHelper2.ini, initialization, changeRarityX | |
IniWrite, %changeRarityY%, AuctionHelper2.ini, initialization, changeRarityY | |
IniWrite, %convertX%, AuctionHelper2.ini, initialization, convertX | |
IniWrite, %convertY%, AuctionHelper2.ini, initialization, convertY | |
IniWrite, %dropSiteX%, AuctionHelper2.ini, initialization, dropSiteX | |
IniWrite, %dropSiteY%, AuctionHelper2.ini, initialization, dropSiteY | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment