Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Search and Copy a filepath

by doowah2004 (Monk)
on Nov 01, 2006 at 09:00 UTC ( #581635=note: print w/replies, xml ) Need Help??

in reply to Search and Copy a filepath

If you have a "File Open Box" then you should already have the file path. What ever method you are calling to launch the open file dialog will most likely return the path to the file. For example in Win32::GUI you could use:
my $file = Win32::GUI::GetOpenFileName( -owner => $Window, # Main window for modal dialog -title => "Open an image file", # Dialog title -filter => [ # Filter file 'JPG file (*.jpg)' => '*.jpg', 'All files' => '*.*', ], -directory => ".", # Use current directory );

You would probably not want to use the directory flag in your case because you stated that the image could be anywhere. My point is that you can now use $file to open the image, it contains the path to your file. My guess is if you are using some other package/method that it too would return the path to the file.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://581635]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2018-06-19 17:26 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (114 votes). Check out past polls.