| Foro |  |  |  |  |  |  |  |  | | ¡Hola, 
 also nun como Yo sí ya una wenig más bin con mi Programa Yo hier todavía el kleine Schwierigkeit el Taster also por Mousepressed con el Rolltor a verknüpfen. Bedeutet Yo voluntad el Rolltor por Taster (aber sólo solange él gedrückt se) hoch y runterfahren dejar, sobald uno el Taste loslässt se el Tor aber posición bleiben.
 KompilierenMarcaSeparación
 Window 1,1 - 1024,768
cls
declare hBild1&,hBild2&,hBild3&,hBild4&,hBild5&,hBild6&,hBild7&,hBild8&\
,hBild9&,hBild10&,hBild11&,hBild12&,hBild13&,hBild14&,hBild15&,hBild16&
Proc BMP
    hBild1&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tagn0.BMP")
    hBild2&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tagn1.BMP")
    hBild3&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tart0.BMP")
    hBild4&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tart1.BMP")
    hBild5&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\nota1.BMP")
    hBild6&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\trt1.BMP")
    hBild7&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\trt0.BMP") ;Störungsleuchte ein
    hBild8&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tabl0.BMP")
    hBild9&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tge0.BMP")
    hBild10& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tgn1.BMP")
    hBild11& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\sertar1.BMP")
    hBild12& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\sertar0.BMP")
    hBild13& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\objekte\\druckzr.BMP")
    hBild14& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\objekte\\emotl1.BMP")
    hBild15& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\lichtschr.BMP")
    hBild16& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\objekte\\rolltor.BMP")
Endproc
Proc BMP1
    roundrect 600,130-500,300;30,30
    rectangle 1,290-200;0
    DrawSizedPic hBild1&,40,50 - 30,30;0
    DrawSizedPic hBild1&,40,210 - 30,30;0
    DrawSizedPic hBild1&,40,170 - 30,30;0
    DrawSizedPic hBild1&,40,250 - 30,30;0
    DrawSizedPic hBild3&,40,130 - 30,30;0
    DrawSizedPic hBild3&,40,10 - 30,30;0
    DrawSizedPic hBild5&,120,10 - 30,30;0
    DrawSizedPic hBild8&,120,50 - 30,30;0
    DrawSizedPic hBild6&,120,130 - 30,30;0
    DrawSizedPic hBild9&,120,170 - 30,30;0
    DrawSizedPic hBild10&,120,210 - 30,30;0
    DrawSizedPic hBild10&,225,125 - 30,30;0
    DrawSizedPic hBild10&,225,215 - 30,30;0
    DrawSizedPic hBild6&,225,305 - 30,30;0
    DrawSizedPic hBild12&,255,305 - 30,30;0
    DrawSizedPic hBild11&,255,215 - 30,30;0
    DrawSizedPic hBild12&,255,125 - 30,30;0
    DrawSizedPic hBild13&,420,305 - 30,30;0
    DrawSizedPic hBild14&,420,120 - 40,40;0
    DrawSizedPic hBild15&,390,350 - 30,30;0
    rem DrawSizedPic hBild16&,270,130 - 160,220;0
    DrawSizedPic hBild3&,510,140 - 30,30;0
    DrawSizedPic hBild1&,510,180 - 30,30;0
    DrawSizedPic hBild1&,510,220 - 30,30;0
    DrawSizedPic hBild1&,510,260 - 30,30;0
Endproc
Proc Texte
    Locate 2,2
    Print "Aus"
    Locate 5,2
    Print "Ein"
    Locate 8,5
    Print "Anlage"
    Locate 12,2
    Print "STOP"
    Locate 15,2
    Print "AUF"
    Locate 18,2
    Print "HALB"
    Locate 21,2
    Print "ZU"
    Locate 23,6
    Print "Tor"
    Locate 2,10
    Print "Notaus"
    Locate 5,10
    Print "verriegelt"
endproc
rem Ausführung der Prozeduren
BMP
BMP1
Texte
Proc Taster1
    While %mousepressed
        DrawSizedPic hBild2& ,40 , 50 - 30, 30; 0
    EndWhile
    DrawSizedPic hbild1& ,40 , 50 - 30, 30; 0
