Jump to content

ControlCommand and 'String'

Recommended Posts

Hi AutoIters!

First, greeting to the forums!

Second, my problem:

Briefly: My problem is probably rooted in the difference between "string" and 'string'.

Longer: I'd like to select a combobox entry. The entries change, hence it's impossible to address the number of the entry. I'd like to copy a string out of excel and select it in the combobox.

The selection of the combobox essentially works (Handle and Syntax should be ok):


However, selection based on a variable fails:


I also striped the string of the carriage return which seem to come from excel:


No luck either. Neither with experiments with StringToASCIIArray(). I remember from C that there was a difference between "string" and 'string'. The documentation lists in this context also 'string' but I'm at loss how this is to be done.

Thanks for a hint!

Cheers illuminon

Link to comment
Share on other sites

Welcome to the forum,

There isn't really a difference between "string" and 'string' - you can see that here:

$a = "string"
$b = 'string'
MsgBox(0, "", "$a = "&$a&", $b = "&$b)

So, if the selection works with the string value and it doesn't when using a variable - the variable content is not the one expected. Consider using a msgbox to display the content of your $string variable. If it does look the same - look for non-printable characters (@CR, @LF and others ...).

What is the string you try to read from Excel?

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...