English
Forum

Click simulate

 

Timotheus
Hi,

I have a problem. i want at a designed place in the program Window a EditBox create. The y-Koordinate becomes by the Click select, and the x-k. is 0.
in this Edit-Box can but already one Text stand. therefore must I the Click once more repeat, once the Edit created watts. therefore setting itself the Cursor in the Edit very on The right place, How in a MultiEdit. How do I do the ?

Timo
 
09/11/04  
 




Michael
Dell
Hello Timo,

if I the right see Dou you mean well ne manner Listbox.
then helps you Maybe these demonstration:
CompileMarkSeparation
Greeting

Michael
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
09/11/04  
 




Timotheus
i want at a defined place one Edit produce.

the happens if a MausTaste pressed becomes:
Create(Edit,%Hwnd,i'm one Edit,0,%mousey,%WinRight,25)

now would like I but whom Schreibbalken in the Edit on The right place bring. that is if I integrally left on the Window a Mausteste press, then would like I first the Edit produce, and then on
%Mousex and %Mousey a Click simulate. therefore is then the Schreibbalken to the first characters.

Timo
 
09/11/04  
 




Michael
Dell
Sorry, small mistake!

Versuchs time herewith, it setting whom Cursor on whom beginning:
CompileMarkSeparation
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
09/11/04  
 




Timotheus
not integrally, if to that example The mouse something moreover lane of left Fensterrand pressed becomes, then must the Schreibbalken on z.B. the second place stand. concise and simply: How can I a Click at a designed place simulate?

Timo
 
09/12/04  
 




Michael
Dell
OK, then time so:
CompileMarkSeparation
Def GSC(1)           !User32.dll,GetSysColor
Def ButtonUp(1)      Equ(If(Equ(%Lastmessage,514),1,If(Equ(%Lastmessage,512),SetFocus(&(1)),0)),1)
Def SetCurPosNull(1) SendKey(@&(1),36)  Setzt den Cursor an erste Stelle
Def SetCurPosEnd(1)  SendKey(@&(1),35)  Setzt den Cursor an letzte Stelle

Proc SetCurPos                          Setzt den Cursor an beliebige Stelle

    Parameters hndl&,anz&
    Case Lt(anz&,1)
    SendKey(hndl&,36)

    WhileLoop 1,@&(2),1

        SendKey(hndl&,39)

    EndWhile

EndProc

declare bt01&,ed01&,edak%
Clear bt01&,ed01&,edak%

Proc MakeED

    Parameters HWHndl&,Text$,x%,y%,b%,h%

    If Equ(edak%,0)                                    wenn Edit-Control nicht existent dann...

        ed01& = create(Edit,HWHndl&,Text$,x%,y%,b%,h%)  Erzweuge Edit-Control mit Text inhalt
        SetFocus(ed01&)                                  Setze Focus auf Edit-Control
        SetCurPos(ed01&,8)                              Setzt den Cursor an Stelle 8
        Sleep 1000
        SetCurPos(ed01&,6)                              Setzt den Cursor an Stelle 6
        Sleep 1000
        SetCurPos(ed01&,4)                              Setzt den Cursor an Stelle 4
        Sleep 1000
        SetCurPos(ed01&,2)                              Setzt den Cursor an Stelle 2
        Sleep 1000
        SetCurPosNull(ed01&)                            Setzt den Cursor an erste Stelle
        Sleep 1000
        SetCurPosEnd(ed01&)                             Setzt den Cursor an letzte Stelle
        Sleep 1000
        SetCurPosNull(ed01&)                            Setzt den Cursor an erste Stelle
        Sleep 1000

    EndIf

    Return 1

EndProc

SetTrueColor 1
WindowStyle 26
Window Add(%maxX,10),0-500,66
Cls GSC(15)
bt01& = create(Button,%HWnd,Erstelle Edit,360,10,120,22)
Window 0,0-500,66

WhileNot Or(Equ(%MenuItem,-2),Equ(%MenuItem,-4000))

    GetMessage

    If GetFocus(bt01&)

        If ButtonUp(%HWnd)

            edak% = MakeED(%HWnd,Hallolo, na wie gethts?,10,10,340,22)
            Case edak%: SetFocus(ed01&)

        EndIf

    EndIf

EndWhi
End

Michael...

P.s.: Have I everything in the Profan- Help nachgeschlagen!
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
09/12/04  
 




Timotheus
No the neither!

here time one demonstration:
CompileMarkSeparation
here missing only The Def or Proc SimuliereMausklick. in this example is the Schreibbalken by the wiederholte clicking on the right place. this is How if one into vorhandenes Edit clicking, then setting itself the beam indeed automatically on The place The in the Edit klicked watts.

Timo
 
09/12/04  
 



so?
CompileMarkSeparation
cls
declare x%,a&,b&

while 1

    waitinput

    if %Mousekey = 1

        x% = %Mousex
        a& = Create(Edit,%Hwnd,Hallo,0,%Mousey - 12,600,25)
        @SENDMESSAGE(a&,$00B1,0,256)
        @SETFOCUS(A&)
        Sleep 1000
        destroyWindow(a&)

    endif

wend


or so??
CompileMarkSeparation
DEF @mouse_event(5)!User32,mouse_event
CLS
declare x%,a&,b&

while 1

    Waitinput

    if %Mousekey = 1

        x% = %Mousex
        a& = Create(Edit,%Hwnd,Hello,0,%Mousey - 12,600,25)
        @mouse_event(2,x%,%MOUSEY,0,0)
        @mouse_event(4,x%,%MOUSEY,0,0)
        @mouse_event(2,x%,%MOUSEY,0,0)
        @mouse_event(4,x%,%MOUSEY,0,0)
        Sleep 1000
        destroyWindow(a&)

    endif

wend

 
09/12/04  
 




Dietmar
Horn
yet as appendix (to response of Andreas)

DEF @mouse_event(5)!User32,mouse_event

mouse_event(n,dx%,dy%,0,0)

=> resolve a artificial Mausbewegung and a Click from.
=> has none Return Value

n: gives on, which Mouse button pressed (simulate) go should

n = $1 - Double click simulate
n = $2 - left Mouse button runterdrücken
n = $4 - left Mouse button release
n = $8 - rights Mouse button runterdrücken
n = $10 - rights Mouse button release
n = $20 - mittlere Mouse button runterdrücken (if present)
n = $40 - mittlere Mouse button release (if present)

dx% = x-Koordinate the Mausposition (or its Änderung, where tappt im dunkeln from the derzeitigen position from seen, hingesetzt go should)
dy% = y-Koordinate the Mausposition (or its ...)

The 4. and 5. Parameter having no weight, therefore means each on 0 settle.

possible must You another slightly with the Mouse-Coordinates experiment, white not, whether these relatively or utterly are, whether related on the Desktop, the Mainwindow, or the Dialog-Window. try thereby too time $8000 with whom Values for n To add, means n = $8000 + $2, or n = $2 settle. $8000 = MOUSEEVENTF_ABSOLUTE

Greeting
Dietmar
 
Multimedia für Jugendliche und junge Erwachsene - MMJ Hoyerswerda e.V.  [...] 

Windows 95 bis Windows 7
Profan² 6.6 bis XProfan X2 mit XPSE

Das große XProfan-Lehrbuch:  [...] 
09/12/04  
 




Timotheus
thanks

Timo
 
09/12/04  
 




Uwe
''Pascal''
Niemeier
Hello people!

Gibts because The API mouse_event  XP/NT at all yet?
Quote of MSDN:


The mouse_event function synthesizes mouse motion and button clicks.
windows NT: Diese function has been superseded. Use SendInput instead.


SeeYou
Pascal
 
09/13/04  
 




Michael
Dell
Microsoft wished mouse_event already former supplant, the standing anyway so in the WinHlp no Win32s. I denk from Supportgründen functions it in the momentum yet, one ought to well in future hereon dispense. In Longhorn Better get going well not any more weg.

Michael...
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
09/13/04  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.973 Views

Untitledvor 0 min.
H.Brill01/17/25
Sven Bader07/04/23
AndreasS11/29/18
RICOSCH06/17/16
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