Page 1 of 1
Default 'save as' folder - in LC
Posted: Fri Jan 23, 2015 3:48 pm
by MrAlobar
Is there a way to change the default folder when doing a 'Save As' ?
Mine defaults to the installation directory - I want it to default to the location of my files ( it does this ok in the Start Centre ).
Cheers,
Jay
Re: Default 'save as' folder - in LC
Posted: Fri Jan 23, 2015 4:13 pm
by FourthWorld
See the Dictionary entry for the "ask file" command, which includes an option to specify the path the dialog opens to.
Re: Default 'save as' folder - in LC
Posted: Fri Jan 23, 2015 4:19 pm
by AndyP
Hi Jay,
open the Message Box and put this in and hit return
set the defaultFolder to "YOURFILEPATH"
YOURFILEPATH is obviously something like C:\users\
Re: Default 'save as' folder - in LC
Posted: Fri Jan 23, 2015 7:56 pm
by MrAlobar
Excellent, thanks guys.
I didn't think the answer to an LC DE problem would be in the coding dictionary, nor that the solution would involve using a tool that I thought was just for developing !
I mustn't be so blinkered next time !
Re: Default 'save as' folder - in LC
Posted: Fri Jan 23, 2015 8:23 pm
by FourthWorld
I think Andy's reply was meant for use within the IDE. In your standalone you clearly wouldn't want your users to have to enter values in a Message Box, so if your question was for a standalone see the Dictionary entry for the "ask file" command for guidance on settings the default location it opens to.
Re: Default 'save as' folder - in LC
Posted: Fri Jan 23, 2015 10:52 pm
by MrAlobar
I was referring to the IDE FourthWorld.
I now get the point though about the dictionary, re. standalones - thanks for clarifying.
Re: Default 'save as' folder - in LC
Posted: Sat Jan 24, 2015 1:09 am
by FourthWorld
One fun thing to remember about the LC IDE is that it's all written in LiveCode. You can make it do anything you want, if you have the time to poke around in it.
One easy way to get started is making a plugin for it, perhaps one that sets your default path to whatever folder you like.
See section 12.2 Extending the LiveCode IDE on page 357 of the User Guide, accessible from the Help menu.
Re: Default 'save as' folder - in LC
Posted: Wed Jan 28, 2015 4:11 pm
by MrAlobar
Hi FourthWorld,
Thanks for that tip about plugins - when I realised that the change was not sticking I created the plug-in as you suggested - it was very simple and great way to get started - so thanks for the suggestion. My plug-in now invisibly sets my default folder on start up - great.