Normal Topic @LocalFileDialog(title, filter) (Read 7173 times)
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
@LocalFileDialog(title, filter)
Mar 5th, 2018 at 12:00am
Print Post Print Post  
Question, is there a way to add more than one file type for this command?

For example, @LocalFileDialog("Choose a picture", "*.png, *.jpg, *.bmp")
  
Back to top
 
IP Logged
 
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Re: @LocalFileDialog(title, filter)
Reply #1 - Mar 5th, 2018 at 2:07pm
Print Post Print Post  
Also, is it possible to start this command in a different folder or directory?

For example, Sesame is defaulted to Start In "C:\Sesame2" but I would like this to command to Start In somewhere else, say "C:\Users\User\Downloads".
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: @LocalFileDialog(title, filter)
Reply #2 - Mar 5th, 2018 at 2:34pm
Print Post Print Post  
The File Dialog uses the Current Working Directory of the Sesame program so you can swap that to a different directory and then swap it back. It is VERY important to swap it back otherwise other pieces of your code that are expecting it to be C:\Sesame2(Or whatever you have it set to) will fail.

Code
Select All
Var vPicked as String
Var vCWD as String

vCWD = @LocalCWD()
LocalCWD("C:\Sesame2\Pics")
vPicked = @LocalFileDialog("Pick One", "*.{jpg,png,gif}")
LocalCWD(vCWD) 



-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
actiontech
Full Member
***
Offline



Posts: 173
Joined: Apr 10th, 2016
Re: @LocalFileDialog(title, filter)
Reply #3 - Mar 6th, 2018 at 12:37am
Print Post Print Post  
Oh, cool this is a new command since Version 2.5.3, I didn't see it in the Programming Guide. Thanks, I'll try this too.
  
Back to top
 
IP Logged