Re: Open file with default application software on Windows ?

2004-10-07 Thread David le Blanc
Search for a program called 'shellexec'.  (use google).

Shellexec does exactly what you want, but its a windows executable, so
instead of calling 
defopen "something";

try

system("shellexec something");

you should be able to download shellexec or an equivalent from many places.

As for portable? Its portable among the various platforms that run
word-4-windows (duh)



On Thu, 7 Oct 2004 18:21:21 +0800, Bee <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I am curious to know that if that is an existed module to open files with it's 
> default application just like I
> double click on the file with mouse. and I do something just like this with my code :
> 
> use defaultOpen;
> defOpen 'C:\temp.gif' or die "$!" ; # Then the image will open with photoshop.
> defOpen 'C:\temp.doc' or die "$!" ; # then the document will open with Word.
> 
> I've made this done by writting a batch like code.. but I sure that's unsafe and 
> unportable.
> 
> Thanks for any hint,
> Bee
> 
>

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Open file with default application software on Windows ?

2004-10-07 Thread Bee

Wow !! As you mentioned, thaz EXACTLY what I want :-))

Thousands Thanks !!!
Bee

- Original Message - 
From: "David le Blanc" <[EMAIL PROTECTED]>
To: "Bee" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 07, 2004 7:11 PM
Subject: Re: Open file with default application software on Windows ?


> Search for a program called 'shellexec'.  (use google).
>
> Shellexec does exactly what you want, but its a windows executable, so
> instead of calling
> defopen "something";
>
> try
>
> system("shellexec something");
>
> you should be able to download shellexec or an equivalent from many
places.
>
> As for portable? Its portable among the various platforms that run
> word-4-windows (duh)
>
>
>
> On Thu, 7 Oct 2004 18:21:21 +0800, Bee <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I am curious to know that if that is an existed module to open files
with it's default application just like I
> > double click on the file with mouse. and I do something just like this
with my code :
> >
> > use defaultOpen;
> > defOpen 'C:\temp.gif' or die "$!" ; # Then the image will open with
photoshop.
> > defOpen 'C:\temp.doc' or die "$!" ; # then the document will open with
Word.
> >
> > I've made this done by writting a batch like code.. but I sure that's
unsafe and unportable.
> >
> > Thanks for any hint,
> > Bee
> >
> >
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




RE: Open file with default application software on Windows ?

2004-10-07 Thread Bob Showalter
Bee wrote:
> Hello,
> 
> I am curious to know that if that is an existed module to open files
> with it's default application just like I double click on the file
> with mouse. and I do something just like this with my code : 
> 
> use defaultOpen;
> defOpen 'C:\temp.gif' or die "$!" ; # Then the image will open with
> photoshop. 
> defOpen 'C:\temp.doc' or die "$!" ; # then the document will open
> with Word. 
> 
> I've made this done by writting a batch like code.. but I sure that's
> unsafe and unportable. 

won't

   system "start temp.doc"

do the trick?

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Open file with default application software on Windows ?

2004-10-07 Thread Bee

Thanks thanks, a very nice lesson again !!  Feel quite sorry that I even 
never heard about this command for using windows after so many 
years... 

Thousands thanks, 
Bee


- Original Message - 
From: "Bob Showalter" <[EMAIL PROTECTED]>
To: "'Bee'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, October 07, 2004 8:24 PM
Subject: RE: Open file with default application software on Windows ?


> Bee wrote:
> > Hello,
> > 
> > I am curious to know that if that is an existed module to open files
> > with it's default application just like I double click on the file
> > with mouse. and I do something just like this with my code : 
> > 
> > use defaultOpen;
> > defOpen 'C:\temp.gif' or die "$!" ; # Then the image will open with
> > photoshop. 
> > defOpen 'C:\temp.doc' or die "$!" ; # then the document will open
> > with Word. 
> > 
> > I've made this done by writting a batch like code.. but I sure that's
> > unsafe and unportable. 
> 
> won't
> 
>system "start temp.doc"
> 
> do the trick?
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
> 
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Re: Open file with default application software on Windows ?

