Okay, I have isolated the problem, but this requires a genius to figure it out (I'm being serious)
if the title is
MyDocument.jpg @ 6.25% (RGB/8) *
then the hotkey 'a' will always return *YES*
if the title is
MyDocument.jpg @ 25% (RGB/8) *
then the hotkey 'a' will always return *NO*
Code: Select all
a::
winactivate, ahk_class Photoshop
WinGetTitle, Title, A
titleNOW = %Title%
if (!!InStr(titleNOW, "6.25"))
{
msgbox, *YES*, 6.25 is the Title!
}
else
{
msgbox, *NO*, 6.25 is not the Title!
}
..so the above block of code works.
the problem lies somewhere below:
if the title is
MyDocument.jpg @ 6.25% (RGB/8) *
then the hotkey 'b' returns *YES*, but it should return *NO* - this is the problem
if the title is
MyDocument.jpg @ 25% (RGB/8) *
then the hotkey 'b' returns *YES*
Code: Select all
b::
winactivate, ahk_class Photoshop
WinGetTitle, Title, A
titleNOW = %Title%
if (!!InStr(titleNOW, "25"))
{
msgbox, *YES*, 25 is the Title! ;*THIS* is the problem - it should return *NO*
}
else
{
msgbox, *NO*, 25 is not the Title!
}
..so the error is isolated in the above block of code where I inserted the comment.
This is likely one the most difficult scenarios I've faced and my brain just "scrambles" when trying to sort out this logic. It's probably going to take a genius to figure it out but if someone could take a look at it I would be forever greatful. I will continue to work on this but man, I've already burned most of my day on this one LOL
thanks