| |
|
|
 Thomas Freier | voudrais une Copy vom Dialogfenster faire. Klapp aussi, si qui Speicherpfad avec GETDIR$(@) et pas avec $PROGDIR angegeben wird. ou bien gibt es une elegantere Solution? KompilierenMarqueSéparationBeispiel
Kopiert Fensterelemte
Def @Getwindowrect(2) !USER32, GetWindowRect
Def keybd_event(4) !USER32,keybd_event
Def IsIconic(1) !USER32,IsIconic
Def CaptureScreen(0) keybd_event($2C,1,0,0)
Def CaptureActiveWindow(0) keybd_event($2C,0,0,0)
Def SetForegroundWindow(1) !USER32,SetForegroundWindow
Declare hdlg&,endebutton%,ende%,copybutton%,old_file$,text$
Cls
UseFont MS Sans Serif,13,0,0,0,0
SetDialogFont 1
hdlg&=CreateDialog(%hwnd,Dialog,50,114,498,408)
endebutton%=CreateButton(hdlg&,Ende,200,180,60,23)
copybutton%=CreateButton(hdlg&,H-Copy,200,220,60,23)
old_file$ = GetDir$(@)
old_file$ = $ProgDir
WhileNot ende%
WaitInput
Case Getfocus(endebutton%): Let ende%=1
If Getfocus(copybutton%)
SetActiveWindow(hdlg&)
CaptureScreen()
MCLS 500,500
StartPaint -1
ClipLoadBmp 0,0;0
MCopyBmp 0,0-%maxX,%maxY > 0,0;0
text$= old_file$ + \ + Date$(3) + - + Translate$(Time$(0),:,-) + .BMP
SaveBmp text$,0,0-500,500
ClearClip
EndPaint
EndIf
Wend
|
 |
|
| |
|
|
|
 Jörg Sellmeyer | |
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 13.03.2009 ▲ |
|
|
|
|
 Thomas Freier | oui Jörg, wird chez den *.exe dans beiden Fällen qui richtige Pfad angezeigt. seulement einmal plan une le vide *.bmp erzeugt. |
|
|
| |
|
|
|
 Jörg Sellmeyer | non, tu as qui Ergebnisse pas richtig verglichen!! vous montrer différent Ergebnisse. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 13.03.2009 ▲ |
|
|
|
|
 Thomas Freier | Denke déjà. Vermute maintenant qui Ursache beim aktiven la fenêtre, car viele Starts nacheinander mener trop 50%il Trefferquote. Ist mais unbefriedigend et je dois plus forschen. |
|
|
| |
|
|
|
 | @Thomas:
Du musst unterscheiden entre dem Verzeichnis dans dem qui EXE liegt et dem Umgebungsverzeichnis des laufenden Prozesses.
Wechselst Du z.B. per chDir (getDir ) pour Laufwerk D:, ensuite liegt qui Exe $progDir oui quand même encore z.B. sur Laufwerk C:.
Musst toujours z.B. per chDir selbst sicherstellen, dass sich cela Umgebungsverzeichnis toujours am gewünschten lieu est, weil un Umgebungsverzeichnis sous certain Umständen aussi geerbt volonté peux. |
|
|
| |
|
|
|
 Jörg Sellmeyer | non - c'est alles viel einfacher. exposition Dir cela Ergebnis à. Erstens: Im Interpreter peux es pas marcher, là ensuite peut-être. vom ProfEd cela Projektverzeichnis comme aktueller Pfad eingestellt ist. $PROGDIR gibt ensuite mais naturellement cela Profnaverzeichnis zurück. je vermute mais la fois, cela était pas cela Problem. Zweitens: si alors qui gesuchte Pfad korrekt ist, hilft es seulement, sich cela Ergebnis nochmal oui c'est ca anzusehen et dabei avant allem cela dernier marque trop berücksichtigen. chez GETDIR$() ist cela qui dernier Buchstabe des Programmpfades et chez $PROGDIR? si Du ensuite Votre Stringaddition ansiehst, pourrait Dir peut-être. un Licht aufgehen: KompilierenMarqueSéparationold_file$ + \ + Date$(3) > |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 13.03.2009 ▲ |
|
|
|