File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -659,7 +659,7 @@ const IWSY = (container, text) => {
659
659
throw Error ( `Unknown action: '${ step . action } '` ) ;
660
660
}
661
661
}
662
- if ( script . onStepCB ) {
662
+ if ( script . onStepCB && script . runMode === `auto` ) {
663
663
script . onStepCB ( step . index ) ;
664
664
}
665
665
handler ( step ) ;
Original file line number Diff line number Diff line change 267
267
if Name is not CurrentScriptName put empty into LastSavedState
268
268
if Presentation is not LastSavedState
269
269
begin
270
- if PasswordValid rest post Presentation to `_save/json/` cat Name
270
+ if PasswordValid
271
+ begin
272
+ put Presentation into Content
273
+ json format Content
274
+ rest post Content to `_save/json/` cat Name
275
+ end
271
276
else put Presentation into storage as Name
272
277
put Presentation into LastSavedState
273
278
gosub to SetStatusGreen
322
327
begin
323
328
put the message into Message
324
329
put property `action` of Message into Action
325
- if Action is `goto` iwsy goto property `index` of Message
330
+ if Action is `goto`
331
+ begin
332
+ if not Running iwsy goto property `index` of Message
333
+ end
326
334
else if Action is `refresh`
327
335
begin
328
336
iwsy script Presentation
@@ -548,6 +556,7 @@ DoRunStop:
548
556
else
549
557
begin
550
558
set Running
559
+ gosub to ClearStepsButtons
551
560
put property `steps` of Presentation into Item
552
561
if the json count of Item is 0 stop
553
562
set attribute `src` of RunStop to `resources/icon/runstop.png`
@@ -558,6 +567,9 @@ DoRunStop:
558
567
set property `action` of Message to `step`
559
568
set property `step` of Message to the step
560
569
send Message to StepsModule
570
+ set Message to object
571
+ set property `action` of Message to `running`
572
+ send Message to StepsModule
561
573
end
562
574
563
575
iwsy run then
Original file line number Diff line number Diff line change 60
60
variable TrueFalse
61
61
variable Response
62
62
variable Message
63
+ variable Running
63
64
variable N
64
65
variable B
65
66
87
88
end
88
89
if property `action` of Message is `clear`
89
90
begin
91
+ clear Running
90
92
put 0 into N
91
93
while N is less than the elements of StepButton
92
94
begin
@@ -96,6 +98,11 @@ Start:
96
98
end
97
99
stop
98
100
end
101
+ if property `action` of Message is `running`
102
+ begin
103
+ set Running
104
+ stop
105
+ end
99
106
if property `action` of Message is `step`
100
107
begin
101
108
put property `step` of Message into N
@@ -207,6 +214,7 @@ Restart:
207
214
end
208
215
on click ShowStep
209
216
begin
217
+ if Running stop
210
218
put 0 into N
211
219
while N is less than the json count of Steps
212
220
begin
@@ -247,6 +255,7 @@ Restart:
247
255
json add `false` to ContinueTypes
248
256
249
257
put property `steps` of Presentation into Steps
258
+ clear Running
250
259
251
260
stop
252
261
You can’t perform that action at this time.
0 commit comments