Endproc
Proc Rolltor
    mLoadBmp "D:\\Xprofan\\BMP\\Objekte\\rolltor.BMP"
    startPaint -1
    usepen 0,0,$FFFFFF
    line 0,181 - 127,181
    endPaint
endproc
Proc Torzu
    whileLoop 182,0,-1
        mCopyBmp 0,&loop - 127,182 > 290,140 ; 0
        sleep 30
    wend
endproc
Proc Torauf
    Taster1
    whileLoop 182
        mCopyBmp 0,&loop - 127,182 > 290,140 ; 0
        sleep 30
    wend
endproc
Rolltor
Torzu
Torauf
While 1
    waitinput
    if @Mouse (40,50 - 30,30)
        offset%=0
        Taster1
    Elseif @Mouse (40,50 - 30,90)
        offset%=50
        Taster1
    Elseif @Mouse (40,50 - 30,140)
        offset%=100
        Taster1
    Elseif @Mouse (10,0 - 30,190)
        offset%=150
        Taster1
    else
        @Mouse (10,160 - 30,190)
        Break
    Endif
Endwhile
Proc Rolltor
    mLoadBmp "D:\\Xprofan\\BMP\\Objekte\\rolltor.BMP"
    startPaint -1
    usepen 0,0,$FFFFFF
    line 0,181 - 127,181
    endPaint
endproc
Proc Torzu
    whileLoop 182,0,-1
        mCopyBmp 0,&loop - 127,182 > 100,100 ; 0
        sleep 30
    wend
endproc
Proc Torauf
    waitInput
    whileLoop 182
        mCopyBmp 0,&loop - 127,182 > 100,100 ; 0
        sleep 30
    wend
endproc
Rolltor
 href='./../../references-fonction/XProfan/torzu/'>Torzu
Torauf
end
 | 
 
  |  | 921 kB |  |  |  | Versión: | 11 |  |  |  | Kurzbeschreibung: | Bitmaps para el Programa |  |  |  | Hochgeladen: | 22.06.2011 |  |  |  | Ladeanzahl: |  |  |  |  | Descargar | 
 |  |  |  |  |  |  |  |  | 
 
 
 |  |  |  |  | | Im Endeffekt muss Yo sólo wissen Yo al besten el prozeduren Así que el Taster y el Tor miteinander verknüpfe. Ob Yo el con mouseclicked oder @mouse usw. versuchen se, lo wäre schön si me alguien una kleines Ejemplo remendar podría  | 
 |  |  |  |  |  |  |  |  | 
 
 
 |  |  |  |  |  |  |  |  |  |  |  |  |  | 
 
 
 |  |  |  |  Jörg
 Sellmeyer
 | | Si usted ahora beide Maustasten verwendest, funktioniert lo como gewünscht: KompilierenMarcaSeparación
 cls
declare torhoehe&
var tor&=createText(%hWnd,"Tor",0,0,0,0)
while 1
    waitinput 10
    if external("user32","GetAsyncKeyState",1)
        case torhoehe&<100 : inc torhoehe&
    Elseif external("user32","GetAsyncKeyState",2)
        case torhoehe& : dec torhoehe&
    endif
    setWindowPos tor&=10,10 - 100,torHoehe&;0
wend
 | 
 |  |  |  |  | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 22.06.2011  ▲ | 
 |  |  |  | 
 
 
 |  |  |  |  |  |  |  |  | 
 
 
 |  |  |  |  Jörg
 Sellmeyer
 | | Hier puede ser todavía algo Rechenarbeit sparen: KompilierenMarcaSeparación
 ¿Por qué es no con el Keycodes para "+" y "-"? Mit a y b geht's...
 | 
 |  |  |  |  | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 22.06.2011  ▲ | 
 |  |  |  | 
 
 
 |  |  |  |  | | Hi, hehe y danke. Sollte vorher bevor Yo el bearbeite primero el Programa a se una wenig übersichtlicher gestalten  Yo muss sagen habe todavía con Xprofan mi Schwierigkeiten, Yo voluntad mich nebenbei todavía una wenig con C# Visual Studio beschäftigen, tal vez liegt me simplemente mehr  | 
 |  |  |  |  |  |  |  |  | 
 
 
 |  |  |  |  | | Ausser el uno así Formulare schön zusammenklicken kann es alles otro eigentlich sólo umständlicher como con XProfan. Das Tor y el Steuerung hättest z.B. en Temporizador auslagern necesario y así z.B. de scheinbar "einfachem Handling" rápidamente übler unzusammenhängender Code. | 
 |  |  |  |  |  |  |  |  | 
 
 
 |  |  |  |  | | Oha, deswegen blockier Yo mich como así  hm hm Temporizador, veces Ayuda befragen^^ Aber danke, todavía finde Yo el schöne Kontext-Función el Befehle a la Excel muy schön en VS C#, hilft ungemein más  Aber versuche nun veces el Temporizador como con einzubinden en Profano y veces schauen, voluntad wahrscheinlich el Prog entonces otra vez neu escribir, como el übersichtlichkeit aufgrund el Masse ya no mehr se da. Yo finde Profano sólo manchmal en el Syntax bastante komplex  | 
 |  |  |  |  |  |  |  |  | 
 
 
 |  |  |  |  | | Also en todos veces a verkleinern kann Yo el untere Procedimiento auch mittels Bucle a uno kleineren zusammenfassen en el él se siempre otra vez el Bilder bedient? Ohne el Yo ahora como vorher cada einzelne Bild neu lade? KompilierenMarcaSeparación
 
Proc BMP
    hBild1&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tagn0.BMP")
    hBild2&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tagn1.BMP")
    hBild3&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tart0.BMP")
    hBild4&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tart1.BMP")
    hBild5&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\nota1.BMP")
    hBild6&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\trt1.BMP")
    hBild7&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\trt0.BMP") ;Störungsleuchte ein
    hBild8&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tabl0.BMP")
    hBild9&  = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tge0.BMP")
    hBild10& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\tgn1.BMP")
    hBild11& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\sertar1.BMP")
    hBild12& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\sertar0.BMP")
    hBild13& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\objekte\\druckzr.BMP")
    hBild14& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\objekte\\emotl1.BMP")
    hBild15& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\Schalter\\lichtschr.BMP")
    hBild16& = @create ("HPic",-1,"D:\\Xprofan\\BMP\\objekte\\rolltor.BMP")
ENDPROC
 | 
 |  |  |  |  |  |  |  |  | 
 
 
 |  |  |  |  Jörg
 Sellmeyer
 | | Yo sería a Deiner Punto sólo una oder zwei Bilder uso. El bastante einfache Variante wäre entonces así:
 KompilierenMarcaSeparación
 Declare bmp$,hBmp&,stBmp&
bmp$ = "Tor.bmp"
hBmp& = Create("hPic",-1,bmp$)
cls
declare torhoehe&
var tor&=Create("Bitmap",%hWnd,hBmp&,0,0,0,0)
while 1
    waitinput 10
    torhoehe&=range(torhoehe&+iskey(1)*1+iskey(2)*-1,0,100)
    setWindowPos tor&=10,10 - 100,torHoehe&;0
 | 
 
 |  |  |  |  | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 23.06.2011  ▲ | 
 |  |  |  | 
 
 
 |  |  |  |  | | Ok alles klar, sí el problema es el wir para una echtes Rolltor sólo el Schalttafel kopiert haben en el Ganze später al PC por SPS fernsteuern a puede. Daher son aufgrund el Taster y Sensoren etc. el ganzen Bilder nötig. 
 Und por mi "spezielle" Übersichtlichkeit es el no bastante sooo simplemente
  
 Aber Yo voluntad me igual otra vez anschauen, porque con c# Yo ya en 5min nen Taschenrechner gebastelt encima mehrere Métodos.
 Macht Spass, Xprofan es dagegen natürlich komplexer,also finde Yo zumindest....
 | 
 |  |  |  |  |  |  |  |  | 
 
 
 | 
 
 Respuesta| Tema opciones | 11.143 Views | 
 ThemeninformationenDieses Thema ha 5 subscriber: |