CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
How to remember the browse button options

 



perlLearner123
Novice

Jul 1, 2016, 8:00 PM

Post #1 of 6 (1985 views)
How to remember the browse button options Can't Post

I have created an exe from the perl script. The application has the browse button to select the file. Now my doubt is if the application is run and the file path is selected can it remember those settings if i quit the
application and start again? please advise.


Laurent_R
Veteran / Moderator

Jul 2, 2016, 12:34 AM

Post #2 of 6 (1977 views)
Re: [perlLearner123] How to remember the browse button options [In reply to] Can't Post

There maybe a better solution, but my first guess would be to have a distinct configuration file that is read at start up (if it exists) and updated (or created) when exiting the program.


perlLearner123
Novice

Jul 2, 2016, 3:20 AM

Post #3 of 6 (1973 views)
Re: [Laurent_R] How to remember the browse button options [In reply to] Can't Post

Great it will solve my problem but i need to do little bit of extra programming i guess.


Laurent_R
Veteran / Moderator

Jul 2, 2016, 10:52 AM

Post #4 of 6 (1962 views)
Re: [perlLearner123] How to remember the browse button options [In reply to] Can't Post


In Reply To
Great it will solve my problem but i need to do little bit of extra programming i guess.


Yes, to read the config file and to write it. But it's fairly simple.


perlLearner123
Novice

Jul 4, 2016, 10:59 PM

Post #5 of 6 (1957 views)
Re: [Laurent_R] How to remember the browse button options [In reply to] Can't Post

But i was thinking in case the path is such that i cannot create new files that is the config file or edit, then what i have to do?


BillKSmith
Veteran

Jul 5, 2016, 5:50 AM

Post #6 of 6 (1952 views)
Re: [perlLearner123] How to remember the browse button options [In reply to] Can't Post

On windows systems, you have the option of storing configuration data in the Registry. It is fairly simple to use and works well. The downside of course is that the consequences of a programming error can be catastrophic. (At it worst, your computer will not reboot.) I do not remember the module that I have used because I have since adopted the file approach for my own work. Path should not be a problem. After all, you get to choose the directory where the configuration file is stored. Choose a directory that exists on every system that may run your code.
Good Luck,
Bill

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives