| |
|
|
Torsten Rümker | Hi, I try straight to get, How one whom way of WhileLoop & herausbekommen can. for different others directories (Windows directory, Programmverzeichnis) can the Yes a System-Variables experienced, but How undergo I the directory for WhileLoop & for actually user?
MfG Torsten |
|
|
| Ich lerne, ob ich will oder nicht! Betriebssystem: - Ubuntu 15.x - Windows (diverse) XProfan Version: X2 | 05/23/06 ▲ |
|
|
|
|
Frank Abbing | of/ one of it isses: CompileMarkSeparationSystemordner im Dateisystem mit SHGetSpecialFolderLocation ermitteln
Benötigt Profan 6.6 (wg. Konstanten);
bei Verzicht auf Konstanten auf jeden Fall 6.1 wegen Addr-Funktion
Achtung: Der gewünschte Ordner muß(!) auch im Dateisystem vorliegen
(Systemsteuerung klappt daher z.B. nicht)
Im Fehlerfall ist der Return-String leer
Ich hoffe(!), daß CoTaskMemFree in diesem Fall den vom System
reservierten Speicher freigibt.
Eigentlich müßte dies über die Free-Methode des IMalloc-Interface
erfolgen, aber das geht mit Profan leider nicht.
ole32.hlp läßt die Hoffnung nicht unbegründet erscheinen, aber sicher
bin ich nicht.
Def %CSIDL_DESKTOP 0
Def %CSIDL_PROGRAMS 2
Def %CSIDL_CONTROLS 3
Def %CSIDL_PRINTERS 4
Def %CSIDL_PERSONAL 5
Def %CSIDL_FAVORITES 6
Def %CSIDL_STARTUP 7
Def %CSIDL_RECENT 8
Def %CSIDL_SENDTO 9
Def %CSIDL_BITBUCKET 10
Def %CSIDL_STARTMENU 11
Def %CSIDL_DESKTOPDIRECTORY 16
Def %CSIDL_DRIVES 17
Def %CSIDL_NETWORK 18
Def %CSIDL_NETHOOD 19
Def %CSIDL_FONTS 20
Def %CSIDL_TEMPLATES 21
Def %CSIDL_COMMON_STARTMENU 22
Def %CSIDL_COMMON_PROGRAMS 23
Def %CSIDL_COMMON_STARTUP 24
Def %CSIDL_COMMON_DESKTOPDIRECTORY 25
Def %CSIDL_APPDATA 26
Def %CSIDL_PRINTHOOD 27
Def StartMenueAutostart(0) Readini$("Hkey_1","SoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders","Startup")
Def SHGetSpecialFolderLocation(3) !"SHELL32","SHGetSpecialFolderLocation"
Def SHGetPathFromIDList(2) !"SHELL32","SHGetPathFromIDListA"
Def CoTaskMemFree(1) !"OLE32","CoTaskMemFree"
Declare buffer#
Proc GetSpecialFolder
Parameters csidl%
Declare lpidl&,result$
Dim buffer#,255
If SHGetSpecialFolderLocation(GetActiveWindow(),CSIDL%,Addr(lpidl&))=0
Print lpidl&
IfNot SHGetPathFromIDList(lpidl&,buffer#)=0
Let result$=String$(buffer#,0)
EndIf
EndIf
CoTaskMemFree(lpidl&)
Dispose buffer#
Return result$
EndProc
Beispiel
Window 0,0-%maxx,%maxy
Print $TempDir
Print
Print StartMenueAutostart()
Print
GetSpecialFolder %CSIDL_STARTUP
Whileloop 50
GetSpecialFolder &loop-1
If &loop>9
Print Str$(Int(&loop-1));"",$(0)
Else
Print Str$(Int(&loop-1));" ",$(0)
EndIf
a>
WaitInput
|
|
|
| |
|
|
|
| The 5 is My Documents! want again on it attentive make, the The Results heavy from the installed InternetExplorer Version take down. If means alternative API present is, is these To prefer.
WhileLoop & functions but always, if the internet Explorer installs is, for others Paths rather The MSDN study. |
|
|
| |
|
|
|
Frank Abbing | name time Please alternative APIs...
I bezweifle, that the API does not correctly. functions, if the IE not installs is. the can not more than with windows 95 the case his, because here some Dlls fehlten, if the IE No is. and time sincere - windows 95 is snow of yesterday... |
|
|
| |
|
|
|
| [...]
there stand größtenteils The erforderlichen Win and IE versions with.
z.B CSIDL_PROGRAM_FILES (Crogramme mostly on dt. Systemen) existing first ex IE 5. |
|
|
| |
|
|
|
| [quote:a23301beb1=TS-Soft] [...]
there stand größtenteils The erforderlichen Win and IE versions with.[/quote:a23301beb1] where me time again auffällt the MSDN with FF considered just awful looks. |
|
|
| |
|
|
|
| here ne alternative for CSIDL_PROGRAM_FILES CompileMarkSeparationcls
declare ProgramFiles$
ProgramFiles$ = ReadIni$("HKEY_2", "SOFTWAREMicrosoftWindowsCurrentVersion", "ProgramFilesDir")
print ProgramFiles$
waitkey /pre> functions then too without IE5, just as for Temp, system etc. rather The suitable API use, instead of this AllroundFunktion, or. if, then even with obigen Link make sure |
|
|
| |
|
|
|
Torsten Rümker | so, I have now time in the Registry gestöbert and a entry found, the me possible help can. and of course: HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrent VersionExplorerShellFolders and here then the entry personnel
can the Please someone confirm, or. hold neither? possible not only WinXP User would beautiful
MfG Torsten |
|
|
| Ich lerne, ob ich will oder nicht! Betriebssystem: - Ubuntu 15.x - Windows (diverse) XProfan Version: X2 | 05/24/06 ▲ |
|
|
|
|
| for WhileLoop & (CSIDL_PERSONAL = 5) kannste whom Code Frank use, working ex Win95 with IE 3.0 (evtl. even without?). there Gibts no Problems
but with manchen this Constanten ought to one very softly-softly his, or. Gibts a Leerstring if it not yet existing.
unfortunately believe many, these Constanten In any system benefit to, therefore always Inform, before one it uses. |
|
|
| |
|
|