• 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
AppleScript and shell scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AppleScript and shell scripting


  • Subject: AppleScript and shell scripting
  • From: Maik Waschfeld <email@hidden>
  • Date: Sun, 27 Dec 2015 17:36:33 +0100

Hi List,

I'm on Mac OS X 10.11.2 and do have problems with AppleScript and the shell scripting.

The following script is a cut-out from a larger project:




tell application "Finder"
set the_MePath to (path to me)
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\r24\r48000\r48k\r") 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_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















































The lines between the "--normaly not there!"-lines fills a file in the AppleScript's directory with data.

 So, now the file is there.

If I delete these lines and activate the line below "--intended to be there!", the shell should find this file.

What I get then, is an error:

error "Fehler beim Zugriff auf das Netzwerk." number -5000 from file "/Users/Shared/_AppleScript Development/_Archiv Sniplets/STH-C Para WAV_48k_24.txt" to «class fsrf»

at "open for access file the_MePara".
 Any idea, anyone?


With kindest regards…
…Maik Waschfeld

(sent from my MBAir11)


 _______________________________________________
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: Deivy Petrescu <email@hidden>
    • Re: AppleScript and shell scripting
      • From: Yvan KOENIG <email@hidden>
  • Prev by Date: Re: Help with grep
  • Next by Date: Re: AppleScript and shell scripting
  • Previous by thread: Re: Getting Back Into AppleScript
  • Next by thread: Re: AppleScript and shell scripting
  • Index(es):
    • Date
    • Thread