2004-10-07 Thread Jenda Krynicky
From: "Bee" <[EMAIL PROTECTED]>
> I am curious to know that if that is an existed module to open files
> with it's default application just like I double click on the file
> with mouse. and I do something just like this with my code :
> 
> use defaultOpen;
> defOpen 'C:\temp.gif' or die "$!" ; # Then the image will open with
> photoshop. defOpen 'C:\temp.doc' or die "$!" ; # then the document
> will open with Word.
> 
> I've made this done by writting a batch like code.. but I sure that's
> unsafe and unportable.
> 
> Thanks for any hint,
> Bee

The system('start file.doc') only allows you to trigger the default 
action defined for the file type. If you want to use the other 
actions you might like
use Win32::FileOp qw(ShellExecute);
ShellExecute 'Print' => 'c:\temp.doc';

Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Open file with default application software on Windows ?

2004-10-07 Thread David le Blanc
On Thu, 07 Oct 2004 16:10:29 +0200, Jenda Krynicky <[EMAIL PROTECTED]> wrote:
> From: "Bee" <[EMAIL PROTECTED]>
> > I am curious to know that if that is an existed module to open files
> > with it's default application just like I double click on the file
> > with mouse. and I do something just like this with my code :
> >
> > use defaultOpen;
> > defOpen 'C:\temp.gif' or die "$!" ; # Then the image will open with
> > photoshop. defOpen 'C:\temp.doc' or die "$!" ; # then the document
> > will open with Word.
> >
> > I've made this done by writting a batch like code.. but I sure that's
> > unsafe and unportable.
> >
> > Thanks for any hint,
> > Bee
> 
> The system('start file.doc') only allows you to trigger the default
> action defined for the file type. If you want to use the other
> actions you might like
>use Win32::FileOp qw(ShellExecute);
>ShellExecute 'Print' => 'c:\temp.doc';

Wow.  Best answer.  I assign you 50 guru points :-)

Where do I send them?

> 
> Jenda
> = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
> When it comes to wine, women and song, wizards are allowed
> to get drunk and croon as much as they like.
>-- Terry Pratchett in Sourcery
> 
> 
> 
> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>  
> 
>

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: Open file with default application software on Windows ?

2004-10-07 Thread NYIMI Jose \(BMB\)


> -Original Message-
> From: Jenda Krynicky [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 07, 2004 4:10 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Open file with default application software on Windows ?
> 
> 
> From: "Bee" <[EMAIL PROTECTED]>
> > I am curious to know that if that is an existed module to 
> open files 
> > with it's default application just like I double click on the file 
> > with mouse. and I do something just like this with my code :
> > 
> > use defaultOpen;
> > defOpen 'C:\temp.gif' or die "$!" ; # Then the image will open with 
> > photoshop. defOpen 'C:\temp.doc' or die "$!" ; # then the document 
> > will open with Word.
> > 
> > I've made this done by writting a batch like code.. but I 
> sure that's 
> > unsafe and unportable.
> > 
> > Thanks for any hint,
> > Bee
> 
> The system('start file.doc') only allows you to trigger the default 
> action defined for the file type. If you want to use the other 
> actions you might like
>   use Win32::FileOp qw(ShellExecute);
>   ShellExecute 'Print' => 'c:\temp.doc';

ShellExecute $operation => $file;

How to find the list of available $operations ?

The doc says:
"$operation : specifies the action to perform. The set of available operations depends 
on the file type. Generally, the actions available from an object's shortcut menu are 
available verbs."

"object's shortcut menu" ?
Could you elaborate please :-) ?

Thanks,

José.


 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




RE: Open file with default application software on Windows ?

2004-10-07 Thread Jenda Krynicky
From: "NYIMI Jose \(BMB\)" <[EMAIL PROTECTED]>
> > -Original Message-
> > From: Jenda Krynicky [mailto:[EMAIL PROTECTED] 
> > The system('start file.doc') only allows you to trigger the default
> > action defined for the file type. If you want to use the other
> > actions you might like  use Win32::FileOp qw(ShellExecute);
> > ShellExecute 'Print' => 'c:\temp.doc';
> 
> ShellExecute $operation => $file;
> 
> How to find the list of available $operations ?
> 
> The doc says:
> "$operation : specifies the action to perform. The set of available
> operations depends on the file type. Generally, the actions available
> from an object's shortcut menu are available verbs."
> 
> "object's shortcut menu" ?
> Could you elaborate please :-) ?

