Handler does not accept space in textstring
Handler does not accept space in textstring
- Subject: Handler does not accept space in textstring
- From: Iurista GmbH <email@hidden>
- Date: Thu, 06 Mar 2014 00:56:15 +0100
Hi
I would like to write to a plist file via an applescript file functioning as a handler.
The calling script is like this
set {act, gid, val} to {"s", "app__MyAppsPfad", "Applications:other Software:"}
set UH to alias ("Shared:Scripting:Applescript Corner:Universelle Handlers:ash| GlobalServer.scpt")
run script (UH) with parameters {act, gid, val}
the handler script "ash| GlobalServer.scpt" has the following code:
on run {act, gid, val}
-- some lines of code not interesting here
if act = "s" then -- Schreiben
set x to ("defaults write com.durrer.Globals ) & gid & " " & val)
# return x -- this one is here only for testing purposes
do shell script x
end if
The probem is:
When the variable val contains a space (" ", like above in "Applications:other Software:"), the script calling the handler returns an error.
What do I wrong in scripting?
Thx for help
Rudolf
--
The price of freedom is eternal vigilance (Thomas Jefferson, US President)
This mail is from:
Rudolf O. Durrer
IURISTA CONSULT GmbH
Legal Counselors
Switzerland
email@hidden
email@hidden
_______________________________________________
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