English
Forum

trouble with $PROGDIR

 

Thomas
Freier
want a copy of Dialog-Window make. Klapp too, if the Speicherpfad with GetDir$(@) and not $PROGDIR indicated becomes. or there a elegantere Solution?
CompileMarkSeparation
Beispiel
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


920 kB
Hochgeladen:03/13/09
Downloadcounter26
Download
 
Gruß Thomas
Windows XP SP2, XProfan X2
03/13/09  
 




Jörg
Sellmeyer
Schonmal The Results the both functions compared?
CompileMarkSeparation
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
03/13/09  
 




Thomas
Freier
Yes Jörg, becomes with whom *.exe in both Make the right way displayed. only once even a vain *.bmp created.
 
Gruß Thomas
Windows XP SP2, XProfan X2
03/13/09  
 




Jörg
Sellmeyer
No, you have The Results not correctly. compared!! tappt im dunkeln show different Results.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
03/13/09  
 




Thomas
Freier
think already. Vermute now The cause at active Window, because many starts nacheinander make for 50%it Trefferquote. But unbefriedigend what about me must moreover forschen.

37 kB
Hochgeladen:03/13/09
Downloadcounter73
Download
35 kB
Hochgeladen:03/13/09
Downloadcounter66
Download
 
Gruß Thomas
Windows XP SP2, XProfan X2
03/13/09  
 



@Thomas:

You must discern between the directory in the The EXE lying and the Umgebungsverzeichnis the ongoing Prozesses.

Wechselst You z.B. by chDir  (getDir ) to drive D:, then lying The Exe $progDir  Yes nevertheless yet z.B. on drive C:.

must always z.B. by chDir  self ensuring, that itself the Umgebungsverzeichnis always on the desired place befindet, because one Umgebungsverzeichnis under designed Umständen too geerbt go can.
 
03/13/09  
 




Jörg
Sellmeyer
No - its everything plenty plainer. look you the Result on.
in the first:
in the Interpreter can not functions, there then evtl. of ProfEd the Projektverzeichnis as current way tuned is. $PROGDIR gives then but naturally the Profnaverzeichnis back. I suspect but time, the wasn't the trouble.
secondly:
If means the sought way correctly is, helps it only, itself the Result again very to examine and thereby particularly the latest characters To respect.
with GetDir$() is the the last character the Programmpfades and with $PROGDIR?
If you then your Stringaddition ansiehst, could you evtl. one light open:
CompileMarkSeparation
old_file$ + \ + Date$(3)
>
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
03/13/09  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.907 Views

Untitledvor 0 min.
rumfruggel09/19/11

Themeninformationen



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