Jump to content

Can Scripts Be edited i a Text Editor


This topic is 4381 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Have a long script. I would like to change every line to set a field as 2 instead of 1. Is there a way to do this without clicking the specify button 50 times?

Link to comment
Share on other sites

Is there a way to do this without clicking the specify button 50 times?

Maybe - if you are running under OS X. But I believe it would take more time and effort to set it up than clicking the specify button 50 times.

I would suggest you re-examine your script, as it sounds some optimizing would be in order.

Link to comment
Share on other sites

Have a long script. I would like to change every line to set a field as 2 instead of 1. Is there a way to do this without clicking the specify button 50 times?

It will be hard the first time; but once you've done this you can set a variable at the top and

Set variable [ $x; 1]

Set Field[ this; $x]

Set field[ that; $x]

Set field [ other; $x]

etc.

But what kind of script is it that you are setting so many fields to the same value? That seems very unusual and suggests there may be something else worth looking at.

Link to comment
Share on other sites

Thanks for the help. the variable value idea is clever. I will use that in the future whenever I build a big script with something repeated many times.

The script takes a database full of student quiz scores that are related to individual students record in my grade book. The quiz records can pertain to one of 15 different chapters and there can be multiple quiz attempts for each chapter. The script finds and sorts related records and resets each chapter quiz score in my grade book to be the highest quiz score found for that chapter. Once that is done it sets any quiz with a score of 80 or above to 2. So there were actually only 15 corrections I had to make. But I nevertheless found it frustrating that you can't text-edit a script manually.

Thanks again

Link to comment
Share on other sites

Thanks for the help. the variable value idea is clever. I will use that in the future whenever I build a big script with something repeated many times.

The script takes a database full of student quiz scores that are related to individual students record in my grade book. The quiz records can pertain to one of 15 different chapters and there can be multiple quiz attempts for each chapter. The script finds and sorts related records and resets each chapter quiz score in my grade book to be the highest quiz score found for that chapter. Once that is done it sets any quiz with a score of 80 or above to 2. So there were actually only 15 corrections I had to make. But I nevertheless found it frustrating that you can't text-edit a script manually.

Thanks again

Related records; record set. Hm. Do you know about the replace command? It operates on an entire record set and can use a static value or calculated value. Are you walking through the records? I don't think you really need to do what you think you need to do. Please post a copy of your file or a copy of your script.

Link to comment
Share on other sites

The script finds and sorts related records and resets each chapter quiz score in my grade book to be the highest quiz score found for that chapter. Once that is done it sets any quiz with a score of 80 or above to 2.

Why replace existing data, instead of using calculations?

Link to comment
Share on other sites

This topic is 4381 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.