Adobe Dreamweaver Forums



Last 10 THreads :         Unable to create SWC in Flash CS4 (Last Post : nrajbhan - Replies : 1 - Views : 2 )           »          Flash CS4 External Lirbrary (Last Post : nrajbhan - Replies : 1 - Views : 2 )           »          Opening different Flash Galleries with differentlinks... (Last Post : Nancy O - Replies : 8 - Views : 9 )           »          Favicon for context-sensitive Help (WebHelp) (Last Post : LuckyClover - Replies : 5 - Views : 6 )           »          Re: Help authenticating installer (Last Post : scarletnew - Replies : 2 - Views : 5 )           »          unlinking shared assets (Last Post : dmodie - Replies : 0 - Views : 1 )           »          Spry Accordion Panel Default State All Closed? (Last Post : Steven_K - Replies : 2 - Views : 3 )           »          Re: export image in D11 (Last Post : Applied CD - Replies : 0 - Views : 1 )           »          Re: Adobe Capture?? (Last Post : CatBandit - Replies : 0 - Views : 1 )           »          catching errors from remotely invoked processes (Last Post : Cr99 - Replies : 2 - Views : 3 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Director
 
Tags: ,



Reply
  #1 (permalink)  
Old 09-25-2008, 09:13 AM
budgiebird
 
Posts: n/a
Diggs:
Default open a folder

Hi all,
I need to open a folder from a director movie, in its own window not in the
director window. I know how to launch an app, but dont seem to be able to crack
this one.
Thanks
- oh, and I'm using Windows, but a Mac answer would be cool too.



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-25-2008, 01:16 PM
Andrew Morton
 
Posts: n/a
Diggs:
Default Re: open a folder

budgiebird wrote:
> I need to open a folder from a director movie, in its own window not
> in the director window. I know how to launch an app, but dont seem to
> be able to crack this one.
> Thanks
> - oh, and I'm using Windows, but a Mac answer would be cool too.


For Windows, you can use explorer.exe:
http://support.microsoft.com/kb/152457

If you're using BuddyAPI, you can use baOpenFile with the name of the
folder, which also works on Macs.

Andrew


Reply With Quote
  #3 (permalink)  
Old 09-25-2008, 01:54 PM
openspark
 
Posts: n/a
Diggs:
Default Re: open a folder

The path to the folder you want to open will need to be an absolute path. This
is true whether you choose to use Director's native "open with " command, or
Buddy API's baOpenFile() command. The need for an absolute path raises two
issues:

1) Macintosh and Windows use different path delimiters to define an absolute
path.
2) On end-users' machines, the absolute path you provide is likely to be wrong.

Is your application intended for a kiosk where you have total control of the
system? If not, you will need to store the path to the folders as a relative
path (with respect to the current movie), and convert back to an absolute path
on the fly.

You can find PathRelativeTo() and PathMakeAbsolute() handlers in the File
Manager script that you can find here: [nonlinear.openspark.com]. The File
Manager script depends on the two others, so be sure to copy all three scripts
to your movie.

You can then use the open() command to open the chosen folder. The application
that will open the folder is different on Macintosh and Windows. Here's a code
snippet to get you started:

on mouseUp
vFolder = the applicationPath -- oven-ready absolute path... or use your own

if the platform starts "Mac" then
vApplication = "Finder"
else
vApplication = "Explorer"
end if

open vFolder with vApplication
end mouseUp

Reply With Quote


  #4 (permalink)  
Old 09-25-2008, 02:00 PM
budgiebird
 
Posts: n/a
Diggs:
Default Re: open a folder

so far I've tried
-- open "C:\Program Files\Microsoft Office\Office10" with "explorer.exe"
--open (QUOTE & C:\Documents and Settings & QUOTE) with "explorer.exe"
--open ("C:\Documents and Settings") with "explorer.exe"
--open " & C:\Documents and Settings & " with "explorer.exe"
--open "C:\Documents and Settings" with "explorer.exe"
--open "C:\Documents and Settings"
--window("C:\Documents and Settings").open("explorer.exe")
--window("C:\Documents and Settings").open()
--window("C:\Documents and Settings") with "explorer.exe"
--open "Explorer /root,\\Documents and Settings"
--open "Explorer /root,\\Documents and Settings" with "explorer.exe"
-- ("C:\Documents and Settings").open = "explorer"

and not got anywhere :-(

Reply With Quote
  #5 (permalink)  
Old 09-25-2008, 04:12 PM
Andrew Morton
 
Posts: n/a
Diggs:
Default Re: open a folder

budgiebird wrote:
> so far I've tried

<loads>
> and not got anywhere :-(


open("explorer.exe " & quote & "C:\Documents and Settings\" & quote)

Andrew


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 06:24 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk