Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to convert *space* to %20




On Nov 1, 2009, at 03:51, CJ Kelley wrote:

Hi all,

I am writing an applescript application that will send an http request to the Alice bot. My question is, how do i convert a space to %20?

If i send a message like this:

"Hello Alice"

I get "400 - Bad Request"

Thanks in advance!
--CJ

--


An AS strict solution

<script>
encode("Hello Alice", space, "%20")

on encode(x, y, z)
	tid(y)
	set x to text items of x
	tid(z)
	return x as string
end encode

on tid(x)
	set AppleScript's text item delimiters to x
end tid
</script>
-->"Hello%20Alice"


Deivy Petrescu 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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >how to convert *space* to %20 (From: CJ Kelley <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.