You can either find the list of actions if you manualy rightclick a 
file of that type in Windows Explorer (the topmost section of the 
menu except "Open With") or go to the registry (regedit.exe) go to 
HKEY_CLASSES_ROOT\.doc, look at the default value (the type of the 
file), then go to HKEY_CLASSES_ROOT\\Shell and the subkeys 
are the different available actions. ShellExecute lets you use either 
the name of the subkeys or the title specified in the default value 
in that subkey.

If you need to find the list of actions programaticaly you just use 
Win32::Registry ro Tie::Registry to do the same. Find the type from 
HKEY_CLASSES_ROOT\.ext, go to HKEY_CLASSES_ROOT\\Shell and 
list the subkeys.

HTH, Jenda
P.S.: Please do not CC me on emails sent to the list. Both emails end up in the same 
folder anyway.

= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Open file with default application software on Windows ?

2004-10-07 Thread Bee
> > > From: Jenda Krynicky [mailto:[EMAIL PROTECTED]
> > > The system('start file.doc') only allows you to trigger the default
> > > action defined for the file type. If you want to use the other
> > > actions you might like use Win32::FileOp qw(ShellExecute);
> > > ShellExecute 'Print' => 'c:\temp.doc';
> >
> > ShellExecute $operation => $file;
> >
> > How to find the list of available $operations ?
> >
> > The doc says:
> > "$operation : specifies the action to perform. The set of available
> > operations depends on the file type. Generally, the actions available
> > from an object's shortcut menu are available verbs."
> >
> > "object's shortcut menu" ?
> > Could you elaborate please :-) ?
>
> You can either find the list of actions if you manualy rightclick a
> file of that type in Windows Explorer (the topmost section of the
> menu except "Open With") or go to the registry (regedit.exe) go to
> HKEY_CLASSES_ROOT\.doc, look at the default value (the type of the
> file), then go to HKEY_CLASSES_ROOT\\Shell and the subkeys
> are the different available actions. ShellExecute lets you use either
> the name of the subkeys or the title specified in the default value
> in that subkey.
>
> If you need to find the list of actions programaticaly you just use
> Win32::Registry ro Tie::Registry to do the same. Find the type from
> HKEY_CLASSES_ROOT\.ext, go to HKEY_CLASSES_ROOT\\Shell and
> list the subkeys.
>

A very nice hack, It leads me to imagine lot more possibilities, such as
printing
invoice when a sale get confirmed ... So glad to hear about this !!

Many many thanks for the tips!!
Bee



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: Open file with default application software on Windows ?

2004-10-07 Thread NYIMI Jose \(BMB\)


> -Original Message-
> From: Jenda Krynicky [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, October 07, 2004 6:14 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Open file with default application software on Windows ?
> 
> 
> From: "NYIMI Jose \(BMB\)" <[EMAIL PROTECTED]>
> > > -Original Message-
> > > From: Jenda Krynicky [mailto:[EMAIL PROTECTED]
> > > The system('start file.doc') only allows you to trigger 
> the default
> > > action defined for the file type. If you want to use the other
> > > actions you might likeuse Win32::FileOp qw(ShellExecute);
> > >   ShellExecute 'Print' => 'c:\temp.doc';
> > 
> > ShellExecute $operation => $file;
> > 
> > How to find the list of available $operations ?
> > 
> > The doc says:
> > "$operation : specifies the action to perform. The set of available 
> > operations depends on the file type. Generally, the actions 
> available 
> > from an object's shortcut menu are available verbs."
> > 
> > "object's shortcut menu" ?
> > Could you elaborate please :-) ?
> 
> You can either find the list of actions if you manualy rightclick a 
> file of that type in Windows Explorer (the topmost section of the 
> menu except "Open With") or go to the registry (regedit.exe) go to 
> HKEY_CLASSES_ROOT\.doc, look at the default value (the type of the 
> file), then go to HKEY_CLASSES_ROOT\\Shell and the subkeys 
> are the different available actions. ShellExecute lets you use either 
> the name of the subkeys or the title specified in the default value 
> in that subkey.
> 
> If you need to find the list of actions programaticaly you just use 
> Win32::Registry ro Tie::Registry to do the same. Find the type from 
> HKEY_CLASSES_ROOT\.ext, go to HKEY_CLASSES_ROOT\\Shell and 
> list the subkeys.
> 
> HTH, Jenda
> P.S.: Please do not CC me on emails sent to the list. Both 
> emails end up in the same folder anyway.
> 

Great !
I think you should add such info in the module documenation.

Thanks,

José.


 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>