English
Forum

2 processes with Filemap.

 

funkheld
Hello, good day.

How can Please 2 Processe run, The I apiece Process with a Button starte. in the attachment is it with a Process, How are Please with two ?

Thank you.
greeting
 {$cle}
 {$PUSHKEYWORD pExec,process,filemap}
Declare h&,hd&,hd1&,ende&,wert&,worth1&,b_send&,Text$,tadr&, hFileMap&,zielfenster&
declare pointer#
Struct data = w&, w1&, zk$(256)
dim pointer#,data

Proc Process

    parameters win&, hd&,hd1&
    Declare pointer#
    declare w&,w1&,ende&, hFileMap&
    Struct data = w&, w1&, zk$(256)
    dim pointer#, data
    windowtitle "empfang"
    window 10,10 - 350, 200
    ende& = 0
    User Messages $1000

    whilenot ende&

        Case GetText$(win&) = "" : ende& = 1
        sleep 1
        GetMessage

        If %UMessage = $1000

            hFileMap& = FileMap("Open", "Test")

            If hFileMap&

                pointer# = FileMap("Map", hFileMap&)
                locate 3,1
                print "   " + st$(pointer#.w&) + "   "
                setText hd&, st$(pointer#.w&)
                locate 5,1
                print "   " + st$(pointer#.w1&) + "   "
                setText hd1&, st$(pointer#.w1&)
                Locate 7, 1
                Print "                    "
                Locate 7, 1
                Print pointer#.zk$'
                FileMap("Close", hFileMap&)

            EndIf

        EndIf

    endwhile

    Dispose pointer#

endproc

proc Send

    hFileMap& = FileMap("Open", "Test")

    If hFileMap&

        pointer# = FileMap("Map", hFileMap&)
        pointer#.w& = wert&
        pointer#.w1& = worth1&
        pointer#.zk$ = Text$
        FileMap("Close", hFileMap&)
        PostMessage(ZielFenster&, $1000, 0, 0)

    EndIf

endproc

windowtitle "send"
window 10,300-200,200
hd& = create("Text", %hWnd, "", 20, 10, 60, 20)
hd1& = create("Text", %hWnd, "", 20, 35, 60, 20)
b_send& = Create("Button",%hWnd,"send", 10, 65, 80, 24)
hFileMap& = Create("FileMap", "Test", 265)
h&=pExec("|Prozess",%HWnd, hd&,hd1&)
sleep 500
ZielFenster& = FindWindow("empfang")
ende& = 0
User Messages $1000

whilenot ende&

    waitinput

    If Clicked(b_send&)

        wert&=wert&+1
        worth1&=worth1&+5
        Text$="es geht"
        Send

    endif

endwhile

Dispose pointer#
end
 
04/12/16  
 




H.Brill
well, with pExec().
there The processes Yes How Procs aufgebaut are,
can tappt im dunkeln too so Call :
pExec("Prozess1", ...)
pEcec("Prozess2",...)

Proc Process1

    ....

ENDPROC

Proc Process2

    ....

ENDPROC


In link with 2 Buttons.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
04/12/16  
 




funkheld
with Filemap 2 Processe...and PostMessage(ZielFenster&, $1000, 0, 0) I get not there. it'll always only 1 Window addressed obwoh I 2 different Windownamen have for Postmessage. and this Pointer#r for Filemap...with 2 Processen?

Thank you.
greeting
 
04/12/16  
 




H.Brill
try time into Prozessen The Window
with
win1& = Create("Window",..)

anzulegen. It can his, that Window with the
Cls or Window-commands always the same lever
have.

naturally must You for each Window another
UserMessage having, means z.B.
User Messages $1000, $2000

The structure and the Pointer# hereon must naturally
too in each Process definiert go. best
the structure so strain, that eachone Process on its
own items zugreift.
Struct data = w1&, w2&, zk1$(256), w3&, w4&, zk2$(256)

accordingly could Process1 on w1&, w2& and zk1$ and
Process2 on w3&, w4&, and zk2$ grab.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
04/12/16  
 




funkheld
sometimes does it rights Window and the left with weiterzählen and if I again new starte, goes zb only the left Window with weiterzählen.

can you please times The Postmessage-Adressen and the %UMessage times correctly distribute?

Thank you.
greeting
declare ende&
Declare h&,hd&,hd1&,zielfenster&,b_send&
declare h1&,hd2&,hd3&,zielfenster1&,b_send1&
declare wert&,worth1&,worth2&,worth3&,Text$,Text1$
declare hFileMap&,hFileMap1&
declare pointer#,pointer1#
Struct data = w&, w1&, zk$(256)
dim pointer#,data
Struct data1 = w2&, w3&, zk1$(256)
dim pointer1#,data1

Proc Process

    parameters win&, hd&,hd1&
    Declare pointer#
    declare w&,w1&,ende&, hFileMap&
    Struct data = w&, w1&, zk$(256)
    dim pointer#, data
    windowtitle "empfang"
    window 10,10 - 300, 200
    ende& = 0
    User Messages $1000

    whilenot ende&

        Case GetText$(win&) = "" : ende& = 1
        sleep 1
        GetMessage

        If %UMessage = $1000

            hFileMap& = FileMap("Open", "Test")

            If hFileMap&

                pointer# = FileMap("Map", hFileMap&)
                locate 3,1
                print "   " + st$(pointer#.w&) + "   "
                setText hd&, st$(pointer#.w&)
                locate 5,1
                print "   " + st$(pointer#.w1&) + "   "
                setText hd1&, st$(pointer#.w1&)
                Locate 7, 1
                Print "                    "
                Locate 7, 1
                Print pointer#.zk$'
                FileMap("Close", hFileMap&)

            EndIf

        EndIf

    endwhile

    Dispose pointer#

endproc

Proc Process1

    parameters win&, hd2&,hd3&
    Declare pointer1#
    declare w2&,w3&,ende&, hFileMap1&
    Struct data1 = w2&, w3&, zk1$(256)
    dim pointer1#, data1
    windowtitle "empfang1"
    window 320,10 - 300, 200
    ende& = 0
    User Messages $1000

    whilenot ende&

        Case GetText$(win&) = "" : ende& = 1
        sleep 1
        GetMessage

        If %UMessage = $1000

            hFileMap1& = FileMap("Open", "Test1")

            If hFileMap1&

                pointer1# = FileMap("Map", hFileMap1&)
                locate 3,1
                print "   " + st$(pointer1#.w2&) + "   "
                setText hd2&, st$(pointer1#.w2&)
                locate 5,1
                print "   " + st$(pointer1#.w3&) + "   "
                setText hd3&, st$(pointer1#.w3&)
                Locate 7, 1
                Print "                    "
                Locate 7, 1
                Print pointer1#.zk1$'
                FileMap("Close", hFileMap1&)

            EndIf

        EndIf

    endwhile

    Dispose pointer1#

endproc

proc Send

    hFileMap& = FileMap("Open", "Test")

    If hFileMap&

        pointer# = FileMap("Map", hFileMap&)
        pointer#.w& = wert&
        pointer#.w1& = worth1&
        pointer#.zk$ = Text$
        FileMap("Close", hFileMap&)
        PostMessage(ZielFenster&, $1000, 0, 0)

    EndIf

endproc

proc Send1

    hFileMap1& = FileMap("Open", "Test1")

    If hFileMap1&

        pointer1# = FileMap("Map", hFileMap1&)
        pointer1#.w2& = worth2&
        pointer1#.w3& = worth3&
        pointer1#.zk1$ = Text1$
        FileMap("Close", hFileMap1&)
        PostMessage(ZielFenster1&, $1000, 0, 0)

    EndIf

endproc

windowtitle "send"
window 10,300-200,200
hd& = create("Text", %hWnd, "", 20, 10, 60, 20)
hd1& = create("Text", %hWnd, "", 20, 35, 60, 20)
hd2& = create("Text", %hWnd, "", 20, 10, 60, 20)
hd3& = create("Text", %hWnd, "", 20, 35, 60, 20)
b_send& = Create("Button",%hWnd,"send", 10, 65, 80, 24)
b_send1& = Create("Button",%hWnd,"send1", 10, 90, 80, 24)
hFileMap& = Create("FileMap", "Test", 265)
hFileMap1& = Create("FileMap", "Test1", 265)
h&=pExec("|Prozess",%HWnd, hd&,hd1&)
h1&=pExec("|Prozess1",%HWnd, hd2&,hd3&)
sleep 500
ZielFenster& = FindWindow("empfang")
ZielFenster1& = FindWindow("empfang1")
ende& = 0
User Messages $1000,$2000

whilenot ende&

    waitinput

    If Clicked(b_send&)

        wert&=wert&+1
        worth1&=worth1&+5
        Text$="es geht"
        Send

    endif

    If Clicked(b_send1&)

        worth2&=worth2&+10
        worth3&=worth3&+50
        Text1$="es goes with 1"
        Send1

    endif

endwhile

Dispose pointer#
Dispose pointer1#
end
 
04/12/16  
 




H.Brill
Frag me now not, wieso the suddenly goes.
have now only The User Messages correctly. distributed
and pExec() inverse called. means first
Process1 and then Process.

look time, whether it so to your Wish runs :
declare ende&
Declare h&,hd&,hd1&,zielfenster&,b_send&
declare h1&,hd2&,hd3&,zielfenster1&,b_send1&
declare wert&,worth1&,worth2&,worth3&,Text$,Text1$
declare hFileMap&,hFileMap1&
declare pointer#,pointer1#
Struct data = w&, w1&, zk$(256)
dim pointer#,data
Struct data1 = w2&, w3&, zk1$(256)
dim pointer1#,data1

Proc Process

    parameters win&, hd&,hd1&
    Declare pointer#
    declare w&,w1&,ende&, hFileMap&
    Struct data = w&, w1&, zk$(256)
    dim pointer#, data
    windowtitle "empfang"
    window 10,10 - 300, 200
    ende& = 0
    User Messages $1000

    whilenot ende&

        Case GetText$(win&) = "" : ende& = 1
        sleep 1
        GetMessage

        If %UMessage = $1000

            hFileMap& = FileMap("Open", "Test")

            If hFileMap&

                pointer# = FileMap("Map", hFileMap&)
                locate 3,1
                print "   " + st$(pointer#.w&) + "   "
                setText hd&, st$(pointer#.w&)
                locate 5,1
                print "   " + st$(pointer#.w1&) + "   "
                setText hd1&, st$(pointer#.w1&)
                Locate 7, 1
                Print "                    "
                Locate 7, 1
                Print pointer#.zk$'
                FileMap("Close", hFileMap&)

            EndIf

        EndIf

    endwhile

    Dispose pointer#

endproc

Proc Process1

    parameters win&, hd2&,hd3&
    Declare pointer1#
    declare w2&,w3&,ende&, hFileMap1&
    Struct data1 = w2&, w3&, zk1$(256)
    dim pointer1#, data1
    windowtitle "empfang1"
    window 320,10 - 300, 200
    ende& = 0
    User Messages $2000

    whilenot ende&

        Case GetText$(win&) = "" : ende& = 1
        sleep 1
        GetMessage

        If %UMessage = $2000

            hFileMap1& = FileMap("Open", "Test1")

            If hFileMap1&

                pointer1# = FileMap("Map", hFileMap1&)
                locate 3,1
                print "   " + st$(pointer1#.w2&) + "   "
                setText hd2&, st$(pointer1#.w2&)
                locate 5,1
                print "   " + st$(pointer1#.w3&) + "   "
                setText hd3&, st$(pointer1#.w3&)
                Locate 7, 1
                Print "                    "
                Locate 7, 1
                Print pointer1#.zk1$'
                FileMap("Close", hFileMap1&)

            EndIf

        EndIf

    endwhile

    Dispose pointer1#

endproc

proc Send

    hFileMap& = FileMap("Open", "Test")

    If hFileMap&

        pointer# = FileMap("Map", hFileMap&)
        pointer#.w& = wert&
        pointer#.w1& = worth1&
        pointer#.zk$ = Text$
        FileMap("Close", hFileMap&)
        PostMessage(ZielFenster&, $1000, 0, 0)

    EndIf

endproc

proc Send1

    hFileMap1& = FileMap("Open", "Test1")

    If hFileMap1&

        pointer1# = FileMap("Map", hFileMap1&)
        pointer1#.w2& = worth2&
        pointer1#.w3& = worth3&
        pointer1#.zk1$ = Text1$
        FileMap("Close", hFileMap1&)
        PostMessage(ZielFenster1&, $2000, 0, 0)

    EndIf

endproc

windowtitle "send"
window 10,300-200,200
hd& = create("Text", %hWnd, "", 20, 10, 60, 20)
hd1& = create("Text", %hWnd, "", 20, 35, 60, 20)
hd2& = create("Text", %hWnd, "", 20, 10, 60, 20)
hd3& = create("Text", %hWnd, "", 20, 35, 60, 20)
b_send& = Create("Button",%hWnd,"send", 10, 65, 80, 24)
b_send1& = Create("Button",%hWnd,"send1", 10, 90, 80, 24)
hFileMap& = Create("FileMap", "Test", 265)
hFileMap1& = Create("FileMap", "Test1", 265)
h1&=pExec("|Prozess1",%HWnd, hd2&,hd3&)
h&=pExec("|Prozess",%HWnd, hd&,hd1&)
sleep 500
ZielFenster& = FindWindow("empfang")
ZielFenster1& = FindWindow("empfang1")
ende& = 0
User Messages $1000,$2000

whilenot ende&

    waitinput

    If Clicked(b_send&)

        wert&=wert&+1
        worth1&=worth1&+5
        Text$="es goes with 1"
        Send

    endif

    If Clicked(b_send1&)

        worth2&=worth2&+10
        worth3&=worth3&+50
        Text1$="es goes with 10"
        Send1

    endif

endwhile

Dispose pointer#
Dispose pointer1#
end
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
04/13/16  
 




funkheld
Hello thanks.
now functions it, the 2 Processe addressed go.

I soar with whom Adresszuweisungen not through, this is my problem.

Thank you.
greeting
 
04/13/16  
 




H.Brill
with whom Zuweisungen hakt it because ?
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
04/14/16  
 




funkheld
the are The Adressen $1000 and $2000 zb.

what mean the request ?

Thank you.
greeting
 
04/14/16  
 




H.Brill
Meinst You with whom User Messages ?

the are just numbers. there can you too
1000 and 2000 take. it serves mere only to
eindeutigen identification the Messages.

$1000 = 4096
$2000 = 8192

important is, that You over 1000 go, circa
conflicts with the windowseigenen Messages
To avoid. These are under 1000.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
04/14/16  
 



About 1023 should it.
 
04/14/16  
 




funkheld
Yes thanks for Info.

I had me already gewundert , because I it time with 1, 2 or 3 attempts having and not working.

Thank you.
greeting
 
04/14/16  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.518 Views

Untitledvor 0 min.
RudiB.01/10/22
iF10/31/20
Torsten Rümker05/10/16
Sascha Haak05/07/16
More...

Themeninformationen

this Topic has 3 subscriber:

funkheld (6x)
H.Brill (6x)
iF (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