Iamgoodlol

Run Notepad exe unsuccessful

4 posts in this topic

#1 ·  Posted

Hello fellas,

I am new to Auto it and I have encountered a problem of using the run() command. I would be really grateful if someone could provide an advice for me.
As shown in the attached image, I have typed in the code. However, there was no notepad being launched after I had pressed the "F5" key to go.

I googled for solutions. I was inclined to think that I had not saved the au3 file properly but then I ensured I have saved it. And then I  tried using the double quotes ("") rather than the single quotes ('') but it did not solve the problem. I also tried using capital letter and small letter for the "n" in notepad but it still did not help.

Does anyone know how to solve this problem?

Thank you

Autoit Problem.png

Share this post


Link to post
Share on other sites



#2 ·  Posted

The function is fine, but it seems as if you didn't actually call it.

OpenNotepad()

Func OpenNotepad()
    Run('Notepad.exe')
EndFunc

 

Share this post


Link to post
Share on other sites

#3 ·  Posted

17 minutes ago, Floops said:

The function is fine, but it seems as if you didn't actually call it.

OpenNotepad()

Func OpenNotepad()
    Run('Notepad.exe')
EndFunc

 

Floops, you saved my day. I now feel extremely stupid for asking the question.

Share this post


Link to post
Share on other sites

#4 ·  Posted

You're welcome. And don't feel stupid, sometimes the solution is right in front of you but you still can't see it. Happens to me quite often aswell :)

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