Jump to content

PuTTY and Send function + "<" character


Dondosh
 Share

Recommended Posts

Hi all,

first post here :)

I'm trying to make a script that send command line to PuTTY using the function SEND.

My problem is that when i try to send "<" or ">" the character is not sent.

IE:

Send("mysql > create databases DATABASE_NAME")

Results :

mysql create databases DATABASE_NAME

is outputed in putty console.

I need help, I already try to transform character with Chr and Asc but nothing work.

Thanks a lot !

Link to comment
Share on other sites

Ok i found a workaround ....

Before the send call i do a string replace:

$user = GUICtrlRead($txtUser)
$pass = GUICtrlRead($txtPass)

$pass = StringReplace($pass,"<","{ASC 060}")
;open MySQL monitor
Send("mysql -u " & $user & " --password='"&$pass&"';{ENTER}")

But iknow i got to do this with all breaking character :( Not really elegant .... but it works.

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...