Inside of my clipboard is text "12345"
I call function countNumberOfCharecters and it returns 5.
Then I check it if(%numberOfCharactersInClipboard%=5)
I expected that it will show "MsgBox, number of character is five"
But due to some reason "MsgBox, %numberOfCharactersInClipboard%" esecuted
This meant that AHK thinks that 5 is not equal to 5.
I suppose i made a mistake somewhere in code but can not find that. Could you help me with that?
Code: Select all
numberOfCharactersInClipboard := countNumberOfCharecters(clipboard)
if(%numberOfCharactersInClipboard%=5)
{
MsgBox, number of character is five
} else
{
MsgBox, %numberOfCharactersInClipboard%
}
countNumberOfCharecters(str)
{
T=%str%
Loop, Parse, t
a++
Return, a
}