Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Location
    Oklahoma
    Posts
    12

    How to remember last folder opened?

    In ams 4 I know how to make file/folder browse remember last folder opened (i.e. after opening html file or mp3 file etc.), but in ams 5 I haven't figured it out yet. Any help would be appreciated.

    Also, how to open more than a single mp3 file at a time (i.e. have them play one after the other). Thanx.

  2. #2
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244
    You can use the variable to open the last folder:

    LastFolder = Dialog.FolderBrowse("Please select a folder:", "AutoPlay\\Docs");
    and next time, use:
    Dialog.FolderBrowse("Please select a folder:", LastFolder);

    As for multiple files, set MultipleSelect to true in Dialog.FileBrowse
    Last edited by Derek; 02-17-2005 at 05:17 AM.
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  3. #3
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    I have done this in the past

    Code:
    if not LastFolder then
    LastFolder = "AutoPlay\\Docs"
    end
    LastFolder = Dialog.FolderBrowse("Please select a folder:", LastFolder);
    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  4. #4
    Join Date
    Nov 2003
    Location
    Salzburg / Austria
    Posts
    312
    If you wan't to remember a little bit longer, you can do something like this:

    Project / Actions: 'On Startup'
    Code:
    --try reading last Folder from Registry
    LastFolder = Application.LoadValue("MyProject", "LastFolder");
    if LastFolder=="" then
      --if doesn't exist use predefined folder
      LastFolder = "AutoPlay\\Docs";
    end;

    Code placed in Button 'On Click'
    Code:
    --show browse dialog
    NewFolder = Dialog.FolderBrowse("Please select a folder:", LastFolder);
    if NewFolder~="CANCEL" then
      LastFolder=NewFolder;
      --write new folder to the registry
      Application.SaveValue("MyProject", "LastFolder", LastFolder);
    end;

    Stefan_M
    "With a rubber duck, one's never alone."

    Douglas Adams, The Hitchhiker's Guide to the Galaxy

  5. #5
    Join Date
    Feb 2005
    Location
    Oklahoma
    Posts
    12

    Thanx much

    Thanx for the help guys, appreciate it much.

Similar Threads

  1. Folder remember
    By rhosk in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 04-08-2004, 07:14 AM
  2. HOWTO: Build and Burn Your AutoPlay Application
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-28-2002, 03:43 PM
  3. HOWTO: Create an Empty Folder
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-21-2002, 03:21 PM
  4. INFO: The Explore Button on the Distribution Folder Dialog
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-11-2002, 12:06 PM
  5. HOWTO: Locate Internet Explorer's Favorites Folder
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-11-2002, 09:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts