English
Forum

Profan-editor and .exe works mismatched

 
- Page 1 -



liveFamilie
Hi,

I verzweifle since a couple Meet on folgendem trouble.
have with the DialogboxDesigner a dialog kreiert. in this Window have I with startpaint, Usefont and DrawText - Text in the Dialog-Window created.
with Perform with the Interpretermodus certain lines becomes everything beautiful displayed.
beget I a .exe go The oberen 3 To 5 Lines geschluckt and not displayed.

wisely someone a RAT ?

Greeting
Toni
 
"Profan das Besondere"
was auch in einem gewissen Alter noch Spass macht und Fit hält.
05/05/12  
 



« this Posting watts as Solution marked. »


Andreas
Miethe


Hello Toni,

yet one to that inquire whether the program already runs.
this is not optimal from you resolved. I can it number of times started, as long as I The Messagebox not wegklicke.

here time one hint as rather goes.
ex XProfan8
'##############################################
'# Author           : ampsoft (Andreas Miethe) #
'# date           : 06.05.2012               #
'# Topic           : only a instance         #
'# XProfan version : ex XProfan 8             #
'##############################################
 $H windows.ph
 $H Messages.ph

Proc IsProgRunning

    'FileMapping-Objekt lay out
    Declare hMap&,FirstProg&
    'Speicherbereich lay out
    hMap& = ~CreateFileMapping(-1,0,~PAGE_READWRITE,0,4,"{D27FA9ED-55E4-4588-A10B-E4165BB37ED7}")
    'Zeiger on Speicherbreich
    MemPointer& = ~MapViewOfFile(hMap&,$000F001F,0,0,0)
    'Window-lever the first instance detect
    FirstProg& = Long(MemPointer&,0)
    'is the window present, then

    Ifnot ~IsWindow(FirstProg&) = 0

        'If Window minimizes is

        If ~IsIconic(FirstProg&)

            'Window vergrössern
            SendMessage(FirstProg&,~WM_SYSCOMMAND,~SC_RESTORE,0)

        EndIf

        'Window into Vordergrung
        ~SetForegroundWindow(FirstProg&)
        'Speicherbereich enable
        ~UnmapViewOfFile(MemPointer&)
        ~CloseHandle(MemPointer&)
        'Program terminate
        End

    EndIf

ENDPROC

Declare MemPointer&,Ende&
'Überprüfung whether Program already runs
IsProgRunning()
Windowstyle 539
CLS
'lever the master-Fensters in the Speicherbereich take off
Long MemPointer&,0 = %hWnd
Ende& = 0

WhileNot Ende&

    WaitInput

    If %Key = 2'Close_Button.

        'Speicherbereich enable
        ~UnmapViewOfFile(MemPointer&)
        ~CloseHandle(MemPointer&)
        Ende& = 1

    EndIf

EndWhile

end
 
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 :  [...] 
05/06/12  
 




Jörg
Sellmeyer
best always The Profanversion with indicate and a lauffähigen code mitposten, otherwise can we only guess, what the trouble is.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
05/05/12  
 




liveFamilie
Hello Jörg,

means I work with Profan 9.1 on Vista and Win 7, on both the same trouble.

I try time one Image with to upload, so one whom Difference sees.


'----- Beginn Ahnenblatt portable users-expansion -----
'-----
'----- program in XProfan V9.1 -----
'----- Freeware, Full Version with Compiler -----
'-----
'----- Program Variabeln determine -----
'----- Programmverzeichnis determine (portable) -----
Declare Program$
Programm$ = $ GetDir("@")
'----- Program ini-way determine -----
Declare Progini$
Progini$ = Program$+"\\Ahnblatt.ini"
'----- Program ini read and on variables determine -----
'----- Ordnerpfade determine -----

Proc ABOainil

    '----- AB = Ahnenblatt, O = Ordner, a = from, ini = Ahnblatt.ini, l = reading
    Declare families$, Suchbegriffe$, expenses$, Images$, Tafelbilder$
    Declare LastFileName$
    families$ = (@ReadIni$ (Progini$, "Dateien", "Familien"))
    Suchbegriffe$ = (@ReadIni$ (Progini$, "Dateien", "Suchbegriffe"))
    expenses$ = (@ReadIni$ (Progini$, "Dateien", "Ausgaben"))
    Images$ = (@ReadIni$ (Progini$, "Dateien", "Bilder"))
    Tafelbilder$ = (@ReadIni$ (Progini$, "Dateien", "Tafelbilder"))
    LastFileName$ = (@ReadIni$ (Progini$, "Allgemein", "LastFileName"))

