Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

StringUpper not working on a variable?

$
0
0
This is weird. If I use the following code, StringUpper works:
[ autoit ]      
$PC = StringUpper(InputBox($ScriptTitle, "Enter the Computer Name:"))

However, since I have to check for @error based on the input of the InputBox, I had to move it until after the $PC variable was populated, which I figured would work the same, but it's not. If I use the following code, the contents of the $PC variable does not get converted to UPPERCASE characters:

[ autoit ]      
$PC = InputBox($ScriptTitle, "Enter the Computer Name:") If @error = 1 Then Exit StringUpper($PC)

Can someone assist me with how I can convert a variable to all UPPERCASE characters?

Regards,

TX Techie

Viewing all articles
Browse latest Browse all 12506

Trending Articles