switch & rename a file within an .app

Hi all, I would like to switch and rename the ad_blocking.css file within Camino.
I’m looking for the easiest way to switch them back and forth.
This is what I named the other css file… dead_ad_blocking.css
Here’s the path…
/Applications/Internet/Camino.app/Contents/Resources/ad_blocking.css

Thanks for any help!

Tom

Browser: Camino 1.6.2
Operating System: Mac OS X (10.5)

what do you mean? can you explain your doing? For what reasor you would change a filename inside your app?
to rename files, you must call the Finder-app or a shellscript, not Camino. ?(

Hi Joy, Camino has a ‘ad_blocking.css’ file to block ads but it doesn’t block enough of them.
My css file (named: dead_ad_blocking.css) blocks many more ads.
But my css file prevents me from seeing some sites correctly.
It’s a pain in the neck to go in to Camino’s preferences to disable ad blocking to see a site.
So, I would like to switch them via an applescript.
BTW, iCab has the option to change css files in the View menu.

Regards,

Tom

Browser: Camino 1.6.2
Operating System: Mac OS X (10.5)

On my system (tiger) runs perfectly.
try:

--css switch

tell application "Finder"
	set the_path to (name of startup disk & ":" & "Applications:Internet:Camino.app:Contents:Resources:")
	set n_1 to "ad_blocking.css"
	set n_2 to "death_ad_blocking.css"
	set n_3 to "default_ad_blocking.css"
	
	if exists item n_3 of folder the_path then
		set name of item n_1 of folder the_path to n_2
		set name of item n_3 of folder the_path to n_1
	else
		set name of item n_1 of folder the_path to n_3
		set name of item n_2 of folder the_path to n_1
	end if
end tell

Joy, The script does run perfectly.

Thank you very much!

Tom