Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 8:00 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: How to let user determine data path
PostPosted: November 11th, 2014, 9:25 pm 
Offline

Joined: November 11th, 2014, 10:21 am
Posts: 7
Opus: Creator v9.5 build 16647
OS: Windows 7
First I have only had the Creator program for a few days, not a programmer in any sense of the word, am hoping the object oriented nature and using actions will let me create a simple dashboard of text boxes that the end user can easily edit.

PROBLEM
Trying to have a persistent text input box (text entered or edited by user, put into a variable that is saved to when reopened the text that was saved is loaded, and user has what they last were working on) , having problem with getting variable data path to work (trying to make path default to where ever the exe is). Typed in path and works fine, just can't get the path variable working

OBJECTIVE
On application launch I want to load text files into variables if there, that are then shown in text input boxes, (using on show, page1 to load files, could not figure a way to do on application launch) also trying to make it save as automatically as possible (could not find option to do when exits) so currently using button to write variables to disk, but would like to be able to do on exit automatically, I know I can make exit button that does this via multiple actions, but would hate to lose contents if they alt-F4 or hit esc.)

Idea is that user can launch, customize text in input box, close app and all their edits will be be there when they come back (could not find a trigger that worked on open or close so went with page show to load, and I guess would have to create a button to save all variables to disk (unless some action exists or trigger that would do this automatically.)

Also would like ability to have user set path for all these text files. User sets path using directory browse action, set to variable, that is read in as path to save all the variables to as individual text files and stays same unless user changes it, when they do should re-save to new location.

What I am doing feels like it should work but can't figure out what I am doing wrong. Nothing is persistent between running it when I do a publication test.

Any help advice or suggestions specific to doing this in Creator via actions would be greatly appreciated. Sure it is something simple that I am missing tried several of the built in variables but no luck.


Attachments:
TextDashboard.zip [14 KiB]
Downloaded 1172 times


For this message ceejames has been thanked by : mackavi
Top
 Profile  
 
 Post subject: Re: How to let user determine data path
PostPosted: November 12th, 2014, 11:58 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
You need to add a profile with your Creator version using the Control Panel - top right when logged in.

Attached is example of save to user path with a demo of Creator 9.5

</mack>


Attachments:
path.imp [20 KiB]
Downloaded 1313 times

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


For this message mackavi has been thanked by : ceejames
Top
 Profile Visit website  
 
 Post subject: Re: How to let user determine data path
PostPosted: November 13th, 2014, 5:55 am 
Offline

Joined: November 11th, 2014, 10:21 am
Posts: 7
Opus: Creator v9.5 build 16647
OS: Windows 7
Exactly what I needed, implemented in my app and gave a try. Had it setup similar so I was on the right track. By looking at the example you provided and experimenting realized I was not typing in the variable exactly, thought as long as between carets would be fine, but had capitalized first letter when originally designated.

So creating a Datapath variable works, but my next challenge was to make it persistent between sessions. I originally saved it like <Datapath>datapath.txt. Then tried to reload it same way on show <Datapath>datapath.txt. But when I reran the app it did not know where the datapath.txt file. Finally figured out to just save the datapath.txt by itself, not using variable. Assume it is going to some kind of default path the app looks in when it runs. Then just reload datapath.txt into variable for the path and everything saves as directed. As long as it saves the text files in the right spot is what I am trying to do.

Not a natural thinking process for a non-programmer, so the help was much appreciated.

Now to my next objective - how to make it autosave the text files

And just wanted to say thank you, by examining path publication, learned to insert variables right click function because I could not figure out how you got the variable to display in a text box. A simple and incredibly powerful feature did not find anywhere else.


For this message ceejames has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: How to let user determine data path
PostPosted: November 13th, 2014, 9:36 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Glad it helped.

Two tips:

When you right click and insert a variable - there are a list of existing variables. This provides a wealth of information including allowing access to various paths on the computer such as SYSTEM_DOCUMENTS_DIR - IE My Documents.

Looking up system variables in the help will explain some, but you can also just insert them into a text box and run the publication to see what value they will display.

Tip Two:

The insert variable on right click also contains a Constant Expression box. This is how you display an array.

In the box, enter the array name plus the index value for the cell to be displayed. IE: myArray[index] so

myArray[0] for the first cell myArray[1] for the second cell.


</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: How to let user determine data path
PostPosted: November 13th, 2014, 9:31 pm 
Offline

Joined: November 11th, 2014, 10:21 am
Posts: 7
Opus: Creator v9.5 build 16647
OS: Windows 7
Thanks, been digging through help and manual trying to figure it out and turns out was using the wrong brackets ( ), instead [ ]. Of course using the constant expression what is I needed to use the variable array inside the button title.

Quite amazed by Creator, using some variables and actions starting to have an app that works, programming without really programing so far. Learning curve is bit stiff and manual is basic, needs more examples, but community is outstanding.


For this message ceejames has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: How to let user determine data path
PostPosted: November 14th, 2014, 4:37 am 
Offline

Joined: November 11th, 2014, 10:21 am
Posts: 7
Opus: Creator v9.5 build 16647
OS: Windows 7
Know I am asking lots of questions but struggling with same basic functions. Trying to save a variable array as a text file, then load that variable array back into the variable from the text file. Does not list array so I can't load Did not know if there is another way to do this or I am missing something (most likely).

Thanks,
Cory


For this message ceejames has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: How to let user determine data path
PostPosted: November 16th, 2014, 5:41 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
You're moving quickly towards things that are only possible / more practical with Opus Pro :-(.

I'm also afraid that my Cretaor demo has expired - but I think you might be able to open an Opus Pro file as I've not used any advanced features. If not, the theory would be to use the set variable to expression action on the programming tab to copy information to / from a temporary variable.

You also need to know this line of code

Code:
myArray.length


Use the set variable to expression again and this code to copy the length of the array into a variable and then use a loop to move through the array.

</mack>


Attachments:
array.imp [17 KiB]
Downloaded 1301 times

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057
Top
 Profile Visit website  
 
 Post subject: Re: How to let user determine data path
PostPosted: November 19th, 2014, 1:34 am 
Offline

Joined: November 11th, 2014, 10:21 am
Posts: 7
Opus: Creator v9.5 build 16647
OS: Windows 7
Tried noodling through your example, and still cannot figure out how to save variable array, and more importantly cannot figure out how to load it back up so the changes are persistent.

Have buttons with variable array locations: Tabtitles [1], on another page have simple text input boxes that take the input and store it into an array location Tabtitles [1]..[2]..[3]....

While the app is open the changes made, persist just fine. All I need is to make it persistent between open and closing the app. When I go to actions/storage write or read to disk, but when I go to select variable does not show anything for my Tabtitles variable array. (appears there is not load/save options for variable arrays. Can do it the hard way and save each one individually and load individually but seems much more complicated that just loading one file.

Maybe copy from the variable array some how to regular variable, write that one, do the same thing in reverse when load from disk. Not sure why you can't read and write variable arrays....?

Any help or advice appreciated.

I tried to implement on the go back button on page two (accessed from sprocket icon on main page) of the attached file, but was not sure of the why of some of the steps. And still could not figure out how to load it (currently have on page 1 on show loading all my saved files).


Attachments:
TextDashboard.zip [43.18 KiB]
Downloaded 1113 times


For this message ceejames has been thanked by : mackavi
Top
 Profile  
 
 Post subject: Re: How to let user determine data path
PostPosted: November 19th, 2014, 10:26 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
ceejames wrote:
Not sure why you can't read and write variable arrays....?

Because this is Creator not Opus.

</mack>


Attachments:
TextDashboard.imp [61.4 KiB]
Downloaded 1245 times

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057
Top
 Profile Visit website  
 
 Post subject: Re: How to let user determine data path
PostPosted: November 20th, 2014, 2:40 am 
Offline

Joined: November 11th, 2014, 10:21 am
Posts: 7
Opus: Creator v9.5 build 16647
OS: Windows 7
Obviously not Pro, and not really helpful though, lol. Seems like it should not be any harder to implement than saving a regular variable. Not trying to script or program just want to save some data, load some data.

Based on response sounds like it is not possible in creator. No biggee, will just hard code the titles, or just do with regular variables. Would have been nice to just load and save one file rather than 15.

Half the fun is trying to do things, succeeding at some, finding work arounds, and sometimes maybe not. Was hoping would be able to do more with options on objects without having to resort to scripting or programming. But what you can do is impressive and has tons of options, particularly transitions and the like.

Thanks for input.


For this message ceejames has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group