Applescript - filename achterhalen?
4 april 2005 - 10:03   
geplaatst door: Creator
Als ik met een open bestand werk, hoe kan ik de bestandnaam achterhalen en die in een variabele steken?


THX!

Applescript - filename achterhalen?
4 april 2005 - 11:31    reactie #1
geplaatst door: zonapple
Dat hangt er van af in welk programma je het bestand geopend hebt.
There's 10 types of people in this world, those who understand binary and those who don't.
Applescript - filename achterhalen?
4 april 2005 - 12:15    reactie #2
geplaatst door: BFunk
Als ik je vraag goed begrijp wil je de naam achterhalen van een document dat je op dit moment geopend hebt.

Dat doe je meestal door te vragen om de naam van het huidige document:


tell application "Microsoft Word"
set naam to the name of active document
end tell

Het huidige venster:


tell application "FileMaker Pro"
set naam to the name of window 1
end tell

Of (als je een programma niet rechtstreeks met AppleScript kunt benaderen) via System Events:


tell application "Finale 2005b" to activate
tell application "System Events"
tell process "Finale 2005b"
set naam to the name of window 1
end tell
end tell

Hopelijk helpt dit.
Hartelijke groet.

Applescript - filename achterhalen?
4 april 2005 - 13:35    reactie #3
geplaatst door: Creator
Bedankt! Ga ik vlug eens proberen!