Jump to content
Sign in to follow this  
Coldburn

The amazing disapearing octothorpe!

Recommended Posts

Coldburn

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!

Share this post


Link to post
Share on other sites
Gabburd

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

Share this post


Link to post
Share on other sites
PsaltyDS

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.