| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 11, 2003 3:58 am Post subject: |
|
|
yes it the same soruce that was posted on page 2 on this thread i will post that cuase its easyier to follow then my and i know the problem is in there.
also to when is done running the list will the program stop/exit itself?
thanks
| Code: |
%%Path = @PATH(%0)
list create,1
list create,2
%%L1Item = 0
%%L2Item = 0
list add,1,C:\test.bat
list add,1,C:\test2.bat
list add,1,C:\test3.bat
list add,1,C:\test4.bat
list add,2,C:\2test.bat
list add,2,C:\2test2.bat
list add,2,C:\2test3.bat
list add,2,C:\2test4.bat
repeat
wait event,5
GOSUB RunList1
GOSUB RunList2
until @event()
exit
:RunList1
if @equal(@item(1, %%L1Item),@COUNT(1))
REM * Exit the GOSUB because there's nothing to run
EXIT
end
shell open,@item(1, %%L1Item)
%%L1Item = @SUCC(%%L1Item)
exit
:RunList2
info %%path
if @equal(@item(2, %%L2Item),@COUNT(2))
EXIT
end
RUN @item(2,@trim(%%L2Item))
%%L2Item = @SUCC(%%L2Item)
exit
|
_________________ Have a nice day  |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Mar 11, 2003 4:07 am Post subject: |
|
|
Try this Tim,
| Code: |
%%Path = @PATH(%0)
list create,1
list create,2
%%L1Item = 0
%%L2Item = 0
list add,1,C:\test.bat
list add,1,C:\test2.bat
list add,1,C:\test3.bat
list add,1,C:\test4.bat
list add,2,C:\2test.bat
list add,2,C:\2test2.bat
list add,2,C:\2test3.bat
list add,2,C:\2test4.bat
repeat
wait event,5
GOSUB RunList1
GOSUB RunList2
until @event()
exit
:RunList1
if @equal(@index(1),@pred(@COUNT(1)) )
REM * Exit the GOSUB because there's nothing to run
EXIT
end
shell open,@trim(@item(1,%%L1Item))
%%L1Item = @SUCC(%%L1Item)
exit
:RunList2
info %%path
if @equal(@index(2),@pred(@count(2)))
EXIT
end
RUN @trim(@item(2,%%L2Item)))
%%L2Item = @SUCC(%%L2Item)
exit
|
I think this will solve the problem.
One other thing, the program should exit on it's own, but 5 seconds after the last list operation is done. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 11, 2003 4:18 am Post subject: |
|
|
it works BUT i found a eorror in your script
| Code: |
list add,1,C:\test.bat
|
should be : (well for me that is)
| Code: |
list add,1,C:\new Visual DialogScript\test.bat
|
thanks for helping me to
edit i didn't see you last line in the msg above  _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 11, 2003 4:23 am Post subject: |
|
|
hummm what did you do to fix it? _________________ Have a nice day  |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Mar 11, 2003 4:23 am Post subject: |
|
|
Now that I think about it, it will not stop on it's own.
Replace the very last EXIT command at the bottom of the script with "STOP".
And you are quite welcome.  _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 11, 2003 4:25 am Post subject: |
|
|
what you do to fix it?
and this to
| Code: |
%%L2Item = @SUCC(%%L2Item)
exit
|
| Code: |
%%L2Item = @SUCC(%%L2Item)
stop
|
right? _________________ Have a nice day  |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Mar 11, 2003 4:31 am Post subject: |
|
|
To Fix:
Changed:
| Code: | | if @equal(@item(1, %%L1Item),@COUNT(1)) |
To:
| Code: | | if @equal(@index(1),@pred(@COUNT(1))) |
And
| Code: | | if @equal(@item(2, %%L2Item),@COUNT(2)) |
To:
| Code: | | if @equal(@index(2),@pred(@COUNT(2))) |
Also added @trim() to the RUN and SHELL commands.
And on third thought, the program should exit the way it was written  _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Tue Mar 11, 2003 4:36 am Post subject: |
|
|
ahhhhh i see
thanks again for helping me and for your time  _________________ Have a nice day  |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Mar 11, 2003 4:39 am Post subject: |
|
|
Was glad ta help Tim.  _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|