Skip to content

Commit

Permalink
Ability to Pause script
Browse files Browse the repository at this point in the history
With the Pause Key, the script can now be "paused" to allow other
scripts that look at the clipboard to be used.
  • Loading branch information
Bahnzo committed Apr 2, 2016
1 parent f188aa8 commit 0085a99
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 22 deletions.
59 changes: 39 additions & 20 deletions POE-ItemInfo.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class Globals {
Globals.Set("AHKVersionRequired", AHKVersionRequired)
Globals.Set("ReleaseVersion", ReleaseVersion)
Globals.Set("DataDir", A_ScriptDir . "\data")

global SuspendPOEItemScript = 0

class UserOptions {

Expand Down Expand Up @@ -7828,20 +7828,23 @@ ToolTipTimer:

OnClipBoardChange:
Global Opts
If (Opts.OnlyActiveIfPOEIsFront)
if SuspendPOEItemScript = 0
{
; do nothing if Path of Exile isn't the foremost window
IfWinActive, Path of Exile ahk_class Direct3DWindowClass
If (Opts.OnlyActiveIfPOEIsFront)
{
; do nothing if Path of Exile isn't the foremost window
IfWinActive, Path of Exile ahk_class Direct3DWindowClass
{
ParseClipBoardChanges()
}
}
Else
{
; if running tests parse clipboard regardless if PoE is foremost
; so we can check individual cases from test case text files
ParseClipBoardChanges()
}
}
Else
{
; if running tests parse clipboard regardless if PoE is foremost
; so we can check individual cases from test case text files
ParseClipBoardChanges()
}
return

ShowSettingsUI:
Expand Down Expand Up @@ -8055,14 +8058,30 @@ UnhandledDlg_OK:
Gui, 3:Submit
return

TogglePOEItemScript()
{
if SuspendPOEItemScript = 0
{
SuspendPOEItemScript = 1
ToolTip, POE ItemInfo Script is PAUSED!
}
else
{
SuspendPOEItemScript = 0
ToolTip
}

}

; ############ ADD YOUR OWN MACROS HERE #############
;#IfWinActive Path of Exile ahk_class Direct3DWindowClass ahk_exe PathOfExile.exe
;{
; ^RButton::Send ^c ;cntl-right mouse button send's cntl-c
; ^WheelUp::Send {Left} ;cntl-mouse wheel up toggles stash tabs left
; ^WheelDown::Send {Right} ;cntl-mouse wheel down toggles stash tabs right.
; F1::^c ;changes the control-c to F1 key
; F5::Send {Enter}/remaining{Enter} ;mobs remaining
; F9::Send {Enter}/hideout{Enter} ;goto hideout
; F10::Send {Enter}/global 666{Enter} ;join a channel
;} ;*/
#IfWinActive Path of Exile ahk_class Direct3DWindowClass ahk_exe PathOfExile.exe
{
Pause::TogglePOEItemScript()
;^RButton::Send ^c ;cntl-right mouse button send's cntl-c
;^WheelUp::Send {Left} ;cntl-mouse wheel up toggles stash tabs left
;^WheelDown::Send {Right} ;cntl-mouse wheel down toggles stash tabs right.
;F1::^c ;changes the control-c to F1 key
;F5::Send {Enter}/remaining{Enter} ;mobs remaining
;F9::Send {Enter}/hideout{Enter} ;goto hideout
;F10::Send {Enter}/global 666{Enter} ;join a channel
} ;*/
11 changes: 10 additions & 1 deletion Updates.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
The following is a list of what has been updated, starting with 1.9.3.
Current Script Caretaker: Bahnzo

2.0.12 (future)
2.0.12
=================================
Uniques.txt updated
Added ability to "Pause" the script.
This allows users of other scripts
that look for the clipboard change to
operate. Simply press the "Pause" key
to pause, and then "Pause" again to
re-enable the script. Key can be
remapped to whatever key the user
may like in the section at the very
end of the script.

2.0.11
=================================
Expand Down
2 changes: 1 addition & 1 deletion data/Version.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ReleaseVersion := "2.0.11"
ReleaseVersion := "2.0.12"
AHKVersionRequired := "1.1.05"

0 comments on commit 0085a99

Please sign in to comment.