Katerina Posted January 21, 2003 Share Posted January 21, 2003 The esc key will cancel a command, -but- it will cancel at the point of where the script has read, and not the script entirely. -therefore, if preferences are being set in a script in the first lines, the new change of preference remains, because the procedure was before the point of hitting the ESC key. I discovered this when I had an offset duplicate question., earlier today I wish the esc key will cancel the entire script, from the first procedure. (posted wish list item, I was told to also post here) Quote Link to comment
ccroft Posted January 22, 2003 Share Posted January 22, 2003 I'm able to undo a either a whole or stopped script. Does this not work for you? Quote Link to comment
Katerina Posted January 22, 2003 Author Share Posted January 22, 2003 {I am able to stop a script with esc or by running another script. but : A script will run and read each line. If esc or other command is selected while the script is running, the lines that were already read sticks. You'll see what I mean by trying this test. Cancel out of this command before drawing a rect. p.s. this isn't a command I would use, just a test} Procedure test; VAR p:boolean; BEGIN DSelectAll; p:=GetPref(9); If (p=false) then begin SetPref(9,true); end; If (p=true) then begin SetPref(9,false); end; {cancel command before it reads the following text, you will see the preference set above sticks} SetTool(-203); end; RUN (test); Quote Link to comment
ccroft Posted January 23, 2003 Share Posted January 23, 2003 In my experience you are right. The actions done by a script up to the point of escape will stick, but those actions can be undone with command+z or by choosing undo from edit menu. I tried your test and it did change "zoom line". But if I undo the script the pref isn't changed. Or more precisely it is changed and then changed back. I guess this is more along the lines of a work-around. Some of my scripts can take a long time to execute on a large file and sometimes I run one prematurely. I cancel the script and then use "undo" to return the file to the state it was in before I ran the script. Quote Link to comment
Katerina Posted January 23, 2003 Author Share Posted January 23, 2003 OK, I will work around. Thank you. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.