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 


running 2 timer labels?

 
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 Jan 14, 2003 10:21 pm    Post subject: running 2 timer labels? Reply with quote

hello all


i don't know if i ask this before but how can i run to diff timer labels within a script? what i'am doing is one part of the code uses one timer and the other part of code uses the other timer...

thanks
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Jan 15, 2003 1:26 am    Post subject: hummm Reply with quote

maybe this can't be done Sad
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: Wed Jan 15, 2003 3:24 am    Post subject: Reply with quote

Sure it can be done Tim.

Simple example:
Code:


  dialog create,Timer Demo,-1,0,300,200
  dialog add,BUTTON,bDemo,10,10,65,25,Push Me!
  dialog show

:Evloop
  wait event,1
  parse "%E;%D",@event(D)
  goto %E

:bDemoBUTTON
  dialog create,Timer Demo Child,-1,0,200,100,SmallCap
  dialog add,Text,Text,10,10
  dialog show
  %x = 0

rem  Notice I don't put "goto Evloop" here
:ChildLoop
  wait event,1
  %E = @event()
  if @equal(%E,Timer)
    goto ChildTimer
  else
    goto %E
  end

:ChildTimer
  %x = @succ(%x)
  dialog select,1
  dialog set,Text1,@succ(%x)
rem  Now we send the ChildTimer back to the ChildLoop
  goto ChildLoop

:CLOSE
  if @greater(%D,0)
    dialog select,%D
    dialog close
    wait event
    %E = @event()
    goto Evloop
  end
  exit


This is just one of many ways to do this. Hope this helps get ya going! 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: Wed Jan 15, 2003 3:50 am    Post subject: ok Reply with quote

I think i see what you are doing there.....

thanks

i will play with it to see what i come up with:)
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Jan 15, 2003 3:55 am    Post subject: hummm Reply with quote

i was playing with that script you posted and i get errors when running it Sad

label not found Sad BUT maybe you post a idea and not a working script to...

thought i would let you know


thanks
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: Wed Jan 15, 2003 4:05 am    Post subject: Reply with quote

Sorry Tim. I just typed it out here, you were right about that. Sad

Add the following to the script above:
Code:

:Timer
rem  Do something here!
  goto Evloop

_________________
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: Wed Jan 15, 2003 4:30 am    Post subject: ok Reply with quote

no problem Smile i will try it later tonight...

thanks
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Jan 15, 2003 4:34 am    Post subject: hummm Reply with quote

looking at the script it seems that it ONLY runs one timer at a time....is there a way to have it run two timers at once....like if you hit a button it runs the second timer AND the main timer at the same time..


thanks
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Jan 15, 2003 5:58 am    Post subject: sorry Reply with quote

I guess after reading my first post i didn't explain myself well enought sorry about that..the post above is what i meant
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


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

PostPosted: Wed Jan 15, 2003 6:05 am    Post subject: Reply with quote

Here ya go:

http://www.vdsworld.com/forum/viewtopic.php?p=6865#6865

Remember VDS is a scripting language though - in reality it
will only do one thing at a time. Wink

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 Jan 15, 2003 6:33 am    Post subject: heheh Reply with quote

thanks mac Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
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