Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PoE-TradeMacro/POE-TradeMacro
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.3.4
Choose a base ref
...
head repository: PoE-TradeMacro/POE-TradeMacro
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 357 changed files with 35,444 additions and 13,065 deletions.
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -61,13 +61,17 @@ data_trade/backup/*
backup/*
backup/
test.ahk

config.ini
config_trade.ini
test.txt
DebugFile.txt

lib/node_modules
lib/npm-debug.log.*
*.orig
release
_TradeMacroMain.ahk
_ItemInfoMain.ahk
resources/tests/test_temp/*
resources/tests/tempOutput/*
data/lang/lang.json
test2.ahk
test3.ahk
test4.ahk
Binary file removed Fallback.exe
Binary file not shown.
14 changes: 14 additions & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
_TEMPLATE_ (Remove the explanations here from your post)

Make sure:
* That you have checked the Wiki/FAQ before creating any issue.
* That poe.trade/GGG's website don't have any issues if loading the script takes too long or failes.

Information to include:
* AHK (including 32/64bit) version if you have any kind of script errors.
* Windows version could be relevant.

Fill out everything that may be relevant and remove everything except these informations below:

AHK version:
Windows version:
44 changes: 25 additions & 19 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
[Discord](https://discord.gg/taKZqWw)
[![GitHub All Releases](https://img.shields.io/github/downloads/POE-TradeMacro/POE-TradeMacro/total.svg)](https://github.com/PoE-TradeMacro/POE-TradeMacro/releases)
[![GitHub release](https://img.shields.io/github/release/PoE-TradeMacro/PoE-TradeMacro.svg)](https://github.com/PoE-TradeMacro/POE-TradeMacro/releases/latest)

[ [DISCORD](https://discord.gg/taKZqWw) ] - [ [FORUM](https://www.pathofexile.com/forum/view-thread/1757730) ] - [ [WIKI / FAQ](https://github.com/PoE-TradeMacro/POE-TradeMacro/wiki) ] - [ [VIDEO](https://github.com/PoE-TradeMacro/POE-TradeMacro#media--video) ] [<img src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/PP_logo_h_100x26.png" alt="PayPal Logo">](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4ZVTWJNH6GSME)

-----------------------------------

Welcome to POE-TradeMacro!

**PoE TradeMacro** is an Autohotkey (AHK) script that provides several convenient QoL features for Path of Exile Trading.

This builds on top of [PoE-ItemInfo](https://github.com/aRTy42/POE-ItemInfo) which provides very useful item information on **ctrl+c**.
With TradeMacro, price checking is added via **ctrl+d**, **ctrl+alt+d** or **ctrl+i**. You can also open the items wiki page via **ctrl+w** or open the item search on poe.trade instead via **ctrl+q**.
With TradeMacro, price checking is added via **alt+d**, **alt+shift+d** or **alt+i**. You can also open the items wiki page via **alt+w** or open the item search on poe.trade instead via **alt+q**. (Before TradeMacro version 2.15.3 `ctrl` was used instead of `alt` as defaults).
TradeMacro will be updated to always have the latest PoE-ItemInfo code, you don't have to run their script since it's included here.


@@ -15,7 +20,7 @@ Never completely trust any price checking tool. Inform yourself about what this

#### Usage / Instructions ####

1. Install AHK (http://ahkscript.org)
1. Install AHK (http://ahkscript.org). Don't install AutoHotkey v2.x. PSA: If AHK crashes when starting TradeMacro try and use a different version, `AutoHotkey_1.1.26.01` should always work.
2. Download the [latest release](https://github.com/POE-TradeMacro/POE-TradeMacro/releases/latest) and extract the zip-file.
3. Make sure to run PoE in (borderless) windowed mode. Otherwise it won't work!
4. Run **_Run_TradeMacro.ahk_**.
@@ -29,16 +34,18 @@ Never completely trust any price checking tool. Inform yourself about what this
#### Shortcuts ####


|Shortcut|Description|
|--- |--- |
| ctrl+c | See item info (via PoE-ItemInfo).
| ctrl+d | Search item on poe.trade.
| ctrl+alt+d | Advanced item search.
| ctrl+i | Opens a text input where you can type an item name to search for.
| ctrl+w | Open the items wiki page.
| ctrl+q | Open the item search on poe.trade instead of showing a tooltip with results.
| ctrl+e | Show item age (own listed items).
| ctrl+l | Switch leagues.
|Shortcut|Old Shortcut|Description|
|--- |--- |--- |
| `alt+c` | `ctrl+c` | See item info (via PoE-ItemInfo).
| `alt+d` | `ctrl+d` | Search item on poe.trade.
| `alt+shift+d` | `ctrl+alt+d` | Advanced item search (select mods).
| `alt+i` | `ctrl+i` | Opens a text input where you can type an item name to search for.
| `alt+w` | `ctrl+w` | Open the items wiki page.
| `alt+q` | `ctrl+q` | Open the item search on poe.trade instead of showing a tooltip with results.
| `alt+shift+q` | `ctrl+alt+q` | Open an item on poeapp.com.
| `alt+e` | `ctrl+e` | Show item age (own listed items if account name is specified in settings).
| `alt+l` |`ctrl+l` | Switch leagues.
| `alt+r` | `alt+r` | Copies an item note for premium tabs to your clipboard that creates a valid currency ratio on all trade sites.

#### Additional Macros ####

@@ -52,14 +59,13 @@ See the following pages for more information.

[Go to: Troubleshooting](https://github.com/POE-TradeMacro/POE-TradeMacro/wiki/Troubleshooting)

#### Forum ####
[Go to: Cookie retrieval](https://github.com/PoE-TradeMacro/POE-TradeMacro/wiki/Cookie-retrieval)

[Path of Exile Forum Thread](https://www.pathofexile.com/forum/view-thread/1757730)
[Go to: AdditionalMacros](https://github.com/PoE-TradeMacro/POE-TradeMacro/wiki/AdditionalMacros)

#### Screenshots ####
[Go to: Custom Macros](https://github.com/PoE-TradeMacro/POE-TradeMacro/wiki/Custom-Macros)

![screenshot](http://i.imgur.com/Zw2frfP.png)
#### Media / Video ####

![screenshot](http://i.imgur.com/Q3V9ODC.png)
<a href="https://www.youtube.com/watch?v=D4l8ZOyCAbs" target="_blank">![](http://i.imgur.com/NPsBuJo.png)</a>

![screenshot](http://i.imgur.com/ThuzbtI.png)
112 changes: 31 additions & 81 deletions Run_ItemInfo.ahk
Original file line number Diff line number Diff line change
@@ -1,87 +1,37 @@
; ####################################################################################################
; # This script merges PoE-ItemInfo and AdditionalMacros into one script and executes it.
; # We also have to set some global variables and pass them to the ItemInfo script.
; # This is to support using ItemInfo as dependancy for other tools.
; ####################################################################################################
#Include, %A_ScriptDir%\resources\Version.txt

MsgWrongAHKVersion := "AutoHotkey v" . AHKVersionRequired . " or later is needed to run this script. `n`nYou are using AutoHotkey v" . A_AhkVersion . " (installed at: " . A_AhkPath . ")`n`nPlease go to http://ahkscript.org to download the most recent version."
If (A_AhkVersion < AHKVersionRequired)
{
MsgBox, 16, Wrong AutoHotkey Version, % MsgWrongAHKVersion
ExitApp
; #####################################################################################################################
; # This script checks if the right AHK version is installed and runs the ItemInfo merge script.
; #####################################################################################################################

versionFilePath := A_ScriptDir "\resources\Version.txt"
FileRead, versionFile, %versionFilePath%
error := ErrorLevel

If (not StrLen(versionFile) or error) {
If (RegExMatch(A_ScriptDir, "i)\.zip$")) {
MsgBox, 16, PoE-ItemInfo - Critical error, % "You are trying to run PoE-ItemInfo from inside a zip-archive, please unzip the whole folder. `n`nClosing script..."
ExitApp
} Else {
If (FileExist(versionFilePath)) {
MsgBox, 16, PoE-ItemInfo - Critical error, % "Script couldn't find the file """ A_ScriptDir "\resources\VersionTrade.txt"". `n`nClosing script..."
} Else {
MsgBox, 16, PoE-ItemInfo - Critical error, % "Script couldn't read/access the file """ A_ScriptDir "\resources\VersionTrade.txt"". `n`nClosing script..."
}
ExitApp
}
}

RunAsAdmin()
If (!PoEScripts_CreateTempFolder(A_ScriptDir, "PoE-ItemInfo")) {
ExitApp
Else {
RegExMatch(versionFile, "i)ReleaseVersion.*?:=.*?""(.*?)""", relV)
ReleaseVersion := relV1
RegExMatch(versionFile, "i)AHKVersionRequired.*?:=.*?""(.*?)""", reqV)
AHKVersionRequired := reqV1
}

/*
Set ProjectName to create user settings folder in A_MyDocuments
*/
projectName := "PoE-ItemInfo"
FilesToCopyToUserFolder := ["\resources\config\default_config.ini", "\resources\ahk\default_AdditionalMacros.txt", "\resources\ahk\default_MapModWarnings.txt"]
overwrittenFiles := PoEScripts_HandleUserSettings(projectName, A_MyDocuments, "", FilesToCopyToUserFolder, A_ScriptDir)
isDevelopmentVersion := PoEScripts_isDevelopmentVersion()
userDirectory := A_MyDocuments . "\" . projectName . isDevelopmentVersion

