Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 14 of 14
  1. #1
    Join Date
    Feb 2007
    Posts
    5

    Grin How to open folders?

    Hi,

    I'm trying to create a button to open a folder on my d:\

    such as d:\program1

    I can't seem to do it. I tried the explore function but that doesnt seem to be it.

    Thanks

  2. #2
    Join Date
    Jul 2004
    Posts
    313
    result = Dialog.FolderBrowse("Please select a folder:", "d:\program1");

  3. #3
    Join Date
    Feb 2007
    Posts
    5
    Hi ianhull,

    That code bring's up the following dialogue:



    As apposed to the correct folder open infront of you.

  4. #4
    Join Date
    Oct 2005
    Posts
    24
    Try this :

    File.Open("D:\\program1", "", SW_SHOWNORMAL);

  5. #5
    Join Date
    Jul 2005
    Location
    Egypt
    Posts
    88
    Check this one as well
    Code:
    File.Open("", "d:\\program1", SW_SHOWNORMAL);

  6. #6
    Join Date
    Feb 2007
    Posts
    5
    Thanks guys. I tried fossil's first and it straight away worked.

  7. #7
    Join Date
    Feb 2007
    Posts
    5
    Hi sorry, one last question.

    how do I do it as <the default drive>:\

  8. #8
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    Depending on what you mean by "default drive" AMS has several Global Variables (or Build-in Variables) that are set dynamically at runtime and might be helpful to you.

    Adapted from the help file:
    Global variables (or "built-in variables") are variables whose values are automatically set when your AutoPlay application starts. They are used to represent common values that might differ between systems. These variables are all global which means you can use them anywhere in your project.

    Tip: The built-in variables are listed along with all of the actions and constants when you press Ctrl+Space in the script editor. Since all of the built-in variables start with an underscore, if you type _ and then press Ctrl+Space, you'll be taken right to the first built-in variable in the list.

    The following global variables are available in AutoPlay Media Studio:

    _DesktopFolder
    The path to the user's Desktop folder. On Windows NT/2000/XP/Vista, this is the path from the per-user profile.

    _DesktopFolderCommon
    The path to the user's Desktop folder. On Windows NT/2000/XP/Vista, this is the path from the All Users profile. On a non-Windows NT system, this will simply be the path to the user's Desktop folder (the same as _DesktopFolder).

    _ProgramFilesFolder
    The user's Program Files folder (typically, this is something like "C:\Program Files").

    _SourceDrive
    The drive that the AutoPlay application was run from (e.g. "C:" or "D:").

    _SourceFolder
    The full path to the folder that the AutoPlay application was run from (e.g. "C:\Downloads" or "D:").

    _SystemFolder
    The path to the user's Windows System folder (e.g. "C:\Windows\System" on non-NT systems, and "C:\Windows\System32" on NT based systems).

    _TempFolder
    The path to the user's Temp folder.

    _WindowsFolder
    The path to the user’s Windows folder (e.g. "C:\Windows").
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================

  9. #9
    Join Date
    Feb 2007
    Posts
    5
    Hi,

    well i've changed the code to:

    File.Open("_SourceDrive\Winamp", "", SW_SHOWNORMAL);

    but it doesnt seem to open the folder. (yep, I've added the folders to source directory.

  10. #10
    Join Date
    Feb 2007
    Posts
    11
    Use this:

    Code:
    File.Open("_SourceDrive\\Winamp", "", SW_SHOWNORMAL);

  11. #11
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    _SourceDrive is a variable, so it does not need to be contained in the quotes. Try like this:

    Code:
    File.Open(_SourceDrive .. "\\Winamp", "", SW_SHOWNORMAL);
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================

  12. #12
    Join Date
    Jan 2007
    Posts
    271

    Peekaboo! I think this will work

    File.Open(_ProgramFilesFolder.."\\Winamp\\Winamp.e xe"); >>>don't know why the .exe is showing with space


    If its the Winamp player you are wanting to open.
    Hope this helps,
    Get the Text App I posted and save this code in F directory
    so you'll always have the code.
    AudioSam

  13. #13
    Join Date
    Jan 2007
    Posts
    271

    Wink Had to add a note

    File.ExploreFolder("C:\\Program Files\\Winamp", SW_SHOWNORMAL)

    If its the Winamp folder yau are wanting to open.

  14. #14
    Join Date
    Sep 2009
    Posts
    1

    Delete folder/s

    Quote Originally Posted by Vaz View Post
    Hi ianhull,

    That code bring's up the following dialogue:



    As apposed to the correct folder open infront of you.
    I would like to have simaler but to delete chosen folder or folders

    Thanks

Similar Threads

  1. AMS project to browse & open network folders
    By romanocy in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 09-03-2007, 08:20 AM
  2. Open PowerPoint file to a specific slide
    By Echo S in forum AutoPlay Media Studio 5.0
    Replies: 7
    Last Post: 02-26-2004, 06:17 PM
  3. INFO: Finding Shell Folders in the Registry
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-10-2002, 03:52 PM
  4. HOWTO: Open an HTML Help File to a Specific Topic
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-01-2002, 02:24 PM
  5. HOWTO: Open an Internet URL in the Default Web Browser
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 09-18-2002, 01:59 PM

Posting Permissions

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