English
Forum

Expiring in time Window present

 

Web
Scanner


Yes, The Headline says it already.
it should folgendermaßen functions.
I press einn Button "Start" The Uhrzeit start To walk ( in sec. stepped)
then whom Button "Stop" pressing, The watch remaining stand. thereafter ggf. again Start, The
Time runs moreover, or can with a others Button "RESET" on 0 reset go.

Sodele, ex now Better get going tricky, in a Window should three different times parallel walk,
means: three Zeitanzeigen The completely separated voneinander walk should jeweil with Start/Stop/Reset etc.

has someone with permanenten Zeitanzeigen in X11 already what program?
a older Posting from 2004 Have I found, help me but not really moreover
The Help bring me only on The System-Time the PCs. or Have I what overlooking

greetings

Web
 
Xprofan X3.1
Win7 auf AMDX6
10/19/09  
 



Fix hingepinselt
CompileMarkSeparation
CompileMarkSeparation
 $H windows.ph
DECIMALS 0
CLS
DECLARE TIMER&[]
DECLARE HDISP&[]
DECLARE HSTART&[]
DECLARE HPAUSE&[]
DECLARE HRESET&[]

WHILELOOP 20

    TIMER&[&LOOP]=0
    HDISP&[&LOOP]=(CONTROL("STATIC","Timer:"+STR$(&LOOP),$50000000,(20),(&LOOP*20),(400),(18),(%HWND),0,%HINSTANCE))
    HSTART&[&LOOP]=(CREATE("BUTTON",(%HWND),"Start",(450),(&LOOP*20),(50),(18)))
    HPAUSE&[&LOOP]=(CREATE("BUTTON",(%HWND),"Pause",(500),(&LOOP*20),(50),(18)))
    HRESET&[&LOOP]=(CREATE("BUTTON",(%HWND),"Reset",(550),(&LOOP*20),(50),(18)))

ENDWHILE

SUBCLASS %HWND,1
~setTimer(%HWND,222,100,0)

WHILE 1

    WAITINPUT

    WHILELOOP 20

        IF CLICKED(HSTART&[&LOOP])

            TIMER&[&LOOP]=&GETTICKCOUNT

        ENDIF

        IF CLICKED(HPAUSE&[&LOOP])

            TIMER&[&LOOP]=-TIMER&[&LOOP]

        ENDIF

        IF CLICKED(HRESET&[&LOOP])

            TIMER&[&LOOP]=0
            SETTEXT HDISP&[&LOOP],"0"

        ENDIF

    ENDWHILE

ENDWHILE

end

subclassproc

    IF %SMESSAGE=$0113

        IF &SWPARAM=222

            WHILELOOP 20

                IF TIMER&[&LOOP]>0

                    SETTEXT HDISP&[&LOOP],STR$(&GETTICKCOUNT-TIMER&[&LOOP])+"ms"

                ENDIF

            ENDWHILE

        ENDIF

    ENDIF

endproc

without Feinschliff. too jolly [...]  from [...]  .
 
10/19/09  
 




Web
Scanner
utterly calm iF, Thank you - Variante 2 goes on attempt.
the werd I time reinbasteln. there would have I Tagelang dran rumprobiert

with the oberen Programmstückchen come I unfortunately not clear

Regards

Web
 
Xprofan X3.1
Win7 auf AMDX6
10/19/09  
 



gladly happen!

Oberes goes with XPSE, thatswhy something einfachere Syntax.
 
10/19/09  
 




Web
Scanner


with interval should only yet The Time "anhalten",
because The runs intern moreover and if to the second time interval pressing,
is the Time weitergelaufen and runs from the Zeitpunkz from moreover

but me helps the really already plenty moreover.

Regards

Web
 
Xprofan X3.1
Win7 auf AMDX6
10/19/09  
 



I knows, but I think time this is fix hinzubekommen - with Resume z.B. simply whom To subtrahierenden worth by GetText detect. ^^
 
10/19/09  
 




Web
Scanner
Okay. Mach I then so
 
Xprofan X3.1
Win7 auf AMDX6
10/19/09  
 




Web
Scanner
Hi,

enclosed my Solution with couple geklauten Program lines of iF.
sure not so beautiful program, but it's running.
so the counter to that testing faster runs, have I Settimer on 100 staid
(1000 would correctly.).

Regards

Web
CompileMarkSeparation
**** Programm zur parallelen Zeitanzeige in Profan ****
declare time1&, minute1%, zähler1%, Stunde1%
declare time2&, minute2%, zähler2%, Stunde2%
declare time3&, minute3%, zähler3%, Stunde3%, Loopzahl%
declare Starttimer1%, Starttimer2%, Starttimer3%, a%
DECLARE TIMER&[]
DECLARE HDISP&[]
DECLARE HSTART&[]
DECLARE HPAUSE&[]
DECLARE HRESET&[]

proc Timer1

    inc time1&
    Locate 2 , 14
    print str$(time1&);" s "
    zähler1% = zähler1%+1

    If  zähler1% = 60

        Minute1% = minute1%+1
        locate 2 , 7
        print minute1%;" min "
        zähler1% = 0
        time1& = 0

    endif

    If Minute1% = 60

        Stunde1% = Stunde1% + 1
        Locate  2 , 2
        Print Stunde1%;" h "
        Minute1% = 0

    Endif

