| View previous topic :: View next topic |
| Author |
Message |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Tue Nov 08, 2005 8:14 pm Post subject: Save with @EXT |
|
|
:SaveBUTTON
if %f
%f = @filedlg("Text Documents (*.txt)|*.txt|All files (*.*)|*.*",Collected system information,%f ,Save)
else
%f = @filedlg("Text Documents (*.txt)|*.txt|All files (*.*)|*.*",Collected system information,,Save)
end
if %f
LIST SAVEFILE, list3, %f
end
goto LOOP
Some time back i was trying something with vdsobj.dll but now a lost that
How to force file to add extension |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Nov 08, 2005 11:07 pm Post subject: |
|
|
You have to manually check for an extension. If you want to force a
particular extension, then delete the old one and add yours. Example ->
| Code: |
if @not(@null(%F))
%F = @filedlg("Text files (*.txt)|*.txt|All files (*.*)|*.*",Save As,%F,SAVE)
else
%F = @filedlg("Text files (*.txt)|*.txt|All files (*.*)|*.*",Save As,,SAVE)
end
if @not(@null(%F))
%X = @ext(%F)
if @not(@equal(%X,TXT))
REM Force the "TXT" extension
%F = @path(%F)@name(%F).TXT
REM Or you can just append your extension , like Notepad does.
REM %F = %F".TXT"
end
list savefile,3,%F
end
goto Loop
|
_________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Wed Nov 09, 2005 6:30 am Post subject: |
|
|
Yes this multi-level thinking is just killing me
Thanks i use this now
:SaveBUTTON
if @not(@null(%F))
%f = @filedlg("Text File(*.txt)|*.txt",Save as,%f,Save)
else
%f = @filedlg("Text File (*.txt)|*.txt",Save as,,Save)
end
%F = %F".TXT"
LIST SAVEFILE,list3, %f
end
goto LOOP
ONE more question ?
I like to add suggested file name without extension in to dialog for file name to user just press save
Very nice example is in dxdiag.exe (button Save All Information...) can VDS use this kind of dialog for save ? Mybe in VDS 6... |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Thu Nov 10, 2005 1:17 am Post subject: |
|
|
Hi All,
IMHO I find the way that Notepad saves it's information to be anoying. I think you should allow the user to always be the part that decides since they have to go hunting for the file they just saved. If you name it something different it will be harder for them to find the file. I am not sure how dxdiag.exe saves it's files but if it works the same as notepad then I believe it is wrong. _________________ Home of
Give VDS a new purpose!
 |
|
| 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
|
|