brauche kleine hilfe

07/29/2010 17:26 omer36#1
ich hab mal ein kleine tool geschrieben, und komme an der stelle nicht weiter:

PHP Code:
    GUICtrlSetData($edit1"MouseClick("&"left"&" , "$pos[0] &", "$pos[1] &", 1)"
es will einfach nicht "left" mit den "" schreiben....
wie mach ich das?

und 2. wie kann ich es machen, das wenn es die sachen in die editbox schreibt, bei jeden weiteren "TAB" drücken eine zeile drunter das nächste kommt?

bisjetz komplette source:

PHP Code:
#include <Misc.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ###
$Form1_1 GUICreate("Form1"355154211154)
$Label1 GUICtrlCreateLabel("X-Achse"484417)
$Label2 GUICtrlCreateLabel("Y-Achse"4364417)
$Label3 GUICtrlCreateLabel("Farbe"4723117)
$input1 GUICtrlCreateInput(""56410121)
$input2 GUICtrlCreateInput(""563210121)
$input3 GUICtrlCreateInput(""566810121)
$edit1 GUICtrlCreateEdit(""1722417785)
$Label4 GUICtrlCreateLabel("Bitte drücken Sie die TAB-Taste um die Position und Farbe zu speichern!"412034717)
$Option GUICtrlCreateCombo("Option"172017325)
GUICtrlSetData(-1"MouseClick()")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit

    EndSwitch
    
start()
WEnd

Func start
()
$pos MouseGetPos()
$farbe PixelGetColor($pos[0], $pos[1])
GUICtrlSetData($input1$pos[0])
GUICtrlSetData($input2$pos[1])
GUICtrlSetData($input3"0x" Hex($farbe6))

$dll DllOpen("user32.dll")
If 
_IsPressed("09"$dllThen
If GUICtrlRead($Option) =  "option" Then
    GUICtrlSetData
($edit1$pos[0] & @CRLF $pos[1] & @CRLF  & @CRLF "0x" Hex($farbe6))
ElseIf 
GUICtrlRead($Option) =  "MouseClick()" Then
    GUICtrlSetData
($edit1"MouseClick("&"left"&" , "$pos[0] &", "$pos[1] &", 1)")
EndIf
EndIf

DllClose($dll)
EndFunc 
MfG
07/29/2010 18:38 Shadow992#2
Quote:
Originally Posted by omer36 View Post
ich hab mal ein kleine tool geschrieben, und komme an der stelle nicht weiter:

PHP Code:
    GUICtrlSetData($edit1"MouseClick("&"left"&" , "$pos[0] &", "$pos[1] &", 1)"
es will einfach nicht "left" mit den "" schreiben....
wie mach ich das?

und 2. wie kann ich es machen, das wenn es die sachen in die editbox schreibt, bei jeden weiteren "TAB" drücken eine zeile drunter das nächste kommt?

bisjetz komplette source:

PHP Code:
#include <Misc.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ###
$Form1_1 GUICreate("Form1"355154211154)
$Label1 GUICtrlCreateLabel("X-Achse"484417)
$Label2 GUICtrlCreateLabel("Y-Achse"4364417)
$Label3 GUICtrlCreateLabel("Farbe"4723117)
$input1 GUICtrlCreateInput(""56410121)
$input2 GUICtrlCreateInput(""563210121)
$input3 GUICtrlCreateInput(""566810121)
$edit1 GUICtrlCreateEdit(""1722417785)
$Label4 GUICtrlCreateLabel("Bitte drücken Sie die TAB-Taste um die Position und Farbe zu speichern!"412034717)
$Option GUICtrlCreateCombo("Option"172017325)
GUICtrlSetData(-1"MouseClick()")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit

    EndSwitch
    
start()
WEnd

Func start
()
$pos MouseGetPos()
$farbe PixelGetColor($pos[0], $pos[1])
GUICtrlSetData($input1$pos[0])
GUICtrlSetData($input2$pos[1])
GUICtrlSetData($input3"0x" Hex($farbe6))

$dll DllOpen("user32.dll")
If 
_IsPressed("09"$dllThen
If GUICtrlRead($Option) =  "option" Then
    GUICtrlSetData
($edit1$pos[0] & @CRLF $pos[1] & @CRLF  & @CRLF "0x" Hex($farbe6))
ElseIf 
GUICtrlRead($Option) =  "MouseClick()" Then
    GUICtrlSetData
($edit1"MouseClick("&"left"&" , "$pos[0] &", "$pos[1] &", 1)")
EndIf
EndIf

DllClose($dll)
EndFunc 
MfG
So:

PHP Code:
#include <Misc.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ###
$Form1_1 GUICreate("Form1"355154211154)
$Label1 GUICtrlCreateLabel("X-Achse"484417)
$Label2 GUICtrlCreateLabel("Y-Achse"4364417)
$Label3 GUICtrlCreateLabel("Farbe"4723117)
$input1 GUICtrlCreateInput(""56410121)
$input2 GUICtrlCreateInput(""563210121)
$input3 GUICtrlCreateInput(""566810121)
$edit1 GUICtrlCreateEdit(""1722417785)
$Label4 GUICtrlCreateLabel("Bitte drücken Sie die TAB-Taste um die Position und Farbe zu speichern!"412034717)
$Option GUICtrlCreateCombo("Option"172017325)
GUICtrlSetData(-1"MouseClick()")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit

    EndSwitch
    
start()
WEnd

Func start
()
$pos MouseGetPos()
$farbe PixelGetColor($pos[0], $pos[1])
GUICtrlSetData($input1$pos[0])
GUICtrlSetData($input2$pos[1])
GUICtrlSetData($input3"0x" Hex($farbe6))

$dll DllOpen("user32.dll")
If 
_IsPressed("09"$dllThen
If GUICtrlRead($Option) =  "option" Then
    GUICtrlSetData
($edit1$pos[0] & @CRLF $pos[1] & @CRLF  & @CRLF "0x" Hex($farbe6))
ElseIf 
GUICtrlRead($Option) =  "MouseClick()" Then
    GUICtrlSetData
($edit1"MouseClick("&'"left"'&" , "$pos[0] &", "$pos[1] &", 1)")
EndIf
EndIf

DllClose($dll)
EndFunc 
07/29/2010 18:48 omer36#3
ahh danke...
weisst du vllt noch was zu meiner 2. frage?


wenn ich den "GUICtrlSetData" default-wert auf 1 setzte schreibt es das eine in 24zeilen.. -.-
will mit jedem tastendrück (TAB) in die nächste zeile schreiben...
07/29/2010 18:58 Shadow992#4
Quote:
Originally Posted by omer36 View Post
ahh danke...
weisst du vllt noch was zu meiner 2. frage?


wenn ich den "GUICtrlSetData" default-wert auf 1 setzte schreibt es das eine in 24zeilen.. -.-
will mit jedem tastendrück (TAB) in die nächste zeile schreiben...
So?
PHP Code:
#include <Misc.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ###
$Form1_1 GUICreate("Form1"355154211154)
$Label1 GUICtrlCreateLabel("X-Achse"484417)
$Label2 GUICtrlCreateLabel("Y-Achse"4364417)
$Label3 GUICtrlCreateLabel("Farbe"4723117)
$input1 GUICtrlCreateInput(""56410121)
$input2 GUICtrlCreateInput(""563210121)
$input3 GUICtrlCreateInput(""566810121)
$edit1 GUICtrlCreateEdit(""1722417785)
$Label4 GUICtrlCreateLabel("Bitte drücken Sie die TAB-Taste um die Position und Farbe zu speichern!"412034717)
$Option GUICtrlCreateCombo("Option"172017325)
GUICtrlSetData(-1"MouseClick()")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit

    EndSwitch
    
start()
WEnd

Func start
()
$pos MouseGetPos()
$farbe PixelGetColor($pos[0], $pos[1])
GUICtrlSetData($input1$pos[0])
GUICtrlSetData($input2$pos[1])
GUICtrlSetData($input3"0x" Hex($farbe6))

$dll DllOpen("user32.dll")
If 
_IsPressed("09"$dllThen
If GUICtrlRead($Option) =  "option" Then
    GUICtrlSetData
($edit1GUICtrlRead($edit1)&$pos[0] & @CRLF $pos[1] & @CRLF  & @CRLF "0x" Hex($farbe6)&@CRLF&@CRLF)
ElseIf 
GUICtrlRead($Option) =  "MouseClick()" Then
    GUICtrlSetData
($edit1GUICtrlRead($edit1)&"MouseClick("&'"left"'&" , "$pos[0] &", "$pos[1] &", 1)"&@CRLF&@CRLF)
EndIf
sleep(300)
EndIf

DllClose($dll)
EndFunc 
07/29/2010 19:06 omer36#5
ja genau...

danke dir ^^