[OS X TeX] TeXShop macro "Select class options"

Will Robertson will at guerilla.net.au
Mon Aug 30 04:01:50 EDT 2004


On 30 Aug 2004, at 5:04 PM, Mark Smith wrote:

> Will Robertson wrote:
>
>> Is there an easier way to catch errors and then simply jump out of the
>> script, like a "exit repeat" but for the whole script?
>
> Script Debugger ?
>
> <http://www.latenightsw.com/sd3.0/index2.html>
>
> Not cheap, but not bad.

Aiyo. Oops. I'm happy *enough* with Script Editor, but it's the 
scripting language I was asking about - sorry for my lack of clarity.

Basically I'd like not to have to embed my script ever deeper within 
error-catching if statements; I think I'm missing something basic - I'd 
expect to be able to to do something like this:

on run
	subroutine1
	subroutine2
	subroutine3
	do some final stuff
end

with the code in each subroutine going something like this:

on subroutine1
	do some stuff
	if error1, exit run
end

and so on.

As it is, I have to go

on run
	subroutine1

	if not error1
		subroutine2

		if not error2
			subroutine3

			if not error3
				do some final stuff
			end if
		end if
	end if
end

Which looks messy to me. I could do this stuff in Hypercard, so I 
assume there's some way to do it in Applescript. But maybe not. Just 
thought I'd see if anyone had better ideas than me...

Thanks,
Will

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list