Dondosh Posted October 17, 2012 Share Posted October 17, 2012 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 More sharing options...
JohnOne Posted October 17, 2012 Share Posted October 17, 2012 Send("mysql > create databases DATABASE_NAME", 1) ; note the 1 flag <- help file AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Dondosh Posted October 17, 2012 Author Share Posted October 17, 2012 Thanks for replying but that does'nt work . I already tried it. It's like putty window ignore < character when send throught autoit Link to comment Share on other sites More sharing options...
Dondosh Posted October 17, 2012 Author Share Posted October 17, 2012 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now