(j3.2006) Fwd: FORTRAN input from the mouse
Rafik Zurob
rzurob
Thu Jun 13 06:26:26 EDT 2013
Hi John
I'm not sure how to capture mouse events in Windows (how does one do it in
C?), but I think what he's looking for is unrelated to mouse events.
Windows passes the names of any files you drag onto a program as command
line arguments to the program. Similarly, if you add a program to a
context menu (Open, Send To, ..., etc), things are just passed to it as
command line arguments. So he can get the file names to copy via
Fortran's get_command_argument.
Regards
Rafik
j3-bounces at mailman.j3-fortran.org wrote on 13/06/2013 03:57:48 AM:
> From: John Reid <John.Reid at stfc.ac.uk>
> To: fortran standards email list for J3 <j3 at j3-fortran.org>,
> Date: 13/06/2013 04:32 AM
> Subject: (j3.2006) Fwd: FORTRAN input from the mouse
> Sent by: j3-bounces at mailman.j3-fortran.org
>
> Dear all,
>
> Can anyone help me to reply to this message? I could just say that what
> he wants is outside the scope of the standard, but would like to make a
> helpful suggestion.
>
> Cheers,
>
> John.
>
> ----- Message from <pat.ward at optusnet.com.au> on Thu, 13 Jun 2013
> 13:51:14 +1000 -----
>
> To:
>
> John Reid <j.k.reid at rl.ac.uk>
>
> Subject:
>
> FORTRAN input from the mouse
>
> Dear John,
> Does FORTRAN allow input from a mouse, e.g., via a READ statement,
> or OPEN statement?
>
> For example, in Windows explorer, it is possible to right-click on a
> file and then select a FORTRAN executable from the menu that
> appears. Can this FORTRAN program be made to capture whatever the
> mouse sends (e.g., capture the name of the file, or whatever the
> mouse transmits)?
>
> Here is the context of my problem:
> I have been writing a FORTRAN program to copy large files because I
> got frustrated with the native Windows copy utility.
> My program works fine, but I have to supply it with a text file
> containing a list of the files to be copied, and their destinations.
> This seems a very cumbersome to get the information into FORTRAN.
> Each time I move to a different folder I have to create a new file
> list. It would be more efficient if I could get it to work via mouse
> clicks (e.g., something like the way the Notepad is able to open any
file).
>
> Information out there about FORTRAN input seems restricted to input
> from a file or the keyboard. I cannot find anything about input from
> a mouse. I have tried a few forums with no success.
>
> Regards
> Pat Ward
> Email sent using Optus
Webmail_______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
More information about the J3
mailing list