Support

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

For general discussion related FlowStone

Re: Default Directory locations

Postby RJHollins » Sat May 28, 2016 6:20 am

Thanks for help Jay. Just knowing this saves me additional grief trying to figure out.

Thanks!
8-)
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Re: Default Directory locations

Postby RJHollins » Sat May 28, 2016 6:28 am

OK ... in the never ending quest :lol:

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:
Screen-3.jpg
Screen-3.jpg (36.27 KiB) Viewed 17646 times

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:
Default Directory-3.fsm
(1.3 KiB) Downloaded 877 times
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Re: Default Directory locations

Postby RJHollins » Wed Jun 01, 2016 3:35 am

Gee ... not even a reply :oops:

Not even, 'that's the ugliest schematic ever seen !' .... just terrible ! .... nothing ? :|

:P
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Re: Default Directory locations

Postby Tronic » Thu Jun 02, 2016 5:51 am

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.

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

Postby RJHollins » Thu Jun 02, 2016 6:33 am

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 :oops: :lol:

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

Postby Tronic » Thu Jun 02, 2016 3:43 pm

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.
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: Default Directory locations

Postby tulamide » Thu Jun 02, 2016 5:16 pm

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

Postby RJHollins » Thu Jun 02, 2016 5:32 pm

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.
RJHollins
 
Posts: 1571
Joined: Thu Mar 08, 2012 7:58 pm

Re: Default Directory locations

Postby tulamide » Thu Jun 02, 2016 7:02 pm

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.
"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

Postby Walter Sommerfeld » Thu Jun 02, 2016 9:27 pm

...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!
User avatar
Walter Sommerfeld
 
Posts: 249
Joined: Wed Jul 14, 2010 6:00 pm
Location: HH - Made in Germany

PreviousNext

Return to General

Who is online

Users browsing this forum: No registered users and 51 guests