Skip to content

Commit

Permalink
Improve Soundiron overlay usability if product images not found
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejGolian committed Dec 11, 2024
1 parent 79dc14d commit 1203e8b
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions Includes/Overlays/KontaktKompleteKontrol/Soundiron.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,21 @@ Class Soundiron {
Static ClickFXRack(ButtonObj) {
PluginClass := SubStr(This.Prototype.__Class, 1, InStr(This.Prototype.__Class, ".") - 1)
OverlayObj := ButtonObj.GetMasterControl()
Image := OverlayObj.Metadata["Image"]
If Image Is Map
Image := Image["File"]
If ImageSearch(&FoundXCoordinate, &FoundYCoordinate, 0, 0, A_ScreenWidth, A_ScreenHeight, Image) {
Switch OverlayObj.Metadata["Product"] {
Case "Mimi Page Light & Shadow":
If PixelGetColor(This.%PluginClass%XOffset + CompensatePluginXCoordinate(162), This.%PluginClass%YOffset + CompensatePluginYCoordinate(652)) = "0x575757" {
Click This.%PluginClass%XOffset + CompensatePluginXCoordinate(162), This.%PluginClass%YOffset + CompensatePluginYCoordinate(652)
Sleep 250
}
Case "Voices Of Gaia":
If PixelGetColor(This.%PluginClass%XOffset + CompensatePluginXCoordinate(155), This.%PluginClass%YOffset + CompensatePluginYCoordinate(582)) = "0x575757" {
Click This.%PluginClass%XOffset + CompensatePluginXCoordinate(155), This.%PluginClass%YOffset + CompensatePluginYCoordinate(582)
Sleep 250
}
Case "Voices of Wind Collection":
If PixelGetColor(This.%PluginClass%XOffset + CompensatePluginXCoordinate(164), This.%PluginClass%YOffset + CompensatePluginYCoordinate(663)) = "0x565656" {
Click This.%PluginClass%XOffset + CompensatePluginXCoordinate(164), This.%PluginClass%YOffset + CompensatePluginYCoordinate(663)
Sleep 250
}
Switch OverlayObj.Metadata["Product"] {
Case "Mimi Page Light & Shadow":
If PixelGetColor(This.%PluginClass%XOffset + CompensatePluginXCoordinate(162), This.%PluginClass%YOffset + CompensatePluginYCoordinate(652)) = "0x575757" {
Click This.%PluginClass%XOffset + CompensatePluginXCoordinate(162), This.%PluginClass%YOffset + CompensatePluginYCoordinate(652)
Sleep 250
}
Case "Voices Of Gaia":
If PixelGetColor(This.%PluginClass%XOffset + CompensatePluginXCoordinate(155), This.%PluginClass%YOffset + CompensatePluginYCoordinate(582)) = "0x575757" {
Click This.%PluginClass%XOffset + CompensatePluginXCoordinate(155), This.%PluginClass%YOffset + CompensatePluginYCoordinate(582)
Sleep 250
}
Case "Voices of Wind Collection":
If PixelGetColor(This.%PluginClass%XOffset + CompensatePluginXCoordinate(164), This.%PluginClass%YOffset + CompensatePluginYCoordinate(663)) = "0x565656" {
Click This.%PluginClass%XOffset + CompensatePluginXCoordinate(164), This.%PluginClass%YOffset + CompensatePluginYCoordinate(663)
Sleep 250
}
}
}
Expand Down

0 comments on commit 1203e8b

Please sign in to comment.