Sign in to follow this  
Followers 0
pik

Whats wrong?

4 posts in this topic

Hey.

I am new to this. I am trying and trying to finde out how this program works. But i am stuck in this simple thing. I cant get my script to type any thing when i run one:/

Every things works the msgbox appear and notepad opens but then nothing happens it wont wirte hello world. Hope that somebody can answer my noobish question:)

Here is the script that i cant get to work:

$answer = MsgBox(4, "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("Hello world")

Share this post


Link to post
Share on other sites



You forgot the title on MsgBox:

$answer = MsgBox(4, "Script", "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("Hello world")

[sub]Quantum mechanics: The dreams stuff is made of[/sub]

Share this post


Link to post
Share on other sites

Hey.

I am new to this. I am trying and trying to finde out how this program works. But i am stuck in this simple thing. I cant get my script to type any thing when i run one:/

Every things works the msgbox appear and notepad opens but then nothing happens it wont wirte hello world. Hope that somebody can answer my noobish question:)

Here is the script that i cant get to work:

$answer = MsgBox(4, "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("Hello world")
My guess is that your running this on a non-english version of windows, if so, change "Untitled - Notepad" to whatever your language translation is :D

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

Oh yeah:D obviously thx you so much for the fast reply:)

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  
Followers 0