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 if,else statements :(

 
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: Mon Feb 14, 2005 3:03 am    Post subject: help with if,else statements :( Reply with quote

hello all

I have been trying for hours to get this to work so if the user hits cancel it goes to the goto evloop when i think i'am close it don't work right Sad

this is starting to drive me nuts

Code:
:button5button
  %%cabfile = @filedlg("plugins Files (*.plugin)|*.plugin",Open plugins,,Open)
  if @both(@file(%%cabfile),@ok())
  %A = @lib(cab10,CABDECOMPRESSINITIALIZE,INT:)
  if @zero(%A)
    warn Error initializing decompression
    goto evloop
  end
  %%FilesInCab = @lib(cab10,CABENUM,STR:,STR:%%CabFile)
  info Files contained in @name(%%CabFile).cab:@cr()%%FilesInCab
   %%cabfile1 = @DIRDLG(Install plugin in a folder ,c:\test ,<shownewfolderbutton>}
  if @both(@file(%%cabfile1),@ok())
   %A = @lib(cab10,CABEXTRACT,INT:,STR:%%CabFile,STR:%%cabfile1)
   if @zero(%A)
    warn Error extracting files
  else
    info Done extracting files
  end
  %A = @lib(cab10,CABDECOMPRESSTERMINATE,INT:)
  end
  end
  goto evloop



thanks

_________________
Have a nice day Smile


Last edited by tim6389 on Mon Feb 14, 2005 3:52 am; edited 1 time in total
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: Mon Feb 14, 2005 3:18 am    Post subject: Reply with quote

Code:

%%cabfile = @filedlg("plugins Files (*.plugin)|*.plugin",Open plugins,,Open)
if @not(%%cabfile)
   goto EVLOOP
end


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: Mon Feb 14, 2005 3:54 am    Post subject: Reply with quote

humm

i know i tried that, what about the next @filedlg command ?
also to is there a way to have @filedlg select more then one file?

thanks

_________________
Have a nice day Smile
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: Mon Feb 14, 2005 4:30 am    Post subject: Reply with quote

Well, that's the code I always use after @filedlg() and it
works fine. Razz

"if @null(%%cabfile)" should work too, because the var is
emptied if no file is selected. Wink

And yes - ya can select more than one file - this is from VDS 3 help:

Optional fourth parameters are:
MULTI allows multiple selections to be made. In this event, the files are returned as a string of names separated by carriage return characters. The resulting string can be assigned to a list using LIST ASSIGN, so each filename will then be a separate list item.

Copyright ©1995 - 2000 S.A.D.E. s.a.r.l. / All rights are reserved.

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: Mon Feb 14, 2005 4:46 am    Post subject: Reply with quote

hummm i can't get the MULTI allows multiple to work i get did the other problem fixed 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: Mon Feb 14, 2005 4:54 am    Post subject: Reply with quote

i think i got it all working Smile

thanks alot mac

_________________
Have a nice day Smile
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: Mon Feb 14, 2005 6:43 am    Post subject: Reply with quote

No problemo. 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
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