(no subject)
(no subject)
- Subject: (no subject)
- From: Egbert Bonte <email@hidden>
- Date: Mon, 28 Jul 2003 18:51:22 +0200
Dear list.
I have seen a lot of questions about default folders. I have had this
question also. I dit not find a good solution in AS.
What works is a combination. When importing graphics and/or text in
QuarkXpress you always have to select the location of the file to be
imported. When graphics and textfiles are not situated in the same folder
you have a problem because Quark remembers the last path to an imported
file. After importing a PDF-file the last known path of Quark became the
desktop. Scripting with sortroutines in order to get a sorted list of files
or folders was too slow.
We found a solution in a combination of scripts. In FaceSpan an application
is made in which the user can set 4 paths. One of them is de default path of
the application. Our application is called "PadVinder" (in english:
PathFinder). When you want to import a graphic or text you have to: 1)
select a text or picture box in Quark, 2) activate the PadVinder, 3) push
the Import-button of the PadVinder, 4) select the file you want to import in
the selected box (the path to the file is a string which is the selected
path of the PadVinder)
When you push the Import button you are actually calling a routine in the
project script --- on OpenBestand(FolderNaam) ---
---- FolderNaam --- is the path to the folder you want.
As you can see in the routine below we use "Smile". In "Smile" you can use
the command --- navchoose --.
It works perfect. The routine returns the string "FileAlias". This string is
used to tell application Quark which file should be imported in the selected
text or picture box.
If there is a solution with an OSAX i will be vere glad to here.
I hope that people can use this.
Greetings
Egbert
P.S. We use OS 9.2.2
-------
on OpenBestand(FolderNaam)
set SoortBox to contents of storage item "SoortBox"
set FileAlias to "GEEN SELECTIE"
if SoortBox = "TXTB" then
tell application "Smile"
activate
try
navchoose file with prompt "Kies een bestand..." of
type {"TEXT"} starting at alias FolderNaam multiple files no
set FileAlias to result
end try
end tell
end if
if SoortBox = "PICB" then
tell application "Smile"
activate
try
navchoose file with prompt "Kies een bestand..." of
type {"EPSF", "TIFF", "PDF "} starting at alias FolderNaam multiple files no
set FileAlias to result
end try
end tell
end if
return FileAlias
end OpenBestand
_______________________
De informatie in deze e-mail is vertrouwelijk en uitsluitend bestemd voor de geadresseerde. Indien u niet de geadresseerde bent, wordt u er hierdoor op gewezen, dat u geen recht hebt kennis te nemen van de rest van deze e-mail, het te kopikren of te verstrekken aan andere personen dan de geadresseerde. Indien u deze e-mail abusievelijk hebt ontvangen, wordt u verzocht de afzender daarvan op de hoogte te brengen.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.