If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Default Directory locations
32 posts
• Page 3 of 4 • 1, 2, 3, 4
Re: Default Directory locations
Thanks for help Jay. Just knowing this saves me additional grief trying to figure out.
Thanks!
Thanks!
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Default Directory locations
OK ... in the never ending quest
I could use some guidance/critique if this is a proper technique.
Here goes. In supplying SAVED file PATHS back into the FILEDIALOG prim ... like this:
Is this the best way to get PATHS that is saved/loaded from a TXT file, back into the FileDialog to set a default ?
Obviously ... asking because this seems like it should work ... but it ain't really
Thanks for any help.
Here's the sample schematic:
I could use some guidance/critique if this is a proper technique.
Here goes. In supplying SAVED file PATHS back into the FILEDIALOG prim ... like this:
Is this the best way to get PATHS that is saved/loaded from a TXT file, back into the FileDialog to set a default ?
Obviously ... asking because this seems like it should work ... but it ain't really
Thanks for any help.
Here's the sample schematic:
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Default Directory locations
Gee ... not even a reply
Not even, 'that's the ugliest schematic ever seen !' .... just terrible ! .... nothing ?
Not even, 'that's the ugliest schematic ever seen !' .... just terrible ! .... nothing ?
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Default Directory locations
Windows Registry can help on this case,
here an small example using the Registry class in Ruby,
I not have tested in an exported exe, so tell me if it work.
here an small example using the Registry class in Ruby,
I not have tested in an exported exe, so tell me if it work.
- Code: Select all
# create un Registry instance
storeAppData = Registry.new
# create the KEY if not exist
# setKey method with true parameter create the KEY and return true on success
# setKey method with false can be used to check if the KEY exist and return true or false.
appKEY = "HKEY_CURRENT_USER\\SOFTWARE\\RJHollins\\APP_TEST"
until storeAppData.setKey(appKEY, false)
storeAppData.setKey(appKEY, true)
end
registryName = "Last Open Path"
registryWriteValue = "C:\\directory"
# this write and read the REGISTRY, type can be: Bool, Int, Float, String
storeAppData.writeString(registryName, registryWriteValue)
registryReadValue = storeAppData.readString(registryName) # >> C:\\directory
- Tronic
- Posts: 539
- Joined: Wed Dec 21, 2011 12:59 pm
Re: Default Directory locations
Hi Tronic.
I don't want to sound ungrateful, and already know You are way more experienced/knowledgeable in programming ...
But I'm hesitant to be writing into the REGISTRY. [even if that's whats happening when using some PRIMS and other FS functions]. Yeah ... you can say I'm chicken
Maybe there is no other way. I've tried many things [even with my limits], and nothing has worked consistently, and more times than not, my attempts just fail.
For some reason, the FileDialog PRIM just doesn't seem to use the 'default location' connector properly, or I'm doing something totally wrong in the sample schematic I posted above.
A solution I would prefer ... could this been done using RUBY ? Basically replacing the FileDialog PRIM with a RUBY routine ?
Again ... please don't take this wrong.
I don't want to sound ungrateful, and already know You are way more experienced/knowledgeable in programming ...
But I'm hesitant to be writing into the REGISTRY. [even if that's whats happening when using some PRIMS and other FS functions]. Yeah ... you can say I'm chicken
Maybe there is no other way. I've tried many things [even with my limits], and nothing has worked consistently, and more times than not, my attempts just fail.
For some reason, the FileDialog PRIM just doesn't seem to use the 'default location' connector properly, or I'm doing something totally wrong in the sample schematic I posted above.
A solution I would prefer ... could this been done using RUBY ? Basically replacing the FileDialog PRIM with a RUBY routine ?
Again ... please don't take this wrong.
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Default Directory locations
Anyway,
to work with,
you have to save the file paths somewhere,
in your schematic you don't save the last used path to any file or in any REG in the registry,
and you have to reload back it when restart your app,
there is no magic that FS can do.
to work with,
you have to save the file paths somewhere,
in your schematic you don't save the last used path to any file or in any REG in the registry,
and you have to reload back it when restart your app,
there is no magic that FS can do.
- Tronic
- Posts: 539
- Joined: Wed Dec 21, 2011 12:59 pm
Re: Default Directory locations
Tronic wrote:Anyway,
to work with,
you have to save the file paths somewhere,
in your schematic you don't save the last used path to any file or in any REG in the registry,
and you have to reload back it when restart your app,
there is no magic that FS can do.
What Tronic said. And what I said 10 days ago:
tulamide wrote:RJHollins wrote:So specific ... the ONLY way is to Save to disk, and then AUTOLoad on startup ?
Yes.
That's how all the executables work, if they want to store settings that they want to use on the next start up. Mostly they use %APPDATA% for it.
No further comment.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Default Directory locations
Guys ... the schematic example was just that ...
The WIRELESS connectors are from a SAVE/LOAD module [very standard text file]. I just didn't include that to keep the post simple.
The WIRELESS connectors are from a SAVE/LOAD module [very standard text file]. I just didn't include that to keep the post simple.
- RJHollins
- Posts: 1571
- Joined: Thu Mar 08, 2012 7:58 pm
Re: Default Directory locations
Don't feel offended, RJ, but for me the whole page 3 doesn't make much sense.
You post a low res image of just a part of the whole system that works together. And when it comes to the point, where you would like to get some help you say: "It ain't really working."
That's nothing I would waste my time on.
(1) Post a schematic that clearly shows the issue(s)
(2) Describe in detail, what you expect that schematic to do, and what is not working correctly.
To the point, and with as much information as needed, then you might get more help.
You post a low res image of just a part of the whole system that works together. And when it comes to the point, where you would like to get some help you say: "It ain't really working."
That's nothing I would waste my time on.
(1) Post a schematic that clearly shows the issue(s)
(2) Describe in detail, what you expect that schematic to do, and what is not working correctly.
To the point, and with as much information as needed, then you might get more help.
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Default Directory locations
...only mention again like tulamide and i did before:
get rid of the loop back folder splitter (including the 4 nodes)
and it should work...!
1st trigger the ini load
2nd open file dialog
3rd if done save ini...
Keep on doing!
get rid of the loop back folder splitter (including the 4 nodes)
and it should work...!
1st trigger the ini load
2nd open file dialog
3rd if done save ini...
Keep on doing!
-
Walter Sommerfeld - Posts: 249
- Joined: Wed Jul 14, 2010 6:00 pm
- Location: HH - Made in Germany
32 posts
• Page 3 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 30 guests