PDA

View Full Version : GoToAndRun()


Mina
01-07-2008, 07:24 AM
How about this action?
GoToAndRun(LineNumber = number)

[ Goes to Line number X and runs the script ]

This could be helpful, Big Time :lol

Thanks,

Darryl
01-07-2008, 10:50 AM
Thanks for the suggestion Mina. REF: 17113

Lorne
01-07-2008, 11:48 AM
I think you'd be better off using functions. Using a line number as the target for a goto is just asking for trouble. (Add or remove one line from the beginning of the script, and all of your GoToAndRun calls need to be changed.)

Mina
01-07-2008, 01:43 PM
Using a line number as the target for a goto is just asking for trouble. (Add or remove one line from the beginning of the script, and all of your GoToAndRun calls need to be changed.)

Hmm then perhaps a GoToAndRun(Label) would be more safe. People might be able to set labels using the script window itself? :lol

Right now I use functions, and I'm very pleased

eric_darling
01-08-2008, 08:19 AM
AMS used to use labels and goto commands. I missed them when they were first removed in AMS 5. After time, I realized that not only was the goto/label structure a piece of antiquated programming architecture, but with use of functions, and some more economical coding practices, it was also outmoded. I haven't thought about it in awhile, so I guess I don't miss goto/label too badly at all!

holtgrewe
01-08-2008, 10:04 AM
Grace Hopper is rolling over in her grave right now...

OMG am I showing my age?