Jump to content

The amazing disapearing octothorpe!


Recommended Posts

I wrote a quick script to parse a file and print a report out to notepad. One of the descriptions in the report has a # in it, but it's not appearing in notepad! Check this out...

$sMsg = "This is the octothorpe -> #"

Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
Send($sMsg & @CR)

Do I have to escape it somehow or ? I've tried using the Chr() function too but still doesn't work!

Thanks!

Link to comment
Share on other sites

If you want to send an octothorpe than it needs to be in brackets, try this:

$sMsg = "This is the octothorpe -> {#}"

Run("notepad.exe")
WinWaitActive("Untitled - Notepad")
Send($sMsg & @CR)oÝ÷ Ø(ºWlº²Û¬xºÚ"µÍÛÛÛÙ]^
    ][ÝÕ[]YHÝY   ][ÝË  ][ÝÉ][ÝË    ][ÝÑY]I][ÝË ÌÍÜÓÙÈ    [ÈÔ
Edited by Gabburd
Link to comment
Share on other sites

Read the help file on the Raw Flag for Send(). The "#" is being interpreted as the Window-key:

Send($sMsg & @CR, 1)

:shocked:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...