endproc

proc Timer2

    inc time2&
    Locate 4 , 14
    print str$(time2&);" s "
    zähler2% = zähler2%+1

    If  zähler2% = 60

        Minute2% = minute2%+1
        locate 4 , 7
        print minute2%;" min "
        zähler2% = 0
        time2& = 0

    endif

    If Minute2% = 60

        Stunde2% = Stunde2% + 1
        Locate  4 , 2
        Print Stunde2%;" h "
        Minute2% = 0

    Endif

endproc

proc Timer3

    inc time3&
    Locate 6 , 14
    print str$(time3&);" s "
    zähler3% = zähler3%+1

    If  zähler3% = 60

        Minute3% = minute3%+1
        locate 6 , 7
        print minute3%;" min "
        zähler3% = 0
        time3& = 0

    endif

    If Minute3% = 60

        Stunde3% = Stunde3% + 1
        Locate  6 , 2
        Print Stunde3%;" h "
        Minute3% = 0

    Endif

endproc

WindowStyle 2+8+16+512
Window 0 , 0 - 640 , 480
time1& = 0
time2& = 0
SetTimer 100
minute1% = 0
zähler1% = 0
minute2% = 0
zähler2% = 0
Locate 2,2
print "0 h "
Locate 2,7
print "0 min "
Locate 2,14
print "00 s "
Locate 4,2
print "0 h "
Locate 4,7
print "0 min "
Locate 4,14
print "00 s "
Locate 6,2
print "0 h "
Locate 6,7
print "0 min "
Locate 6,14
print "00 s "

WHILELOOP 3

    HSTART&[&LOOP]=(CREATE("BUTTON",(%HWND),"Start",(450),(&LOOP*20),(50),(18)))
    HPAUSE&[&LOOP]=(CREATE("BUTTON",(%HWND),"Pause",(500),(&LOOP*20),(50),(18)))
    HRESET&[&LOOP]=(CREATE("BUTTON",(%HWND),"Reset",(550),(&LOOP*20),(50),(18)))

ENDWHILE

--------------Sprungschleife für START ------------------
Loopzahl% = 0
Starttimer1% = 0

whilenot %Key = 2

    WAITINPUT
    Loopzahl% = 0

    WHILELOOP 3

        Loopzahl% =  Loopzahl% +1

        IF CLICKED(HSTART&[&LOOP])

            IF Loopzahl% = 1

                Starttimer1% = 1

            ENDIF

        ENDIF

        IF CLICKED(HPAUSE&[&LOOP])

            IF Loopzahl% = 1

                Starttimer1% = 0

            ENDIF

        ENDIF

        IF CLICKED(HSTART&[&LOOP])

            IF Loopzahl% = 2

                Starttimer2% = 1

            ENDIF

        ENDIF

        IF CLICKED(HPAUSE&[&LOOP])

            IF Loopzahl% = 2

                Starttimer2% = 0

            ENDIF

        ENDIF

        IF CLICKED(HSTART&[&LOOP])

            IF Loopzahl% = 3

                Starttimer3% = 1

            ENDIF

        ENDIF

        IF CLICKED(HPAUSE&[&LOOP])

            IF Loopzahl% = 3

                Starttimer3% = 0

            ENDIF

        ENDIF

        IF CLICKED(HRESET&[&LOOP])

            IF Loopzahl% = 1

                minute1% = 0
                Stunde1% = 0
                zähler1% = 0
                time1& = 0
                Locate 2,2
                print "0 h "
                Locate 2,7
                print "0 min "
                Locate 2,14
                print "00 s "
                Starttimer1% = 0

            ENDIF

            IF Loopzahl% = 2

                minute2% = 0
                Stunde2% = 0
                zähler2% = 0
                time2& = 0
                Locate 4,2
                print "0 h "
                Locate 4,7
                print "0 min "
                Locate 4,14
                print "00 s "
                Starttimer2% = 0

            ENDIF

            IF Loopzahl% = 3

                minute3% = 0
                Stunde3% = 0
                zähler3% = 0
                time3& = 0
                Locate 6,2
                print "0 h "
                Locate 6,7
                print "0 min "
                Locate 6,14
                print "00 s "
                Starttimer3% = 0

            ENDIF

        ENDIF

    Endwhile

    If starttimer1% = 1

        A% = %wmTimer : Timer1

    Endif

    If starttimer2% = 1

        A% = %wmTimer : Timer2

    Endif

    If starttimer3% = 1

        A% = %wmTimer : Timer3

    ./../../funcion-referencias/XProfan/endif/'>Endif

Wend

KillTimer
end
 
Xprofan X3.1
Win7 auf AMDX6
10/20/09  
 



Ah, have on %wmtimer umgestellt - ok, has but with small Timerwerten whom disadvantage, that Waitinput then not any more so reliably is and so I something like always automatically into subClassProc auslagere. Hauptsache goes. ^^
 
10/20/09  
 




Web
Scanner
Yes, this is here relatively unkritisch, It's all right with whom times not circa sec.
there reicht it if The Minutenangeben to some extent hinkommen.
hope for reicht it
 
Xprofan X3.1
Win7 auf AMDX6
10/20/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

6.951 Views

Themeninformationen

this Topic has 2 subscriber:

Web Scanner (6x)
iF (4x)


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