| View previous topic :: View next topic |
| Author |
Message |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Feb 14, 2005 3:03 am Post subject: help with if,else statements :( |
|
|
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
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 
Last edited by tim6389 on Mon Feb 14, 2005 3:52 am; edited 1 time in total |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Feb 14, 2005 3:18 am Post subject: |
|
|
| Code: |
%%cabfile = @filedlg("plugins Files (*.plugin)|*.plugin",Open plugins,,Open)
if @not(%%cabfile)
goto EVLOOP
end
|
Cheers, Mac  _________________ 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 |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Feb 14, 2005 3:54 am Post subject: |
|
|
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  |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Feb 14, 2005 4:30 am Post subject: |
|
|
Well, that's the code I always use after @filedlg() and it
works fine.
"if @null(%%cabfile)" should work too, because the var is
emptied if no file is selected.
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  _________________ 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 |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Feb 14, 2005 4:46 am Post subject: |
|
|
hummm i can't get the MULTI allows multiple to work i get did the other problem fixed  _________________ Have a nice day  |
|
| Back to top |
|
 |
tim6389 Professional Member


Joined: 01 Aug 2002 Posts: 790
|
Posted: Mon Feb 14, 2005 4:54 am Post subject: |
|
|
i think i got it all working
thanks alot mac _________________ Have a nice day  |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Feb 14, 2005 6:43 am Post subject: |
|
|
No problemo.
Cheers, Mac  _________________ 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 |
|
 |
|
|
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
|
|