Jump to content
samtan117

Notepad++

Recommended Posts

samtan117

Hey i cant seem to get this to work? please tell me how

 

here is the code

Run ( "C:\Program Files (x86)\Notepad++\notepad++.exe")
                
               ;It gets here then stops responding
                WinWaitActive("new 0 - Notepad++")

                Send ("{Ctrl}") ("O")

                Send("C:\Desktop\Article\Index")

                Send("!i")

            Case $iMsg = $idUndo_Btn
                ;MsgBox(64, "New GU", "You clicked on the Cancel button!")

        EndSelect

    WEnd
EndFunc

 

Share this post


Link to post
Share on other sites
samtan117

there are also ; messages in the code to tell you the problem

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, samtan117, welcome to the forum. You could do it like this instead:

Run("notepad.exe")
WinWaitActive("[CLASS:Notepad]", "")

 

Or simply use ShellExecute:

ShellExecute(<path to file>)

 

Edit: I swear this was for notepad when I looked at it last night :D

Edited by JLogan3o13
I'm apparently blind

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
jguinch

If I understand, you want to open a file with Notepad++.

You can just give the full path name as parameter in the command line :

Run(@ProgramFilesDir & '\Notepad++\notepad++.exe "C:\Desktop\Article\Index"')

 

Edited by jguinch

Share this post


Link to post
Share on other sites
samtan117

If I understand, you want to open a file with Notepad++.

You can just give the full path name as parameter in the command line :

Run(@ProgramFilesDir & '\Notepad++\notepad++.exe "C:\Desktop\Article\Index"')

 

​aah i didn't know you could do that thanks!

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

×