Jump to content
Sign in to follow this  
NELyon

what the heck happened here?

Recommended Posts

OK, this is messed up. here was my EXACT code:

run('Notepad.exe")
sleep(200)
WinWaitActive("Untitled - Notepad")
send("you can type text now")
sleep(500)

It ran fine as a au3 code, but when i compiled it, it ran notepad just fine... about 500 times, killing all my ram and i had to restart... also each notepad window, instead of sending "you can type text" it sent ("yyyyyyooooooouu caaaaaaaaaaaaannnn ttttttypeeeeeeeeee texxxxxxxt nnnnnooowwwww")

Share this post


Link to post
Share on other sites

OK, this is messed up. here was my EXACT code:

run('Notepad.exe")
sleep(200)
WinWaitActive("Untitled - Notepad")
send("you can type text now")
sleep(500)

It ran fine as a au3 code, but when i compiled it, it ran notepad just fine... about 500 times, killing all my ram and i had to restart... also each notepad window, instead of sending "you can type text" it sent ("yyyyyyooooooouu caaaaaaaaaaaaannnn ttttttypeeeeeeeeee texxxxxxxt nnnnnooowwwww")

This is not the exact code since it has a syntax error in the run statement, but let me guess....

You called your script notepad.au3 and compiled that .... right ?

Share this post


Link to post
Share on other sites

So what JdeB is saying is that you have at least two solutions:

1) Rename your compiled script.

2) (Better) Change the run statement to Run(@WindowsDir & \notepad.exe")

Share this post


Link to post
Share on other sites

yeah, i did name it notepad.au3... guess that was the problem

Also, you may want to change

send("you can type text now")

To

send("you can type text now", 1)

The second one will send the keys RAW so it won't like press alt f4 if you put send("Guess what I press!{F4}", 1)

=)

Share this post


Link to post
Share on other sites

yeah, but i just made this for my friend who hates going to run>>notepad.exe on his computer every time and he can't find the notepad.exe file on his comp to make a shortcut XD

Share this post


Link to post
Share on other sites

yeah, but i just made this for my friend who hates going to run>>notepad.exe on his computer every time and he can't find the notepad.exe file on his comp to make a shortcut XD

As much as i love autoit, wouldn't this have been much easier?

Start>>Search>>Notepad.exe

then make a shorcut

Edit: I Spelled notepad wrong

Edited by Paulie

Share this post


Link to post
Share on other sites

yeah, but i just made this for my friend who hates going to run>>notepad.exe on his computer every time and he can't find the notepad.exe file on his comp to make a shortcut XD

Why not just put Notepad in the startup folder and leave it running all the time?

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

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  

×
×
  • Create New...