Can not get the IF statement to work
I was going to say that using
If (ClipBoard = "Queue") should work. So, what might be going on is whitespace characters being included in the copy and paste. I would guess, not knowing your program, that a "`n" and/oor "`r" character is being captured on the end of the string. Check using to make sure:
StringReplace, ClipBoard, ClipBoard, `n, LF|, 1 ; identifies newline or linefeed (LF) characters StringReplace, ClipBoard, ClipBoard, `r, CR|, 1 ; identifies carriage return (CR) characters StringReplace, ClipBoard, ClipBoard, `t, TAB|, 1 ; identifies tab characters StringReplace, ClipBoard, ClipBoard, %A_Space%, SPACE|, 1 ; identifies space characters MsgBox %ClipBoard%
This will detect if there's any whitespaces captured.
Thank you for that suggestion I ran it and did not come back with any special characters. I also copied the field that I need and then pasted that into my code so that I would pickup anything that I might have missed and yet it still does not change.
But I was able to find what was wrong. So I added a msgbox into the code so that I could see what was in the clipboard when the program ran. What I found was the send ^C was going off before I was in the field that I needed to be in so by adding a sleep 1000 to the code before the send ^c it give the program enough time to get into the field that I needed copied. working code below
Thanks for the idea to use the msgbox to see what was being copied.