Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Windows .pl file assoc vs. cmd prompt

by Anonymous Monk
on Apr 08, 2005 at 14:15 UTC ( [id://446017]=note: print w/replies, xml ) Need Help??


in reply to Windows .pl file assoc vs. cmd prompt

As far as I understand it, there's not really any way to know that.

Assuming you're using ActiveState Perl, the default action on files of type .pl is (approximately):

"d:\perl\bin\perl.exe" "%1" %*

for values of your AS Perl bin directory, of course. It calls perl, but not in any particularly special way.

You could maybe modify that to include a special option, like

"d:\perl\bin\perl.exe" "%1" "--I-was-double-clicked" %*

but that's an ugly hack, and it'll fail with scripts using Getopt::Long, because (IIRC) those scripts choke and die on command-line options they don't understand.

You might want to look into Win32 and Win32::GUI. I know it's possible to hide your console window using the latter, and if I can turn up the code in which I did that (a couple years ago), I'll post the relevant exemplary bits. I don't know much about the Win32 API interface in general, though, so can't be much help to you there.

HTH; HAND.

Replies are listed 'Best First'.
Re^2: Windows .pl file assoc vs. cmd prompt
by Anonymous Monk on Apr 08, 2005 at 14:16 UTC
    ...or I'm not half as smart as I think I am. Anyway...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://446017]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-28 17:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found