Jump to content

Open Note Pad Type Text then Save


Hunter
 Share

Recommended Posts

I'm trying to make it Open Note Pad Type text and then Save. I'm stuck at the Save part. It goes in and types the text that I want it to save as. But it won't "click" the save button. I need the code for it. Heres the script.

$answer = MsgBox(4, "Pwnage Notepad", "This script will run Notepad type in some text and then quit. Run?")

If $answer = 7 Then

MsgBox(0, "AutoIt", "OK. Bye!")

Exit

EndIf

Run("notepad.exe")

WinWaitActive("Untitled - Notepad")

Send("BOOOO I'm a ghost{ENTER}Hahaha{ENTER}")

Sleep(500)

Send("+{UP 2}")

Sleep(500)

Send("!f")

Send("x")

WinWaitActive("Notepad")

Send("y")

Send("heeeeeeee.txt")

WinWaitClose("Untitled - Notepad")

Link to comment
Share on other sites

I'm trying to make it Open Note Pad Type text and then Save. I'm stuck at the Save part. It goes in and types the text that I want it to save as. But it won't "click" the save button. I need the code for it. Heres the script.

When the save file dialog window appears, the save button is ready to receive "Enter".

$answer = MsgBox(4, "Pwnage Notepad", "This script will run Notepad type in some text and then quit. Run?")

If $answer = 7 Then
    MsgBox(0, "AutoIt", "OK. Bye!")
    Exit
EndIf

Run("notepad.exe")

WinWaitActive("Untitled - Notepad")

Send("BOOOO I'm a ghost{ENTER}Hahaha{ENTER}")
Sleep(500)
Send("+{UP 2}")
Sleep(500)

Send("!f")
Send("x")

WinWaitActive("Notepad")
Send("y")

Send("heeeeeeee.txt")
Send("{ENTER}")
WinWaitClose("Untitled - Notepad")

You were really close. One more command and you had it.

Edited by Malkey
Link to comment
Share on other sites

When the save file dialog window appears, the save button is ready to receive "Enter".

$answer = MsgBox(4, "Pwnage Notepad", "This script will run Notepad type in some text and then quit. Run?")

If $answer = 7 Then
    MsgBox(0, "AutoIt", "OK. Bye!")
    Exit
EndIf

Run("notepad.exe")

WinWaitActive("Untitled - Notepad")

Send("BOOOO I'm a ghost{ENTER}Hahaha{ENTER}")
Sleep(500)
Send("+{UP 2}")
Sleep(500)

Send("!f")
Send("x")

WinWaitActive("Notepad")
Send("y")

Send("heeeeeeee.txt")
Send("{ENTER}")
WinWaitClose("Untitled - Notepad")

You were really close. One more command and you had it.

Ah, thank you.
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...