Hello all, once again I come to request the great help of the individuals in this forum.
I'm trying to write a script that will copy the contents of a cell in Excel and store the contents in a variable. I will then use the contents of this variable to compare to a constant. The problem I'm having is that even when the statement is true, it goes to the else part of the If clause. What I have so far is below:
$iShpCnd = ClipGet()
MsgBox(0,$iShpCnd, $iShpCnd)
If $iShpCnd = "02" then
MsgBox(0,"First IF", $iShpCnd)
WinActivate("XXXXXX")
WinWaitActive("XXXXXX")
MouseClick("left", 117, 337, 1)
Send("02")
Send("{Enter}")
Else
MsgBox(0,"Else", $iShpCnd)
WinActivate("XXXXXX")
WinWaitActive("XXXXXX")
MouseClick("left", 117, 337, 1)
Send("LD")
Send("{Enter}")
EndIf
The "02" is stored as text in Excel, that's why I put it between "" in AutoIT. I tried putting switching the comparison, but it still goes to Else nonetheless.
I really appreciate if anyone can shed a light on this.