Jump to content
Muxe Inc Forums
Sign in to follow this  
dandv

Can't return to NDN after executing GUI programs

Recommended Posts

dandv    0

When I launch notepad.exe from NDNW32 build 7473, I can't get back to NDN, not even after Ctrl+C or Ctrl+Break! I have to close Notepad. Alternatively, I have to run "start notepad".

 

I clearly remember that I had reported this bug and it was fixed in a previous release, I think 6446 (6873 still has the bug).

 

Maybe there is a setting somewhere? Configuration -> Command line seems related, but what does it do?

 

Hope this helps,

Dan

Share this post


Link to post
Share on other sites

hi!

 

i just tested this, and i cannot agree with you

 

if you type NOTEPAD.EXE it definetely works

 

maybe you didnt start it with .EXE?

 

anyway, no bug in sight here

even when i changed all commandline options in any combination

 

Stefan/AH

Share this post


Link to post
Share on other sites
dandv    0
maybe you didnt start it with .EXE?

 

You're right, if I run notepad.EXE it will work as expected, but why do I have to type ".exe"?

I think you check for .EXE being at the end of the command, which is wrong if the command

is followed by something, such as "notepad.exe myfile.txt" (try this :-).

Anyway, the user should not be forced to append ".exe" :)

 

even when i changed all commandline options in any combination

That might mean they don't do much ;-)

Share this post


Link to post
Share on other sites

hi again!

 

> You're right, if I run notepad.EXE it will work as expected, but why do I have to type ".exe"?

 

because NDN does not try to guess what you typed on the commandline, you are free to type what you want and that is executed

no checks are performed except for CD

 

in fact, the code that i copied from DNOSP (to check for a GUI program with quite some modifications) does indeed check for .EXE of the given string, which it shouldnt

(this is why notepad.exe works, compared to notepad, not to mention notepad.exe mytext.ext)

 

you know, it is a bit dangerous to GUESS that you want to start NOTEPAD.EXE when you only type NOTEPAD

how shall i know if you want to start NOTEPAD.EXE

or NOTEPAD.BAT?

 

i can savely assume that you want to have a program correctly started when you hit enter in filepanel on any exe program(or ELF in LNX) and what to do with it

same goes for external viewers and editors (which is already a BIT dangerous, but works fine until now, dont you agree? ;) btw, that was your report too, right? :)

 

anyway, i know that the exe code is not 100% perfect, but it is working well

and, if you have the time to write notepad myfile.ext

you can maybe add START to it? :)

 

Stefan/AH

 

PS: i will try to rework the exec code once more, to have an easier layout and maybe it is ok to check for the first file in any string if it is exe or not and start it according to

Share this post


Link to post
Share on other sites
dandv    0
you know, it is a bit dangerous to GUESS that you want to start NOTEPAD.EXE when you only type NOTEPAD

how shall i know if you want to start NOTEPAD.EXE

or NOTEPAD.BAT?

How about a totally different and quite powerful approach, also adopted by DNOSP:

 

Don't check for anything, just exec() the executable, but interrupt it if the user presses Ctrl+Break in NDN!

 

DNOSP does that and it works perfectly, although they also have the

notepad.exe myfile.txt

bug.

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  

×