1. Windows question

How does a windows program figure out which file it was used to open?

new topic     » topic index » view message » categorize

2. Re: Windows question

Kirk Knapp wrote:
> 
> How does a windows program figure out which file it was used to open?

If You're talking about an euphoria program then:
sequence cmdLine
cmdLine = command_line()
puts(1,cmdLine[2])

if the program is binded  cmdLine[1] and cmdLine[2] are the same and are the
name of the executable
if the program is not binded then  cmdLine[1] is the euphoria program used to 
run the script, exw.exe or exwc.exe

Does it answer your question?

regards
Jacques DeschĂȘnes

new topic     » goto parent     » topic index » view message » categorize

3. Re: Windows question

Kirk Knapp wrote:
> 
> How does a windows program figure out which file it was used to open?

?? .. how about api's,    GetModuleFileName()

new topic     » goto parent     » topic index » view message » categorize

4. Re: Windows question

I don't think I phrased my question very clearly.
When you open, for example, a .e file, it gets opened by ed.
How does ed know which specific .e file it was used to open?

new topic     » goto parent     » topic index » view message » categorize

5. Re: Windows question

Kirk Knapp wrote:
> 
> I don't think I phrased my question very clearly.
> When you open, for example, a .e file, it gets opened by ed.
> How does ed know which specific .e file it was used to open?

Are you talking about opening an *.e file in ed.ex by clicking
on the *.e file?  If so, ed.ex might be associated as the default 
application for files with the *.e extension.




Ken Rhodes
100% MicroSoft Free
SuSE Linux 10.0
No AddWare, SpyWare, or Viruses!
Life is Good  smile

new topic     » goto parent     » topic index » view message » categorize

6. Re: Windows question

Kirk Knapp wrote:
> 
> I don't think I phrased my question very clearly.
> When you open, for example, a .e file, it gets opened by ed.
> How does ed know which specific .e file it was used to open?


In windows their is a registry of file types, which you 
can get to under folder options

when you examine *.e you may have several actions that windows can take,
these are usually visible from the right click menu when selecting a file
typical actions are Open,Edit,Print

so when I view the open action for the *.e filetype I see the command line

"C:\EUPHORIA\BIN\ED.BAT" "%1"

%1 being the variable for the file name passed to ED.



--"ask about our layaway plan".
--

new topic     » goto parent     » topic index » view message » categorize

7. Re: Windows question

> How does ed know which specific .e file it was used to open?

This may be found in command_line(). See the doc here:

http://www.rapideuphoria.com/lib_c_d.htm#command_line

~Greg

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu