Jump to content

Handling "#" character with Send()


Recommended Posts

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?

Link to comment
Share on other sites

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
Link to comment
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. :)
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
 Share

  • Recently Browsing   0 members

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