help with - if statement with a string
Posted: 03 Dec 2021, 03:36
im having trouble remembering how to do this. i have output from a command into the clip. the results are true or false. so if true do this, if false do this. sounds simple but im missing something. my code is below.
many thanks as always:)
edit-- another thing i noticed is if i ouput to text doc, it has a return after the string. the msgbox shows up correct and the output to the text doc except for the return after it.
Code: Select all
runwait, powershell -Command "$DGVerifyWarn.Length -ne 0" | Clip,, Hide
DG_Enabled = %clipboard%
StringReplace, DG_Enabled, DG_Enabled, " ", , All
msgbox %DG_Enabled%
if (DG_Enabled = "False")
Gui,1:Add, Text, +Center Cred x10 y435 w130 h30 , DG_Disabled
if (DG_Enabled = "True")
Gui,1:Add, Text, +Center cLime x10 y435 w130 h30 , DG_Enabled
edit-- another thing i noticed is if i ouput to text doc, it has a return after the string. the msgbox shows up correct and the output to the text doc except for the return after it.