escaping a batch process.

hi guys
i am trying to make a batch script.but i cant escape by pressing "ESC" .when i press esc then it goes on to next step.the script is like this,

rollout A opens up a rollout B
pressing "OK" on rollout B
process a series of max file by 4 script (c1.ms,c2.ms,c3.ms,c4.ms)

i am thinking about a (escape checker then exit) in the array loop of rollout B.is it the proper way? how can i code it effectively.

i am still on primary stage of max script. please try to help me out.thanks.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

Maybe like this:( for i = 1

Maybe like this:

(
	for i = 1 to YouKnow.count do
	(
		if keyboard.escPressed do exit
 
		--	do all stuff here
 
	)
)

If you have nested for loops in the main for loop you can put
if keyboard.escPressed do exit
in their begining too, to speed up the script termination.

zahidhasan's picture

its working perfectly.i was a

its working perfectly.i was a bit pissed and put the exit code in three different places.;-)so now its escaping within a fraction of seconds.
thanks again.

miauu's picture
zahidhasan's picture

:-) thanks for prompt reply.

:-) thanks for prompt reply. i gonna check it.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.