Progh0st

Writing to Command Prompt (CMD) issue

4 posts in this topic

I'm trying to use command prompt to upload files to my ftp server since i don't need to install any extra software for it. I'm coding a simple autoit script to do the job for me, but i'm havng issues when i write to CMD.

ControlSend("[CLASS:ConsoleWindowClass]", "", "", "cd " & @UserProfileDir)
        ControlSend("[CLASS:ConsoleWindowClass]", "", "", "{ENTER}", 0)
        ;Sleep(3000)
        ControlSend("[CLASS:ConsoleWindowClass]", "", "", "ftp IP", 0)
        ControlSend("[CLASS:ConsoleWindowClass]", "", "", "{ENTER}", 0)
        ;Sleep(3000)
        ControlSend("[CLASS:ConsoleWindowClass]", "", "", "Username", 0)
        ControlSend("[CLASS:ConsoleWindowClass]", "", "", "{ENTER}", 0)
        ;Sleep(3000)
        ControlSend("[CLASS:ConsoleWindowClass]", "", "", "Password", 0)

Everything goes well until i get to the password part where cmd won't acept ControlSend to write in my password. And i don't want to use "Send" as an option because that would need CMD to be on focus. Anyone can help me here?

Share this post


Link to post
Share on other sites



silly question -

... upload files to my ftp server ...

have you tried the FTP UDF that ships with AutoIt, or the SFTP UDF from the Example Scripts forum?

1 person likes this

Share this post


Link to post
Share on other sites

There is a FTP UDF distributed along with AutoIt, Check the help file :)

1 person likes this

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

Sorry i'm new to this lol, i had no idea about those UDF! You have save me so much work.

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