Jump to content

Recommended Posts

Posted

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

 

  • Moderators
Posted (edited)

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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Posted

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!

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
×
×
  • Create New...