Batch replace characters

Hi everyone!

I’ve been searching thru this site and the internet and found a lot of ways to replace single words with single other words. And also found a few ways that were better… but I need to replace all special characters (e.g. @ with %40)
and there are a few ways that kinda work but only if you enter no more than 1 special character…

I found this script that does what i want but i don’t see a way to enter all the special character’s and their hex coding into it without that costing much time…

Thank you!

Maybe one of the ASObjC Runner commands can help?
http://www.macosxautomation.com/applescript/apps/runner_vanilla.html

set stringToSearch to "hoügiv anédMü"

tell application "ASObjC Runner"
	modify string stringToSearch so it is escaped URI
end tell

Becuase i don’t want to install extra plug ins I didn’t use your idea exactly, however I read this in your text:

So i searched for that and came up with this:

on hexIt_(theText)
	set theTextEnc to ""
	repeat with eachChar in characters of theText
		set useChar to eachChar
		set eachCharNum to ASCII number of eachChar
		if eachCharNum = 32 then
			set useChar to "+"
		else if (eachCharNum ≠ 42) and (eachCharNum ≠ 95) and (eachCharNum < 45 or eachCharNum > 46) and (eachCharNum < 48 or eachCharNum > 57) and (eachCharNum < 65 or eachCharNum > 90) and (eachCharNum < 97 or eachCharNum > 122) then
			set firstDig to round (eachCharNum / 16) rounding down
			set secondDig to eachCharNum mod 16
			if firstDig > 9 then
				set aNum to firstDig + 55
				set firstDig to ASCII character aNum
			end if
			if secondDig > 9 then
				set aNum to secondDig + 55
				set secondDig to ASCII character aNum
			end if
			set numHex to ("%" & (firstDig as string) & (secondDig as string)) as string
			set useChar to numHex
		end if
		set theTextEnc to theTextEnc & useChar as string
	end repeat
	return theTextEnc
end hexIt_

So, thank you for your help!

Have you looked here