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 


@volinfo refresh problem

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code
View previous topic :: View next topic  
Author Message
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Tue Aug 10, 2004 8:55 am    Post subject: @volinfo refresh problem Reply with quote

@volinfo refresh problem

1. CD is read with @volinfo
2. CD is ejected from CDROM
3. @volinfo try to read CD again and i get internal windows error

If no CD in CDROM it just display CDROM.

Try my program....its fully working...try with a CD and without CD

Its problem with CDROM cache or what ?

Simple HDD info program:

Code:
Title Disk drives info
    DIALOG CREATE,Disk drives info,-1,0,470,310,SAVEPOS,NOMIN,
   DIALOG ADD,GRADIENT,GRADIENT1,0,0,470,310,$00C16100,$00FFE2C6,,topleft
    DIALOG ADD,TEXT,DRIVE1,15,35,,,C:  @volinfo(c,t)    @volinfo(c,f)    @volinfo(c,s)    @volinfo(c,y)      @volinfo(c,n),,,TRANSPARENT   
     DIALOG ADD,TEXT,DRIVE2,30,35,,,D:  @volinfo(d,t)    @volinfo(d,f)    @volinfo(d,s)    @volinfo(d,y)      @volinfo(d,n),,,TRANSPARENT 
     DIALOG ADD,TEXT,DRIVE3,45,35,,,E:  @volinfo(e,t)    @Volinfo(e,f)    @volinfo(e,s)    @volinfo(e,y)      @volinfo(e,n),,,TRANSPARENT
     DIALOG ADD,TEXT,DRIVE4,60,35,,,F:  @volinfo(f,t)    @volinfo(f,f)    @volinfo(f,s)    @volinfo(f,y)      @volinfo(f,n),,,TRANSPARENT
     DIALOG ADD,TEXT,DRIVE5,75,35,,,G:  @volinfo(g,t)    @volinfo(g,f)    @volinfo(g,s)    @volinfo(g,y)      @volinfo(g,n),,,TRANSPARENT
     DIALOG ADD,TEXT,DRIVE6,90,35,,,H:  @volinfo(h,t)    @volinfo(h,f)    @volinfo(h,s)    @volinfo(h,y)      @volinfo(h,n),,,TRANSPARENT
     DIALOG ADD,TEXT,DRIVE7,105,35,,,I:  @volinfo(i,t)    @volinfo(i,f)    @volinfo(i,s)    @volinfo(i,y)      @volinfo(i,n),,,TRANSPARENT
   DIALOG ADD,TEXT,DRIVE8,120,35,,,J:  @volinfo(j,t)    @volinfo(j,f)    @volinfo(j,s)    @volinfo(j,y)      @volinfo(j,n),,,TRANSPARENT
   DIALOG SHOW
   :loop
    wait event
    goto @event()
   :CLOSE


Post edited by moderator to use the [ vds ] tag to show code.
Back to top
View user's profile Send private message Send e-mail
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Tue Aug 10, 2004 9:11 am    Post subject: Reply with quote

@volinfo is just a wrapper around an API call.

Your problem is more likely to be due to flaky CD-ROM drivers and/or a problem with auto-insert notification.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Tue Aug 10, 2004 11:42 am    Post subject: Math calculations Reply with quote

Can someone add math calculation for my Disk drives info that will display
values in MB or GB.

Thanks...
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Aug 10, 2004 12:09 pm    Post subject: Reply with quote

You can use this line to do it:

Code:
# Use @volinfo(c,s) to get the disc' space.
# Use @fdiv() to divide the disc space in kB by 1048576 so
# that you get the disc space in GB (divide by 1024 to get
# the number of MB)
# Use @format(<number>,0.2) to limit the number of decimal
# places of the output number...
info @format(@fdiv(@volinfo(c,s),1048576),0.2) GB


If you want to know more about above functions, just put your carret on top of one and press Ctrl+F1 to see the VDS help file topic about it... Smile

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Tue Aug 10, 2004 3:48 pm    Post subject: @format(@fdiv(@volinfo(d,f),1048576),0.2) Reply with quote

@format(@fdiv(@volinfo(d,f),1048576),0.2)

D is in this case CDROM

if Value is 0 i get Non-Numeric value ERROR.
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Aug 10, 2004 3:55 pm    Post subject: Reply with quote

You can use the if command to check if the disc' size is zero... Smile

Code:
if @unequal(@volinfo(d,f),0)
 info @format(@fdiv(@volinfo(c,s),1048576),0.2) GB
end

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Tue Aug 10, 2004 4:03 pm    Post subject: @unequal Reply with quote

is @unequal VDS 5 command

can i use @equal
Back to top
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Aug 10, 2004 4:05 pm    Post subject: Reply with quote

@unequal() is indeed a valid VDS 5 function.

In this case it would probably be best to use @unequal()

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


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Aug 10, 2004 6:51 pm    Post subject: Reply with quote

Filip, in reply to FreezingFire's post: you can use @not(@equal()) to simulate the usage of the @unequal() function... Smile (Sorry for confusing you both... Embarassed '
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
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 -> Visual DialogScript 4 Source Code 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