forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


help with list
Goto page Previous  1, 2, 3, 4
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Mar 11, 2003 3:58 am    Post subject: Reply with quote

yes it the same soruce that was posted on page 2 on this thread Smile 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 Smile
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Tue Mar 11, 2003 4:07 am    Post subject: Reply with quote

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. Smile

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Mar 11, 2003 4:18 am    Post subject: Reply with quote

it works BUT i found a eorror in your script Smile


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 Smile


edit i didn't see you last line in the msg above Smile

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Mar 11, 2003 4:23 am    Post subject: Reply with quote

hummm what did you do to fix it?
_________________
Have a nice day Smile
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Tue Mar 11, 2003 4:23 am    Post subject: Reply with quote

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. Smile

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Mar 11, 2003 4:25 am    Post subject: Reply with quote

what you do to fix it?


and this to
Code:

%%L2Item = @SUCC(%%L2Item)
exit

Code:

%%L2Item = @SUCC(%%L2Item)
stop


right?

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Tue Mar 11, 2003 4:31 am    Post subject: Reply with quote

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 Embarassed

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Mar 11, 2003 4:36 am    Post subject: Reply with quote

ahhhhh i see


thanks again for helping me and for your time Smile

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Tue Mar 11, 2003 4:39 am    Post subject: Reply with quote

Was glad ta help Tim. Smile
_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page Previous  1, 2, 3, 4
Page 4 of 4

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group