English
Forum

SaveFile Dateimaske Dateiname

 

Julian
Schmidt
Hey,
how can one with a SaveFile-dialog sowohl a Filenames pretending, as well as Dateimasken use?
yet I get it only particular but not a dialog there.
CompileMarkSeparation
@SaveFile$("Speichere Datei", "Dateiname")
>

CompileMarkSeparation
@SaveFile$("Speichere Datei mit Maske", "XProfan (*.prf)|*.prf|Header-Datei (*.ph)|*.ph|Text (*.txt)|*.txt")
>

gives it others Solutions as self draw? If No, has someone Schonmal so a dialog self drawn?

LG

Julian
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01/01/13  
 




Andreas
Miethe


sure still.
is of course already uralt, ought to but functions
CompileMarkSeparation
'##############################################
'# Autor           : ampsoft (Andreas Miethe) #
'# Datum           : uralt                    #
'# Thema           : Open/save Dialog         #
'# XProfan-Version : Profan 5.0               #
'##############################################
Def APIGetOpenFileName(1) ! "COMDLG32.DLL","GetOpenFileNameA","#","&"
Def APIGetSaveFileName(1) ! "COMDLG32.DLL","GetSaveFileNameA","#","&"
Def APICommDlgExtendedError(0) ! "COMDLG32.DLL","CommDlgExtendedError","","&"
Declare Name#,opensave#,filter#,filter$,vorgabe#
Dim Filter#,255
Dim Vorgabe#,255
Dim name#,255
Let filter$="Alle Dateien (*.*)",chr$(0),"*.*",chr$(0)
Let Filter$=filter$;"Bitmaps (*.bmp)",chr$(0),"*.bmp",chr$(0)
Let Filter$=filter$;"Textdateien (*.txt)",chr$(0),"*.txt",chr$(0)
Let Filter$=filter$;"Helpdateien (*.hlp)",chr$(0),"*.hlp",chr$(0)
Let Filter$=filter$;"Includedateien (*.inc)",chr$(0),"*.inc",chr$(0)
Let Filter$=filter$;"Dateien (*.exe;*.com;*.pif)",chr$(0),"*.exe;*.com;*.pif",chr$(0)
string filter#,0 = filter$
string vorgabe#,0 = "*.*"
Dim opensave#,76
Long opensave#,0 = 76'     Groesse der Struktur
word opensave#,4 = %hwnd'     Aufrufendes Fenster
Long opensave#,12 = filter#'     Vorgabefilter
Long opensave#,28 = vorgabe#'     Vorgabestring -> entweder Dateiname oder *.*
Long opensave#,32 = 256'     MaxFile
Long opensave#,48 = Name#'     Dialogbox-Überschrift
Long opensave#,52 = $00001002'     Flags As Long
String name#,0="Such Dir 'ne Datei aus"
String vorgabe#,0 = "test.prf"
ApiGetOpenFileName(opensave#)
print @string$(vorgabe#,0)
print APICommDlgExtendedError()," <- Fehlerrückgabe der Dialogbox , bei 0 ist alles glattgegangen"
string filter#,0 =filter$
string vorgabe#,0 = "*.*"
String name#,0="Such Dir 'nen schönen Namen aus"
ApiGetSaveFileName(opensave#)
print APICommDlgExtendedError()," <- Fehlerrückgabe der Dialogbox , bei 0 ist alles glattgegangen"
'Auslesen des Pfades
print @string$(vorgabe#,0)
Print
waitinput
Dispose opensave#
Dispose Filter#
Dispose Vorgabe#
Dispose Name#
End
 
XProfan X2
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
01/01/13  
 




Julian
Schmidt
thanks, that you whom View source ausgegraben have.
I have from it time a Proc zusammengezimmert.
CompileMarkSeparation
Def APIGetSaveFileName(1) ! "COMDLG32.DLL","GetSaveFileNameA","#","&"
CLS
print SaveFile_(%hwnd,"Datei speichern","Neues Textdokument.txt","Alle Dateien (*.*)|*.*|Textdateien (*.txt)|*.txt|Helpdateien (*.hlp)|*.hlp|Includedateien (*.inc)|*.inc")
Waitinput 1500

Proc SaveFile_

    Parameters hwnd&, titel$, name$, maske$
    Declare filter$,Vorgabe#,opensave#, erg$

    whileloop 1,Len(maske$,"|"),2

        filter$=filter$+SubStr$(maske$,&loop,"|")+chr$(0)+SubStr$(maske$,&loop+1,"|")+chr$(0)

    EndWhile

    Dim Vorgabe#,255
    string vorgabe#,0 = "*.*"
    Dim opensave#,76
    Long opensave#,0 = 76
    word opensave#,4 = hwnd&
    Long opensave#,12 = addr(filter$)
    Long opensave#,28 = vorgabe#
    Long opensave#,32 = 256
    Long opensave#,48 = addr(titel$)
    Long opensave#,52 = $00001002
    String vorgabe#,0 = name$
    ApiGetSaveFileName(opensave#)
    erg$=@string$(vorgabe#,0)
    Case Len(erg$,"\")=1 : Clear erg$'Abbruch
    Dispose Opensave#
    Dispose Vorgabe#
    Return erg$

ENDPROC

 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01/01/13  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.986 Views

Untitledvor 0 min.
Torben Nissen02/01/21
rquindt04/20/16
E.T.11/06/14
Georg Hülsmann10/07/13
More...

Themeninformationen

this Topic has 2 subscriber:

Julian Schmidt (2x)
Andreas Miethe (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie