I got a running script with this code :
set the_MePath to (path to me) (* # Used for tests so I was able to run from the script editor set the_MePath to ((path to desktop as text) & "dossier sans titre:maybe.scpt") as alias *)
tell application "Finder" set the_MeCont to (container of the_MePath) as string end tell set the_MeContShell to (text 1 thru -2) of the_MeCont
--normaly not there! --set the_MePara to (the_MeCont & "STH-C Para WAV_48k_24.txt") (* set the_Parameters to (open for access file the_MePara with write permission)
write ("WAV 24 48000 48k ") to the_Parameters
close access the_Parameters --normaly not there! *) --intended to be there! set the_MePara to (do shell script "find " & (quoted form of POSIX path of the_MeContShell) & " -iname 'STH-C Para *'") set the_MePara to POSIX file the_MePara
--set the_Parameters to (open for access file the_MePara)
set the_ParaList to (read file the_MePara)
--close access the_Parameters (* set userFormat to paragraph 1 of the_ParaList set userBitDepth to paragraph 2 of the_ParaList set userSampleRate to paragraph 3 of the_ParaList set shortSampleRate to paragraph 4 of the_ParaList *) set {userFormat, userBitDepth, userSampleRate, shortSampleRate} to paragraphs 1 thru 4 of the_ParaList
--> {"WAV", "24", "48000", "48k"}
Yvan KOENIG running El Capitan 10.11.2 in French (VALLAURIS, France) dimanche 27 décembre 2015 20:55:38
|