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 


Save with @EXT

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Tue Nov 08, 2005 8:14 pm    Post subject: Save with @EXT Reply with quote

: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
View user's profile Send private message Send e-mail
ShinobiSoft
Professional Member
Professional Member


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

PostPosted: Tue Nov 08, 2005 11:07 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Wed Nov 09, 2005 6:30 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Nov 10, 2005 1:17 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
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