Sign in to follow this  
Followers 0
JLC123

Multiple instances ?

4 posts in this topic

I have three buttons on my GUI that will pull up text files in notepad when pressed. The functionality works great unless you want to see more than one of those text files at the same time.

Can this be done? Did I miss something obvious?

Any assistance would be appreciated

Case $msg = $Button1
        RunWait(@ComSpec & " /c " & 'notepad c:\File1.txt', "", @SW_HIDE)
    Case $msg = $Button2
        RunWait(@ComSpec & " /c " & 'notepad c:\File2.txt', "", @SW_HIDE)
    Case $msg = $Button3
        RunWait(@ComSpec & " /c " & 'notepad c:\File3.txt', "", @SW_HIDE)

Two wrongs don't make a right, but three lefts do

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Did I miss something obvious?

Yes. <_<

The first sentence of RunWait description in the help file, which says

"Runs an external program and pauses script execution until the program finishes."

Edited by Siao

"be smart, drink your wine"

Share this post


Link to post
Share on other sites

Yes. :)

The first sentence of RunWait description in the help file, which says

"Runs an external program and pauses script execution until the program finishes."

<_<

Sorry - I've used RunWait so many times it never crossed my mind to check the help file. (probably because I'm an idiot!)


Two wrongs don't make a right, but three lefts do

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Its an honest mistake, most people do in sooner or later. Try Run() instead

Edited by MethodZero

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

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