ENDPROC

'----- Program ini read and on variables determine : end -----
'----- Ordner in ini-File write -----

Proc OWriteini

    Declare families$, Suchbegriffe$, expenses$, Images$, Tafelbilder$
    Declare LastFileName$
    ABOainil
    WriteIni Progini$,"Dateien","Familien"=Program$+"\\"
    WriteIni Progini$,"Dateien","Suchbegriffe"=Program$+"\\"
    WriteIni Progini$,"Dateien","Ausgaben"=Program$+"\\"
    WriteIni Progini$,"Dateien","Bilder"=Program$+"\\"
    WriteIni Progini$,"Dateien","Tafelbilder"=Program$+"\\Tafelpics"

ENDPROC

'----- Ordner in ini-File adjust -----

Proc AWriteini

    Declare families$, Suchbegriffe$, expenses$, Images$, Tafelbilder$
    Declare LastFileName$
    ABOainil
    WriteIni Progini$,"Dateien","Familien"=text $+@Mid$(families$,4,255)
    WriteIni Progini$,"Dateien","Suchbegriffe"=text $+@Mid$(Suchbegriffe$,4,255)
    WriteIni Progini$,"Dateien","Ausgaben"=text $+@Mid$(expenses$,4,255)
    WriteIni Progini$,"Dateien","Bilder"=text $+@Mid$(Images$,4,255)
    WriteIni Progini$,"Dateien","Tafelbilder"=text $+@Mid$(Tafelbilder$,4,255)+"\\Tafelpics"

ENDPROC

'----- Ordner in ini-File adjust -----

Proc ADeleteini

    missing yet

ENDPROC

'----- Unterprogramme and variables determine -----
Declare FensterTitel$
FensterTitel$ = "Ahnenblatt portable users-expansion V1.0"
Declare ProgrammVersion$, Programmini$
ProgrammVersion$ = "AhnenblattPortable.exe"
Programmini$ = "Ahnblatt.ini"
Declare Text$
text$=Left$($ GetDir("@"),3)
Declare end%
Ende%=0
'----- Program end determine -----

Proc terminate

    end%=1

    If end% = 1

        End

    EndIf

ENDPROC

'----- Mehrfachstart prevent -----

Proc einmalStart

    if @Gt(FindWindow(FensterTitel$),0)

        messagebox("Dieses Program must only once launched go !","F E H L E R M E L D u n G",16)
        end

    endif

ENDPROC

'----- Ordner and Programmdateien on present his to check on -----
'----- checks whether a File or directory existing
Def PathFileExists(1) ! "shlwapi","PathFileExistsA"

Proc PFExists

    parameters OFile$
    return PathFileExists(addr(OFile$))

ENDPROC

'----- Programmdateien inquire -----

Proc ABPrüfen

    Declare Aini%, Aexe%
    Aini% = PFExists(Programmini$)," "
    Aexe% = PFExists(ProgrammVersion$)," "

    If Aini% + Aexe% = 0

        @MessageBox("!!! AhnenblattPortable.exe and Ahnblatt.ini !!!\n\nDateien are missing in the Programmverzeichnis.\nBitte whom Originalzustand again produce.\nProgramm ends.","F E H L E R M E L D u n G",64)
        terminate

    elseif Aexe% = 0

        @MessageBox("!!! AhnenblattPortable.exe !!!\n\nDatei missing in the Programmverzeichnis.\nBitte whom Originalzustand again produce.\nProgramm ends.","F E H L E R M E L D u n G",64)
        terminate

    elseif Aini% = 0

        @MessageBox("!!! Ahnblatt.ini !!!\n\nDatei missing in the Programmverzeichnis.\nBitte whom Originalzustand again produce.\nProgramm ends.","F E H L E R M E L D u n G",64)
        terminate

    EndIf

ENDPROC

'----- Ahnenblatt inquire -----

Proc ABabfrage

    If @Gt(FindWindow("Ahnenblatt 2"),0)

        messagebox("!!! Ahnenblatt is active !!!\n\nBitte Ahnenblatt terminate and this program restart.\nProgramm ends."," F E H L E R M E L D u n G",16)
        terminate

    endif

ENDPROC

Proc ABiniPrüfen

    Declare families%, Familiens$
    Familiens$ = (@ReadIni$ (Progini$, "Dateien", "Familien"))
    families% = PFExists(Familiens$)," "

    If families% = 0

        @MessageBox("!!! deference !!!\n\nEs are yet no directories in the ini-File hinterlegt.\n\nSiehe under Help to.","F E H L E R M E L D u n G",64)

    EndIf

ENDPROC

'Dialog-Window Ahnenblatt portable users-expansion Call

Proc Dialog_Fenster

    Declare DialogHandle&,Dialogtaste%,DialogX%,DialogY%,DialogB%,DialogH%,ButtonX%,ButtonY%,ButtonB%,ButtonA%
    Declare Button1&,Button2&,Button3&,Button4&,Button5&,Button6&
    'Dialog-Window install
    DialogB% = 900'---Dialogbreite
    DialogH% = 400'---Dialoghöhe
    DialogX% = (%WinLeft+((%WinRight-%WinLeft)/2))-(DialogB%/2)'---Dialogposition X
    DialogY% = (%WinTop+((%WinBottom-%WinTop)/2))-(DialogH%/2)'----Dialogposition Y
    'DialogHandle& = Create("Dialog",%hWnd,FensterTitel$,DialogX%,DialogY%,DialogB%,DialogH%)
    DialogHandle& = create("dialog", %hWnd, FensterTitel$, ((%maxx - DialogB%)/2),((%maxy - DialogH%)/2),DialogB%,DialogH%)
    SetStyle DialogHandle&,GetStyle(DialogHandle&)-$80000'---SystemX from
    'Bildschirmausgabe
    spending
    'Buttons install
    ButtonX% = (DialogB%/2)-2'----middle the Dialogfensters. from it becomes The Spaltenposition errechnet
    ButtonY% = DialogH%-60'-------position the row for Buttons
    ButtonB% = 140'----------------Buttonbreite
    ButtonA% = 5'-----------------Buttonabstand
    ButtonX% = ButtonX%-(ButtonA%/2)-(ButtonA%*2)-(ButtonB%*3)
    Button1& = Create("Button",DialogHandle&,"Werte: keine",ButtonX%,ButtonY%,ButtonB%,25)
    ButtonX% = ButtonX%+ButtonB%+ButtonA%
    Button2& = Create("Button",DialogHandle&,"Werte: Standard",ButtonX%,ButtonY%,ButtonB%,25)
    ButtonX% = ButtonX%+ButtonB%+ButtonA%
    Button3& = Create("Button",DialogHandle&,"Werte: ändern",ButtonX%,ButtonY%,ButtonB%,25)
    ButtonX% = ButtonX%+ButtonB%+ButtonA%
    Button4& = Create("Button",DialogHandle&,"Ahnenblatt starten",ButtonX%,ButtonY%,ButtonB%,25)
    ButtonX% = ButtonX%+ButtonB%+ButtonA%
    Button5& = Create("Button",DialogHandle&,"Programm beenden",ButtonX%,ButtonY%,ButtonB%,25)
    ButtonX% = ButtonX%+ButtonB%+ButtonA%
    Button6& = Create("Button",DialogHandle&,"Hilfe",ButtonX%,ButtonY%,ButtonB%,25)
    'Mouse and Keyboard query
    Dialogtaste% = 0

    WhileNot Dialogtaste%

        Waitinput

        If Clicked(Button1&)

            Dialogtaste% = 1

        ElseIf Clicked(Button2&)

            Dialogtaste% = 2

        ElseIf Clicked(Button3&)

            Dialogtaste% = 3

        ElseIf Clicked(Button4&)

            Dialogtaste% = 4

        ElseIf Clicked(Button5&)

            Dialogtaste% = 5

        ElseIf Clicked(Button6&)

            Dialogtaste% = 6

        EndIf

    EndWhile

    'Buttons evaluate

    If Dialogtaste% = 1'Button 1 pressed values: no

        ADeleteini

    ElseIf Dialogtaste% = 2'Button 2 pressed values: standard

        OWriteini

    ElseIf Dialogtaste% = 3'Button 3 pressed values: Change

        AWriteini

    ElseIf Dialogtaste% = 4'Button 4 pressed Ahnenblatt started

        WinExec("AhnenblattPortable.exe",1)
        terminate

    ElseIf Dialogtaste% = 5'Button 5 pressed Program terminate

        terminate

    ElseIf Dialogtaste% = 6'Button 6 pressed Help

        'Button 6 pressed Help

    EndIf

    DestroyWindow(DialogHandle&)

ENDPROC

'----- Window spending -----

Proc spending

    Declare AFamilien$, ASuchbegriffe$, AAusgaben$, ABilder$, ATafelbilder$
    Declare ALastFileName$
    AFamilien$ = (@ReadIni$ (Progini$, "Dateien", "Familien"))
    ASuchbegriffe$ = (@ReadIni$ (Progini$, "Dateien", "Suchbegriffe"))
    AAusgaben$ = (@ReadIni$ (Progini$, "Dateien", "Ausgaben"))
    ABilder$ = (@ReadIni$ (Progini$, "Dateien", "Bilder"))
    ATafelbilder$ = (@ReadIni$ (Progini$, "Dateien", "Tafelbilder"))
    ALastFileName$ = (@ReadIni$ (Progini$, "Allgemein", "LastFileName"))
    StartPaint DialogHandle&
    UseFont "ARIAL", 24, 0, 1, 0, 1
    DrawText 50, 10, "Ahnenblatt portable - Erweiterung"
    UseFont "ARIAL", 16, 0, 1, 0, 0
    DrawText 50, 40, "Nur The Laufwerkszuordnung the Files Change."
    UseFont "ARIAL", 14, 0, 1, 0, 1
    DrawText 50, 90, "aktueller Laufwerksbuchstabe : "
    UseFont "ARIAL", 24, 0, 1, 0, 0
    DrawText 250,80, Text$
    UseFont "ARIAL", 14, 0, 1, 0, 1
    DrawText 50, 110, "Ordner"
    UseFont "ARIAL", 14, 0, 0, 0, 0
    DrawText 50, 130, "Familien : "
    UseFont "ARIAL", 14, 0, 1, 0, 0
    DrawText 200, 130, AFamilien$
    UseFont "ARIAL", 14, 0, 0, 0, 0
    DrawText 50, 150, "Suchbegriffe : "
    UseFont "ARIAL", 14, 0, 1, 0, 0
    DrawText 200, 150, ASuchbegriffe$
    UseFont "ARIAL", 14, 0, 0, 0, 0
    DrawText 50, 170, "Ausgaben : "
    UseFont "ARIAL", 14, 0, 1, 0, 0
    DrawText 200, 170, AAusgaben$
    UseFont "ARIAL", 14, 0, 0, 0, 0
    DrawText 50, 190, "Bilder : "
    UseFont "ARIAL", 14, 0, 1, 0, 0
    DrawText 200, 190, ABilder$
    UseFont "ARIAL", 14, 0, 0, 0, 0
    DrawText 50, 210, "Tafelbilder : "
    UseFont "ARIAL", 14, 0, 1, 0, 0
    DrawText 200, 210, ATafelbilder$
    UseFont "ARIAL", 14, 0, 1, 0, 1
    DrawText 50, 230, "Datei"
    UseFont "ARIAL", 14, 0, 0, 0, 0
    DrawText 50, 250, "letzte opened File : "
    UseFont "ARIAL", 14, 0, 1, 0, 0
    DrawText 200, 250, ALastFileName$
    EndPaint

ENDPROC

'--------------------------
'----- master-Program -----
'--------------------------
einmalStart
ABPrüfen
ABabfrage
ABiniprüfen
Clear end%

WhileNot end%

    If end% = 0

        Dialog_Fenster

    EndIf

EndWhile

'----- end -----
End

not over the code meckern, be yet long not so ready.
I hope the helps.

Greeting
Toni

85 kB
Kurzbeschreibung: spending
Hochgeladen:05/05/12
Downloadcounter129
Download
 
"Profan das Besondere"
was auch in einem gewissen Alter noch Spass macht und Fit hält.
05/05/12  
 




Jörg
Sellmeyer
Tja, this is nice meant but unfortunately I get except of/ one Error Message over fehlende Files nothing To see. Reduzier still time whom code the nötigste. Perhaps finds itself the Error then already.
It can indeed his, that not everything from your Inidateien read becomes, if the program as Exe launch. Perhaps becomes in the incorrect way to something sought. so is the Fehlersuche for someone Außenstehenden anyway not without further possible.

Edit:
by me sees both How in the Image.
either one Vista-/W7-trouble or it'll what not correctly. read.


35 kB
Hochgeladen:05/06/12
Downloadcounter241
Download
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
05/05/12  
 




liveFamilie
Hello Jörg,
the I there try To Produzieren is the following :
from one Prog not of me stammt, try I values from the ini To reading and then whom Laufwerksbuchstaben To Change, with small Sicherheiten, there this not only for me is separate too for known which not so well with the PC know.
an this Sicherheiten is the request whether The Progs present are. one can means either in the code the ' before it settle or two Files produce with the suitable names.
I have time whom code with everything what moreover heard gezippt and try now times the zipper-File here to upload.
because only so How the code now is have I this Error, veränderungen lead moreover the it time there's and times again lane is. If I The .exe (The in the zipper File drin is anklicke appear the Error), hopefully with you too, if so clicking simply time moreover on the Button Help. Dei Message The appear simply confirm.
unless must something with empty both Systemen "krum" his.
It can neither with the read the ini concern, there the Text the under Proc spending standing not appear.
hopefully come You now so clear what about me wisely whether it one Error in my Prog is or on my system.

