View folder contents in window

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • boroarke
    Forum Member
    • Aug 2004
    • 63

    View folder contents in window

    I have a button on a page that links to a folder on my cd which contains dozens of graphic images. When the user clicks on the button to browse the graphics, is there any way to just have a simple window open up that displays the files in the folder instead of having the default Windows browse folder window open? Does that make any kind of sense?

    Thanks!
    Bryan
  • Corey
    Indigo Rose Staff Alumni
    • Aug 2002
    • 9745

    #2
    Hi. If you can post a screencap of a "simple window" that would help. If you mean an AMS window, then you could easily display a folder's content in a paragraph object, list box, combo box, html object, flash tree menu, etc... The window layout would be up to you.

    Comment

    • boroarke
      Forum Member
      • Aug 2004
      • 63

      #3
      Thank you! That is what I meant. Id like to display it in a AMS window. Is there someone or someplace I could find some code to do that? I am still pretty green with AMS and real green when it comes to programming. Id like to try the HTML object or flash method or the paragraph object if anyone knows how to do this and could explain it to me. THanks for all your guys help!
      Bryan
      Last edited by boroarke; 06-14-2005, 10:28 PM.

      Comment

      • Corey
        Indigo Rose Staff Alumni
        • Aug 2002
        • 9745

        #4
        Hi. Here's a great place to get started, it's pretty easy once you try it:



        If you have any questions as you're trying that out, just let us know. :yes

        Comment

        • Intrigued
          Indigo Rose Customer
          • Dec 2003
          • 6138

          #5
          Do mean like...

          1. Add a Web Object (do not rename it for this example).
          2. Put the following code say in a Button Object's On Click (or quicker, the Page1's On Click) Event section.

          Code:
          strFolder = Dialog.FolderBrowse("What folder?", _DesktopFolder)
          	Web.LoadURL("Web1", strFolder)
          Intrigued

          Comment

          • Intrigued
            Indigo Rose Customer
            • Dec 2003
            • 6138

            #6
            Here is a screencap of a partial Web Object using the code I shared.

            My pup is pooped out (tired) (for a change).

            Attached Files
            Intrigued

            Comment

            • Corey
              Indigo Rose Staff Alumni
              • Aug 2002
              • 9745

              #7
              Har, I love his expression. Looks like he really has the weight of the world upon him.

              Comment

              • Intrigued
                Indigo Rose Customer
                • Dec 2003
                • 6138

                #8
                Ya, he gets way to many backrubs from me. He uses my back (when I read on the floor) as a step to the bed, he snorts (nose), not barks, to get my attention at "din din" time (dinner).

                Oh, I know the dark side of the force has sent him... now, to find out if he is the master or the apprentice!

                Intrigued

                Comment

                • Corey
                  Indigo Rose Staff Alumni
                  • Aug 2002
                  • 9745

                  #9
                  Hee. :yes

                  Comment

                  • boroarke
                    Forum Member
                    • Aug 2004
                    • 63

                    #10
                    Intrigued,
                    Is there a way to set up that code so when the person clicks on the button, it automatically displays the contents of a predetermined folder instead of a folder browser window opening? Id like the user to be able to click on the button and the contents of a particular folder be displayed. For example, Id like the user to click the button labeled "Car Graphics" and when clicked, the contents of the folder on the cd named 'car graphics' is displayed in the web object. Is this possible? I don't want the user to have to physically browse to that particular folder on the disc, id like the contents of that folder to be displayed without any work from the user.

                    Thanks again for all the help! :yes
                    Bryan

                    Comment

                    • Intrigued
                      Indigo Rose Customer
                      • Dec 2003
                      • 6138

                      #11
                      Originally posted by boroarke
                      Intrigued,
                      Is there a way to set up that code so when the person clicks on the button, it automatically displays the contents of a predetermined folder instead of a folder browser window opening? Id like the user to be able to click on the button and the contents of a particular folder be displayed. For example, Id like the user to click the button labeled "Car Graphics" and when clicked, the contents of the folder on the cd named 'car graphics' is displayed in the web object. Is this possible? I don't want the user to have to physically browse to that particular folder on the disc, id like the contents of that folder to be displayed without any work from the user.

                      Thanks again for all the help! :yes
                      Bryan
                      Short answer, yes. Longer answer, well I'm off to the 'shop' to get my work on. If no one answers soon (*hint *hint )... I'll whip up an example later this morning.
                      Intrigued

                      Comment

                      • Intrigued
                        Indigo Rose Customer
                        • Dec 2003
                        • 6138

                        #12
                        Here is the code I used for this example: (now, I did this on a system that only has one 'ROM drive)

                        Code:
                        [color=#006600]-- First get all drives (corrosponding letters, ie. 'C:\', 'D:\')[/color]
                        tblDrives = Drive.Enumerate()
                        
                        [color=#006600]-- Find the CD/DVD drive (each = index and drivename = ie. 'C:\', "D:\"[/color]
                        for each, drivename in tblDrives do
                        
                        [color=#006600]-- Set a variable for the type of drive found[/color]
                        drive_type = Drive.GetType(drivename)
                        
                        	[color=#006600]-- Actual check is done here and the contents put into the Web Object[/color]
                        		if (drive_type == DRIVE_CDROM) then
                        			Web.LoadURL("Web1", drivename.."\Put the folder name here you want on the CD/DVD-ROM")
                        		end
                        end

                        Here is a sample project:


                        SEE: Attachment
                        Attached Files
                        Last edited by Intrigued; 06-15-2005, 10:09 AM.
                        Intrigued

                        Comment

                        Working...
                        X