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  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Wed Mar 05, 2003 8:51 pm    Post subject: Reply with quote

FF, I meant add a field in the line for a WAIT time, then
parsing the value in the loop. If there's no time, the
%%wait param is emptied.

LIST ADD, 1, RUN|test2.bat|parameters|2

or for a wait only line:

LIST ADD, 1, |||2


then in the loop:

parse "%%cmd;%%file;%%param;%%wait",%%item

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Mar 05, 2003 8:57 pm    Post subject: ohhhhhhhh Reply with quote

ok i'am lost on that one mac Sad
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Mar 05, 2003 10:02 pm    Post subject: Reply with quote

i'am still having problems getting a second list to work to Sad
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Mar 05, 2003 10:40 pm    Post subject: Reply with quote

Perhaps you could post some example code or explain in a bit more detail
what you would like to do? Confused

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Mar 05, 2003 10:41 pm    Post subject: Reply with quote

Quote:
FF, I meant add a field in the line for a WAIT time, then
parsing the value in the loop.


Oops. I guess I misread something. Embarassed

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Mar 06, 2003 12:01 am    Post subject: Reply with quote

maybe i can explain it better...

ok

program start, after 2 mins is up it runs the first thing in the list lets call it list,1 then after that is runs a diffenet list lets call it list 2....then it goes back to the (list,1) 2 mins and start all over BUT the next rounds it read the second item in BOTH lists...etc

i hope that explains it well...hard to explain
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Mar 06, 2003 3:20 am    Post subject: Reply with quote

any tips on how to do this?


thanks
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Mar 06, 2003 1:13 pm    Post subject: Reply with quote

Maybe something like this:

Code:
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
REM * Wait 120 seconds (two minutes) or for an event
wait event,120
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
if @equal(@item(2, %%L2Item),@COUNT(2))
 REM * Exit the GOSUB because there's nothing to run
 EXIT
end
shell open,@item(2, %%L2Item)
%%L2Item = @SUCC(%%L2Item)
exit

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Mar 06, 2003 4:46 pm    Post subject: coool Reply with quote

thanks i will give that a try when i get home... i have over 1000 items to added to the list. my question is that should be a problem right? or should i just make the list read from a txt file?

thanks again
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Mar 06, 2003 6:30 pm    Post subject: Reply with quote

It should work.
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Mar 08, 2003 6:58 am    Post subject: Reply with quote

sorry i didn't get back to you sooner been out of town.FreezingFire thanks for the help i will play with it to see what i can come up with..and for the rest of ya thanks for the help to Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Mar 09, 2003 4:36 am    Post subject: hummm Reply with quote

well

i try that code but no mater what i do i get a eorror that is can't find the batch file Sad and yes i have it named right.. its like it don't know the path to it Sad
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Sun Mar 09, 2003 8:04 am    Post subject: Reply with quote

Do you use long filenames? That may be a problem when doing RUN commands. I suggest
that you use @SHORTNAME() to translate your filenames to 8.3 format.

You could check for the existence of the file before trying to run it:

Code:

%%file = C:\yourfile.bat
if @file(%%file)
  RUN ...
else
  info File %%file not found!
end


Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Mar 09, 2003 3:55 pm    Post subject: hummm Reply with quote

yea i did try that @SHORTNAME() even tho my file names are short i do notice that is saids can't find file c:\test.bat BUT i have it in other folder what about folder name? do they have to be short?

thanks
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Mar 09, 2003 4:07 pm    Post subject: Reply with quote

If you're using

Code:
RUN C:\My Folder\Test test test test\@shortname(test.bat)


You should be using

Code:
RUN @shortname(C:\My Folder\Test test test test\test.bat)

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
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  Next
Page 2 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