PoEScripts_CompareUserFolderWithScriptFolder(userDirectory, A_ScriptDir, projectName)

/*
merge all scripts into `_ItemInfoMain.ahk` and execute it.
*/
FileRead, info , %A_ScriptDir%\resources\ahk\POE-ItemInfo.ahk
FileRead, addMacros , %userDirectory%\AdditionalMacros.txt

info := info . "`n`r`n`r"
addMacros := "#IfWinActive Path of Exile ahk_class POEWindowClass ahk_group PoEexe" . "`n`r`n`r" . addMacros . "`n`r"

CloseScript("ItemInfoMain.ahk")
FileDelete, %A_ScriptDir%\_ItemInfoMain.ahk
FileCopy, %A_ScriptDir%\resources\ahk\POE-ItemInfo.ahk, %A_ScriptDir%\_ItemInfoMain.ahk

FileAppend, %test% , %A_ScriptDir%\_ItemInfoMain.ahk
FileAppend, %addMacros% , %A_ScriptDir%\_ItemInfoMain.ahk

; set script hidden
FileSetAttrib, +H, %A_ScriptDir%\_ItemInfoMain.ahk
; pass some parameters to ItemInfo
Run "%A_AhkPath%" "%A_ScriptDir%\_ItemInfoMain.ahk" "%projectName%" "%userDirectory%" "%isDevelopmentVersion%" "%overwrittenFiles%"

