• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript and shell scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript and shell scripting


  • Subject: Re: AppleScript and shell scripting
  • From: Yvan KOENIG <email@hidden>
  • Date: Sun, 27 Dec 2015 20:55:43 +0100

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



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: AppleScript and shell scripting
      • From: Maik Waschfeld <email@hidden>
References: 
 >AppleScript and shell scripting (From: Maik Waschfeld <email@hidden>)

  • Prev by Date: AppleScript and shell scripting
  • Next by Date: Apple Configurator 2 (was Re: El Capitan)
  • Previous by thread: AppleScript and shell scripting
  • Next by thread: Re: AppleScript and shell scripting
  • Index(es):
    • Date
    • Thread