This content has been marked as final. Show 12 replies
> typeagent =
> baReadIni("Type_of_Agent","Agent","error","@\\\Main_Experiment\order.ini" )
> Main experiment is a folder and order.ini the file i am tryign to access using
Is the folder name "Main Experiment" or "Main_Experiment"? You have
spelled it 2 different ways above.
So you need to go up 2 levels and then down into a folder to find the
file? Would it be simpler to base your path off _player.applicationPath?
The folder is Main_Experiment (with underscore).
Would it be simpler to base your path off _player.applicationPath?
What do you mean? Can you be more specific?
Here's a sledgehammer to crack a nut. Go >here< and download the top three scripts. import them into your movie as Movie Scripts. Make sure the Xtra Broker script is called just that: "Xtra Broker".
Now you can use...
To convert between absolute and relative paths, regardless of the platform on which the path was created.
Does that help?
I think the @ relative path only works with go to movie commands. For file handlers you generally need the full path.
> Would it be simpler to base your path off _player.applicationPath?
> What do you mean? Can you be more specific?
Did you read the docs for 'the applicationPath'? Do you understand the
difference between _movie.path and _player.applicationPath?
Is the executable that runs you Director file further up the folder
hierarchy than the movie from which you are trying to locate you ini
file? If so, it might be easier to start an absolute path based on where
the executable is than where the movie is.
OpenSpark I did what you recommended but I am uncertain how to use this:
what is the aSourcePath? the aReferencePath?, aPath? aList?
Sean the folder that I want to access is on a different drive (D). Director resides on C:. I think the solution may come from the behaviours openspark suggested. However, i still need to figure out how to work with them. Openspark are you out tthere?
I tried this in the message window
and I am getting unable to create an instance of filextra. Any ideas?
Got it. All I had to do was to download fileIOXtra 4.0. It works just fine. Many many thanks
Is the projector/ movie on C or D drive? If it's on C and the file is on D then I doubt a relative path is going to work.
The _player.applicationPath points to Director in authoring but it points to the exe when in a projector.
> Sean the folder that I want to access is on a different drive (D). Director
> resides on C:.
If it's on a different drive you *can't* construct a relative path! You
will have to provide the full path to your ini file.
> I tried this in the message window
> and I am getting unable to create an instance of filextra. Any ideas?
Yes, you neglected to provide your projector with a copy of FileXtra4.
But it's irrelevant - you cannot construct a relative path to a file on
a different drive.