ExitApp


; ####################################################################################################
; # functions
; ####################################################################################################

CloseScript(Name)
MsgWrongAHKVersion := "AutoHotkey v" . AHKVersionRequired . " or later is needed to run this script. It is important not to run version 2.x. or 1.0. `n`nYou are using AutoHotkey v" . A_AhkVersion . " (installed at: " . A_AhkPath . ")`n`nPlease go to http://ahkscript.org to download the most recent version."
If (A_AhkVersion < AHKVersionRequired or A_AhkVersion >= "2.0.00.00" or A_AhkVersion < "1.1.00.00")
{
DetectHiddenWindows On
SetTitleMatchMode RegEx
IfWinExist, i)%Name%.* ahk_class AutoHotkey
{
WinClose
WinWaitClose, i)%Name%.* ahk_class AutoHotkey, , 2
If ErrorLevel
Return "Unable to close " . Name
Else
Return "Closed " . Name
}
Else
Return Name . " not found"
MsgBox, 16, Wrong AutoHotkey Version, % MsgWrongAHKVersion
ExitApp
}

RunAsAdmin()
{
ShellExecute := A_IsUnicode ? "shell32\ShellExecute":"shell32\ShellExecuteA"
If Not A_IsAdmin
{
If A_IsCompiled
DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_ScriptFullPath, str, A_WorkingDir, int, 1)
Else
DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_AhkPath, str, """" . A_ScriptFullPath . """", str, A_WorkingDir, int, 1)
ExitApp
}
}
Run "%A_AhkPath%" "%A_ScriptDir%\resources\ahk\Merge_ItemInfo.ahk" "%A_ScriptDir%"
ExitApp
133 changes: 41 additions & 92 deletions Run_TradeMacro.ahk
Original file line number Diff line number Diff line change
@@ -1,101 +1,50 @@
; #####################################################################################################################
; # This script checks if the right AHK version is installed and runs the TradeMacro merge script.
; #####################################################################################################################
; # This script merges TradeMacro, TradeMacroInit, PoE-ItemInfo and AdditionalMacros into one script and executes it.
; # We also have to set some global variables and pass them to the ItemInfo/TradeMacroInit scripts.
; # This is to support using ItemInfo as dependancy for TradeMacro.
; #####################################################################################################################
#Include, %A_ScriptDir%\resources\VersionTrade.txt

TradeMsgWrongAHKVersion := "AutoHotkey v" . TradeAHKVersionRequired . " or later is needed to run this script. `n`nYou are using AutoHotkey v" . A_AhkVersion . " (installed at: " . A_AhkPath . ")`n`nPlease go to http://ahkscript.org to download the most recent version."
If (A_AhkVersion < TradeAHKVersionRequired)
{
MsgBox, 16, Wrong AutoHotkey Version, % TradeMsgWrongAHKVersion
ExitApp
}

arguments = %1%
If (!InStr(arguments, "-noelevation", 0)) {
RunAsAdmin()
#SingleInstance, Force
#NoEnv
SetWorkingDir, %A_ScriptDir%

versionFilePath := A_ScriptDir "\resources\VersionTrade.txt"
FileRead, versionFile, %versionFilePath%
error := ErrorLevel

If (not StrLen(versionFile) or error) {
If (RegExMatch(A_ScriptDir, "i)\.zip$")) {
MsgBox, 16, PoE-TradeMacro - Critical error, % "You are trying to run PoE-TradeMacro from inside a zip-archive, please unzip the whole folder. `n`nClosing script..."
ExitApp
} Else {
If (not FileExist(versionFilePath)) {
MsgBox, 16, PoE-TradeMacro - Critical error, % "Script couldn't find the file """ A_ScriptDir "\resources\VersionTrade.txt"". `n`nClosing script..."
} Else {
msg := "Script couldn't read/access the file """ A_ScriptDir "\resources\VersionTrade.txt"". "
msg .= "`n" "Try running this script as admin if you haven't done so already."
msg .= "`n`n" "This could also be caused by some other application blocking AHK from reading the file, like your security suite or some application that snycs the drive/folder that the macro is located in."
msg .= "`n`n" "Closing script..."
MsgBox, 16, PoE-TradeMacro - Critical error, % msg
}
ExitApp
}
}

If (!PoEScripts_CreateTempFolder(A_ScriptDir, "PoE-TradeMacro")) {
ExitApp
Else {
RegExMatch(versionFile, "i)TradeReleaseVersion.*?:=.*?""(.*?)""", relV)
TradeReleaseVersion := relV1
RegExMatch(versionFile, "i)TradeAHKVersionRequired.*?:=.*?""(.*?)""", reqV)
TradeAHKVersionRequired := reqV1
}
StartSplashScreen()

/*
Set ProjectName to create user settings folder in A_MyDocuments
*/
projectName := "PoE-TradeMacro"
FilesToCopyToUserFolder := ["\resources\config\default_config_trade.ini", "\resources\config\default_config.ini", "\resources\ahk\default_AdditionalMacros.txt", "\resources\ahk\default_MapModWarnings.txt"]
overwrittenFiles := PoEScripts_HandleUserSettings(projectName, A_MyDocuments, projectName, FilesToCopyToUserFolder, A_ScriptDir)
isDevelopmentVersion := PoEScripts_isDevelopmentVersion()
userDirectory := A_MyDocuments . "\" . projectName . isDevelopmentVersion

PoEScripts_CompareUserFolderWithScriptFolder(userDirectory, A_ScriptDir, projectName)

/*
merge all scripts into `_TradeMacroMain.ahk` and execute it.
*/
FileRead, info , %A_ScriptDir%\resources\ahk\POE-ItemInfo.ahk
FileRead, tradeInit , %A_ScriptDir%\resources\ahk\TradeMacroInit.ahk
FileRead, trade , %A_ScriptDir%\resources\ahk\TradeMacro.ahk
FileRead, addMacros , %userDirectory%\AdditionalMacros.txt

info := "`n`r`n`r" . info . "`n`r`n`r"
addMacros := "#IfWinActive Path of Exile ahk_class POEWindowClass ahk_group PoEexe" . "`n`r`n`r" . addMacros . "`n`r`n`r"

CloseScript("_TradeMacroMain.ahk")
CloseScript("_ItemInfoMain.ahk")
FileDelete, %A_ScriptDir%\_TradeMacroMain.ahk
FileDelete, %A_ScriptDir%\_ItemInfoMain.ahk
FileCopy, %A_ScriptDir%\resources\ahk\TradeMacroInit.ahk, %A_ScriptDir%\_TradeMacroMain.ahk

FileAppend, %info% , %A_ScriptDir%\_TradeMacroMain.ahk
FileAppend, %addMacros% , %A_ScriptDir%\_TradeMacroMain.ahk
FileAppend, %trade% , %A_ScriptDir%\_TradeMacroMain.ahk

; set script hidden
FileSetAttrib, +H, %A_ScriptDir%\_TradeMacroMain.ahk
; pass some parameters to TradeMacroInit
Run "%A_AhkPath%" "%A_ScriptDir%\_TradeMacroMain.ahk" "%projectName%" "%userDirectory%" "%isDevelopmentVersion%" "%overwrittenFiles%" "isMergedScript"

ExitApp


; ####################################################################################################################
; # functions
; ####################################################################################################################

CloseScript(Name)
TradeMsgWrongAHKVersion := "AutoHotkey v" . TradeAHKVersionRequired . " or later is needed to run this script. It is important not to run version 2.x. or 1.0. `n`nYou are using AutoHotkey v" . A_AhkVersion . " (installed at: " . A_AhkPath . ")`n`nPlease go to http://ahkscript.org to download the most recent version."
If (A_AhkVersion < TradeAHKVersionRequired or A_AhkVersion >= "2.0.00.00" or A_AhkVersion < "1.1.00.00")
{
DetectHiddenWindows On
SetTitleMatchMode RegEx
IfWinExist, i)%Name%.* ahk_class AutoHotkey
{
WinClose
WinWaitClose, i)%Name%.* ahk_class AutoHotkey, , 2
If ErrorLevel
Return "Unable to close " . Name
Else
Return "Closed " . Name
}
Else
Return Name . " not found"
MsgBox, 16, Wrong AutoHotkey Version, % TradeMsgWrongAHKVersion
ExitApp
}

RunAsAdmin()
arguments := ""
Loop, %0% ; For each parameter
{
ShellExecute := A_IsUnicode ? "shell32\ShellExecute":"shell32\ShellExecuteA"
If Not A_IsAdmin
{
If A_IsCompiled
DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_ScriptFullPath, str, A_WorkingDir, int, 1)
Else
DllCall(ShellExecute, uint, 0, str, "RunAs", str, A_AhkPath, str, """" . A_ScriptFullPath . """", str, A_WorkingDir, int, 1)
ExitApp
}
}
arguments .= " " %A_Index%
}

StartSplashScreen() {
SplashTextOn, , 20, PoE-TradeMacro, Merging and starting Scripts...
}
Run "%A_AhkPath%" "%A_ScriptDir%\resources\ahk\Merge_TradeMacro.ahk" "%A_ScriptDir%" %arguments%
ExitApp
10 changes: 0 additions & 10 deletions _compileRelease.ahk

This file was deleted.

File renamed without changes.
Loading