Jump to content
Sign in to follow this  
aslani

Quotation Mark and Send()

Recommended Posts

aslani

$var1 = "REV """ & $rev & """"
$var2 = "REV " & Chr(34) & $rev & Chr(34)
$var3 = 'REV "' & $rev & '"'

Send($var1)
Send($var2)
Send($var3)

They all come out like this;

REV "A1

without the end quotation mark. Not really sure why. Any advice?

EDIT:

By the way, when I view it using MsgBox(), the end quotation is there.

Edited by aslani

[font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version

Share this post


Link to post
Share on other sites
enaiman

I don't know where are you sending these but this basic example works fine - I can see everything fine in Notepad.

Run("notepad.exe")
WinActivate("Untitled - Notepad")
$rev = "A"
$var1 = "REV """ & $rev & """"
$var2 = "REV " & Chr(34) & $rev & Chr(34)
$var3 = 'REV "' & $rev & '"'
Send($var1)
Sleep(500)
Send($var2)
Sleep(500)
Send($var3)
Edited by enaiman

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 :)

Share this post


Link to post
Share on other sites
aslani

I'm sorry but I found the culprit, it's my StringReg.

StringRegExp($rev, ".{1,60}\b\.?", 3)

Ok start over.

The StringReg is to insure that the characters per line won't exceed 60 characters, but as you can see, it strips the last quotation because of the "\b" and to get the quotation, I have to use "\B", but not both of them at the same time (or can I?).

Any idea how to fix my StringReg pattern?


[font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version

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.