473,233 Members | 3,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,233 software developers and data experts.

Invoking dialog box on file selection

Hey Guys.
This is kind of a mixed question involving the os platform, python and wxpython. I hope this is in the right place, if not then a quick link to somewhere suitable would be great.

Ok basicly i have a dialog box that is acting as the GUI for an image program i'm running. The program is a front end support app for raw image files.
Does anyone know how to invoke the dialog box if the user of the os clicks and tries to open a file of a certain file type?
For example what i want is that the user can either start the dialog box first and then open the file using the open command in my dialog box. Or when navigating through windows explorer (or similar) when the selected file is opened the first box to appear is my dialog box.
Cheers.
Ed
(newbie - only been learning this for a month)
Jul 18 '07 #1
5 2817
bartonc
6,596 Expert 4TB
Hey Guys.
This is kind of a mixed question involving the os platform, python and wxpython. I hope this is in the right place, if not then a quick link to somewhere suitable would be great.

Ok basicly i have a dialog box that is acting as the GUI for an image program i'm running. The program is a front end support app for raw image files.
Does anyone know how to invoke the dialog box if the user of the os clicks and tries to open a file of a certain file type?
For example what i want is that the user can either start the dialog box first and then open the file using the open command in my dialog box. Or when navigating through windows explorer (or similar) when the selected file is opened the first box to appear is my dialog box.
Cheers.
Ed
(newbie - only been learning this for a month)
Hi eddiefisher41. You've come to the right place.
For the first part (getting a file name for a File Dialog), I can provide complete code if you need it (it's actually a code template in Boa Constructor).

For the second part, I can tell you that on Windows you really need to crunch all your scripts and dependencies into a .exe and associate the given file type to your Windows program. But, (I need to try this, myself) it may be possible to just associate the file type with your main script that creates the wxPython app and look at the argv (variable length argument list) that Windows sends it.
Jul 18 '07 #2
Hiya.
Cheers. Yeah ive already sorted out the code to open the file once the dialog box is running, just using the openfile dialog box class.
Yeah thought it may need to wait till right at the end before i can accociate it with the .raw file type.
Thanks.
Ed
Jul 18 '07 #3
Hey Guys.
Right i am coming close to the end of my project and am starting to think about how to invoke my dialog box once a .raw file is selected.
What i am trying to do at the moment is create a small test bench that will open the file and present the filepath to my dialog. The test bench then invokes my dialog
What i am missing is how to pass the filepath into the dialog box. I know how to inport variables into modules that are run from another program, (that is basicly what i'm doing) but when i import the dialog it is called straight away. It seems to go stright into the dialog box's main event loop before i get chance to call it.

How do i get my dialog to look at the test bench and read the value of the filepath?
In terms of the finished solution after i have accociated the dialog with the .raw extension how do i go about passing the filepath from the os into the dialog?

Thanks for your help over the last few months. I'm nearing the end of my project now but will most likely be coding python etc when i come back for my main degree placement.
Cheers.
Ed
Aug 8 '07 #4
bartonc
6,596 Expert 4TB
Hey Guys.
Right i am coming close to the end of my project and am starting to think about how to invoke my dialog box once a .raw file is selected.
What i am trying to do at the moment is create a small test bench that will open the file and present the filepath to my dialog. The test bench then invokes my dialog
What i am missing is how to pass the filepath into the dialog box. I know how to inport variables into modules that are run from another program, (that is basicly what i'm doing) but when i import the dialog it is called straight away. It seems to go stright into the dialog box's main event loop before i get chance to call it.

How do i get my dialog to look at the test bench and read the value of the filepath?
In terms of the finished solution after i have accociated the dialog with the .raw extension how do i go about passing the filepath from the os into the dialog?

Thanks for your help over the last few months. I'm nearing the end of my project now but will most likely be coding python etc when i come back for my main degree placement.
Cheers.
Ed
Hi Ed.

All of the file selection mechanisms that I found, including wxFileSelector, wxFileDialog, and wxFilePickerCtrl, take path, filename, extension and wildcard charaters in their creation methods. If you need a link to the documentation, I can provide that.
Aug 8 '07 #5
Cheers.
Got it sorted now.
Vertually finished my 3 month project, just writing the final report now. In terms of my dialog box i just need to sort out user input verification and thats it.
Quite nicely it absolutly nails every test image i pass it with at most 5 pixels error in a 2Mp image, pretty sweet!!!
Thanks for all of your help on this forum over the past 3 months.
I go back to uni for a year coming in september but come back to work with my industrial placement firm next summer to write my thesis and do an 8 month research project. I expect i'll be using these forums again then as i'll be doing a mixture of hardware and software design, hopefully noise reduction or colour management projects.
Having said that there are a few apps that i want to create to help with day to day life on my hope PC that i may do at some point.
Cheers Guys.
Ed
Aug 10 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: S.W. Rasmussen | last post by:
With the risk of being accused of multi-posting I would like to draw the attention to a serious visual basic/windows issue discussed in the microsoft.public.vb.bugs newsgroup. As pointed out below...
5
by: Fred | last post by:
Hi, I'd like to turn a command-line script into a Windows GUI app using the native widgets so as to reduce the size of the binary (ie. no QT, wxWidgets, et al.) I came up with the following...
3
by: bbxrider | last post by:
running win2k adv server/ iis5.0 trying to setup on my web page where browsers can download a file, an .xls so been trying to figure out with a download 'link' what invokes the standard ms file...
3
by: JoNaS | last post by:
As a lot of us might now, the input file (aka browse button) in html does not allow for multiple file selection or for filtering file types. The File Open dialog used in WinForms allow these things...
1
by: Michael Yanowitz | last post by:
Hello: Below I have included a stripped down version of the GUI I am working on. It contains 2 dialog boxes - one main and one settings. It has the following problems, probably all related, that...
13
by: marathoner | last post by:
How do we invoke the file selection dialog? I would like to do this in C# in ASP.net. I would like to open a file for reading. Marathoner
1
by: =?Utf-8?B?VGVlcmF2ZWU=?= | last post by:
I try to invoke Connection Properties dialog box that Visual Studio 2005 use. The dialog that I said is used in many places such as when developers build connection string in Settings.setting file...
8
by: Janwillem | last post by:
Is there a way to force the wx.FileDialog to show as default the thumbnails vie in stead of list view? thanks, janwillem
6
by: Iain King | last post by:
Hi. I have a modal dialog whcih has a "Browse..." button which pops up a file selector. This all works fine, but the first thing the user has to do when they open the dialog is select a file, so...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.