Tell Not to ignore capital/small based letters

hi everyone

i have a little script that checks from a text field if the contents of the text field can be found in a online file. currently, i can enter both “Test” and “test” and both will work because the script seems to ignore the capital “t” at the front. how could i tell the script to not ignore that capital “t.”

ie: if the online file contains “TeSt” and someone enters “test” then, right now, it re-writes the files. Though, that’s not supposed to happen. If they enter “test” they get the error and only if they enter exactly the same thing (TeSt), then it writes the files.

here is my script:



set the_code to contents of text field "tf_code" of window "code"
	
	set the_url to "http://guimkie.com/applescript/list.xml
	
	try
		
		set url_contents to do shell script "curl " & quoted form of the_url
		
		if url_contents contains the_code then
			
			set the_sound to load sound "Funk"
			play the_sound
			
			show window "error" -- This code is already uploaded
			stop progress indicator "spinner" of window "code"
			
		else
			
			upload_code()
			
		end if
		
	on error
		
		set the_sound to load sound "Funk"
		play the_sound
			
		show window "error" -- Be connected to the internet!
		stop progress indicator "spinner" of window "code"
		
	end try


thanks,

max

Hi Max,

eigentlich falsches Forum, aber. :wink:

a considering case block should do it


.
set url_contents to do shell script "curl " & quoted form of the_url
considering case
	if url_contents contains the_code then
		set the_sound to load sound "Funk"
		play the_sound
		show window "error" -- This code is already uploaded
		stop progress indicator "spinner" of window "code"
	else
		upload_code()	
	end if
end considering
.

sorry für falsches forum :frowning:

aber trotzdem, danke :smiley: