Sign in to follow this  
Followers 0
VelvetElvis

Handling "#" character with Send()

5 posts in this topic

I have an app that erases existing reports, then saves the updated reports by populating the "Save As" box with a variable, using Send()

Ran into a problem this morning, where the text entered in the "Save As" dialog was missing a "#" in the filename. In other words, the Send() function wasn't sending my filename variable properly to the "Save As" box.

In looking at the help file, I see that there are several characters that don't get literally sent (#, !, +, etc.)

How can I deal with these characters, which can't be previously anticipated, as the filenames will change from time to time.

If the only solution involves a regular expression, can someone give me a bit of help in that regard?

Share this post


Link to post
Share on other sites



May try using the ASCII Character code for #

Chr(35)

1 person likes this

If you try to fail and succeed which have you done?AutoIt Forum Search

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Use the 1 flag for Send, to send raw keys, or enclosed special keys in braces {}. Look at some examples below.

Send("#test#", 1) ;Sent raw


Send("{#}test{#}") ;Using braces.

Since you cannot anticipate what the file name will be, I would use the 1 flag.

Adam

Edited by AdamUL

Share this post


Link to post
Share on other sites

Use the 1 flag for Send, to send raw text, or enclosed special keys in braces {}. Look at some examples below.

Send("#test#", 1) ;Sent raw


Send("{#}test{#}") ;Using braces.

Since you cannot anticipate what the file name will be, I would use the 1 flag.

Adam

Thank you so much. I don't know how I ever missed that. :)

Share this post


Link to post
Share on other sites

Glad, I could help.

Adam

Share this post


Link to post
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
Sign in to follow this  
Followers 0