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 


Rotating text in status bar?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Tue Feb 25, 2003 2:53 pm    Post subject: Rotating text in status bar? Reply with quote

Could anyone help to make a rotating statusbar?

I want the text on the statusbar to change every 5 seconds or so.

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ShinobiSoft
Professional Member
Professional Member


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

PostPosted: Tue Feb 25, 2003 3:15 pm    Post subject: Reply with quote

Be glad to help. Just tell me what exactly ya need. 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
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1754
Location: Space and Time

PostPosted: Tue Feb 25, 2003 3:16 pm    Post subject: Reply with quote

You can use a timer event to rotate the text in the status bar. Put your text in a list, then every 5 sec move to the next item in the list. Something like this.

Code:

DIALOG CREATE,New Dialog,-1,0,240,160
  DIALOG ADD,STATUS,STATUS1,item 1
  DIALOG SHOW
  %x = 1
  list create,1
  list add,1,item 1
  list add,1,item 2
  list add,1,item 3
  list add,1,item 4
 
  :evloop
  wait event,5
  %e = @event()
  goto %e
 
  :timer
  if @equal(%x,4)
      %x = 0
  end
  dialog set,status1,@item(1,%x)
  %x = @succ(%x)
  goto evloop
 
  :close
  stop


hope this helps!

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Tue Feb 25, 2003 3:18 pm    Post subject: Reply with quote

Here is my evloop
Code:
:Evloop
  wait event
  parse "%%Event;%D",@event(D)
  goto %%Event


Can I add that without messing up my program?
Remember I'm still a newbie and in early learning stages Wink

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ShinobiSoft
Professional Member
Professional Member


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

PostPosted: Tue Feb 25, 2003 3:20 pm    Post subject: Reply with quote

There is nothing wrong with your :Evloop label. You can use it even if there
aren't multiple dialogs.

_________________
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
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Tue Feb 25, 2003 3:23 pm    Post subject: Reply with quote

But won't the wait 5 command slow down my application?
Sorry for the possibly dumb question but I gotta ask Very Happy

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1567

PostPosted: Tue Feb 25, 2003 3:35 pm    Post subject: Reply with quote

Sorry a little off topic, but wow! I really like your logo LiquidCode, I'll definately be hiring you for a logo once I get my new website design up! Great job with that logo.
Back to top
View user's profile Send private message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Tue Feb 25, 2003 3:40 pm    Post subject: Reply with quote

He he he yes, it does look really nice Wink Worship
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ShinobiSoft
Professional Member
Professional Member


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

PostPosted: Tue Feb 25, 2003 3:40 pm    Post subject: Reply with quote

Yes the WAIT command will slow your app. If you are using VDS 4+ you
could use the TIMER command in your :Timer label.

Code:

REM   ** PLACE THIS LINE AFTER YOUR MAIN DIALOG IS CREATED    **
  timer start,1,chrono,@datetime(dd-hh:nn:ss)

:Evloop
  wait event,".5"
  parse "%%Event;%D",@event(D)
  goto %E

:Timer
  if @not(@greater(@timer(1,V),5))
    goto Evloop
  else
    timer stop,1
    REM   **  SET STATUS TEXT HERE  **
    timer start,1,chrono,@datetime(dd-hh:nn:ss)
  end
  goto Evloop



The above code is off the top of my head so I'm not sure if it exactly
works. But it should give you a general idea.

_________________
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
ShinobiSoft
Professional Member
Professional Member


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

PostPosted: Tue Feb 25, 2003 3:43 pm    Post subject: Reply with quote

If you'd like, give me a few and I can have a working example from the
code we have here in this thread.

Just say the word.

_________________
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
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Tue Feb 25, 2003 3:50 pm    Post subject: Reply with quote

Yeah that would be great.
Thanks alot Smile

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ShinobiSoft
Professional Member
Professional Member


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

PostPosted: Tue Feb 25, 2003 4:05 pm    Post subject: Reply with quote

Here's what I've come up with, without the TIMER command.

Code:

TITLE Status Scroller
 
  dialog create,Status Scroller,-1,0,300,200
  dialog add,Status,Stat
  dialog show
 
  %%item = 0
  %%time = 0
 
  list create,1
  list loadtext,1
"Testing 1...
"Testing 2...
"Testing 3...
"Testing 4...
"Testing 5...

:Evloop
  wait event,1
  parse "%%Event;%D",@event(D)
  goto %%Event
 
:Timer
  %%time = @succ(%%time)
  if @not(@equal(%%time,5))
    goto Evloop
  else
    %%time = 0
    dialog set,Stat,@item(1,%%item)
    %%item = @succ(%%item)
    if @equal(%%item,5)
      %%item = 0
    end
  end
  goto Evloop
   
:CLOSE
  exit
   

_________________
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
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Tue Feb 25, 2003 4:24 pm    Post subject: Reply with quote

I get an error code 23 at line 88 which is
Code:
    %%time = 0


Timer code
Code:
:Timer
  %%time = @succ(%%time)
  if @not(@equal(%%time,5))
    goto Evloop
  else
    %%time = 0
    dialog set,Stat,@item(1,%%item)
    %%item = @succ(%%item)
    if @equal(%%item,5)
      %%item = 0
    end
  end
  goto Evloop

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ShinobiSoft
Professional Member
Professional Member


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

PostPosted: Tue Feb 25, 2003 4:27 pm    Post subject: Reply with quote

I'm not sure how ERROR 23 applies here since this is a variable and not
a control.

_________________
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
ShinobiSoft
Professional Member
Professional Member


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

PostPosted: Tue Feb 25, 2003 4:36 pm    Post subject: Reply with quote

Try initializing the the %%time variable at the very beginning of your
script. Though this may not fix the problem. The sample works by itself,
but without knowing where you placed thed code and all of the other things
that your script might do, I'm unable to offer a fix at this time.

_________________
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 1, 2  Next
Page 1 of 2

 
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