Greeting
Toni

266 kB
Version:1
Kurzbeschreibung: File entzippen
Hochgeladen:05/06/12
Downloadcounter93
Download
 
XProfan 9
"Profan das Besondere"
was auch in einem gewissen Alter noch Spass macht und Fit hält.
05/06/12  
 




Andreas
Miethe


Stell the master-Program circa, then ought to it weg
mind what between NEUSTART and NEUEND standing
'--------------------------
'----- master-Program -----
'--------------------------
einmalStart
ABPrüfen
ABabfrage
ABiniprüfen
Clear end%
'NEUSTART
Dialog_fenster
'NEUEND

WhileNot end%

    'NEUSTART

    If end% = 0

        end

    EndIf

    'NEUEND

EndWhile

 
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 :  [...] 
05/06/12  
 




liveFamilie
Hello Andreas,

suggestion is well but has a disadvantage, whom I do not would like.

After selection one Buttons exits/closes itself the program.
with of my Version becomes/should the DialogFenster neuaufgebaut go with the new Einträgen and first with Button Ahnenblatt started or Program terminate should it closed go.
therefore the bring into action the DialogFensters into Loop.

Toni
 
XProfan 9
"Profan das Besondere"
was auch in einem gewissen Alter noch Spass macht und Fit hält.
05/06/12  
 




Andreas
Miethe


Hello Toni,

yet one to that inquire whether the program already runs.
this is not optimal from you resolved. I can it number of times started, as long as I The Messagebox not wegklicke.

here time one hint as rather goes.
ex XProfan8
'##############################################
'# Author           : ampsoft (Andreas Miethe) #
'# date           : 06.05.2012               #
'# Topic           : only a instance         #
'# XProfan version : ex XProfan 8             #
'##############################################
 $H windows.ph
 $H Messages.ph

Proc IsProgRunning

    'FileMapping-Objekt lay out
    Declare hMap&,FirstProg&
    'Speicherbereich lay out
    hMap& = ~CreateFileMapping(-1,0,~PAGE_READWRITE,0,4,"{D27FA9ED-55E4-4588-A10B-E4165BB37ED7}")
    'Zeiger on Speicherbreich
    MemPointer& = ~MapViewOfFile(hMap&,$000F001F,0,0,0)
    'Window-lever the first instance detect
    FirstProg& = Long(MemPointer&,0)
    'is the window present, then

    Ifnot ~IsWindow(FirstProg&) = 0

        'If Window minimizes is

        If ~IsIconic(FirstProg&)

            'Window vergrössern
            SendMessage(FirstProg&,~WM_SYSCOMMAND,~SC_RESTORE,0)

        EndIf

        'Window into Vordergrung
        ~SetForegroundWindow(FirstProg&)
        'Speicherbereich enable
        ~UnmapViewOfFile(MemPointer&)
        ~CloseHandle(MemPointer&)
        'Program terminate
        End

    EndIf

ENDPROC

Declare MemPointer&,Ende&
'Überprüfung whether Program already runs
IsProgRunning()
Windowstyle 539
CLS
'lever the master-Fensters in the Speicherbereich take off
Long MemPointer&,0 = %hWnd
Ende& = 0

WhileNot Ende&

    WaitInput

    If %Key = 2'Close_Button.

        'Speicherbereich enable
        ~UnmapViewOfFile(MemPointer&)
        ~CloseHandle(MemPointer&)
        Ende& = 1

    EndIf

EndWhile

end
 
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 :  [...] 
05/06/12  
 




liveFamilie
Hello Andreas,
since the for it certainly isn't so professional are reicht these small bridge the request from.
but i'll me your suggestion time To hearts take and times look whether these request whether the Prog already runs for me nachvollziehbar and umsetzbar is.

the above-mentioned trouble has somehow with the further Programming of self resolved. in a How but its now i.O.
therefore I see the Topic as Done on.

Toni
 
XProfan 9
"Profan das Besondere"
was auch in einem gewissen Alter noch Spass macht und Fit hält.
05/19/12  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

13.306 Views

Untitledvor 0 min.
Michael Hettner09/21/23
RudiB.03/17/20
PETER195603/07/18
GDL09/03/15
More...

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