ich habe folgendes Problem:
Wenn ich die Koordinaten aus einen Bild die Koordinaten erlese und sie dann im GUI anzeige, klappt alles wunderbar. Mein Problem besteht aber darin das ich die Koordinaten , die im GUI angezeigt werden, multiplizieren mit 10 möchte. Nach allen möglichen Versuchen hat es denoch nicht geklappt. (Google war keine große Hilfe)
Ich würde mich freuen wenn ihr mir weiter helfen könntet.
Hier mein code:
Code:
#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <misc.au3.> Opt('MouseCoordMode', 0) #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("koordinaten für Mc2", 755, 570, 192, 114) $Pic1 = GUICtrlCreatePic("c:\tool\hud_map_la.jpg", 152, 64, 564, 436, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUICtrlSetCursor (-1, 3) $Label1 = GUICtrlCreateLabel("X -->", 40, 56, 26, 17) $Label2 = GUICtrlCreateLabel("Y -->", 40, 80, 26, 17) $y = GUICtrlCreateLabel("0.00" *10, 88, 56, 25, 17) // das * 10 $x = GUICtrlCreateLabel("0.00" * 10, 88, 80, 25, 17) // das * 10 $Label5 = GUICtrlCreateLabel("noch nichts ", 624, 544, 110, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While (1) $nMsg = GUIGetMsg() $Pos = MouseGetPos() ToolTip($Pos[0] - 461 &" / "& $Pos[1] - 332) if _IsPressed(01) then GUICtrlSetData($y, $pos[0] - 461 ) if _IsPressed(01) then GUICtrlSetData($x , $pos[1] - 332 ) Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
HTML Code:
if _IsPressed(01) then GUICtrlSetData($y, ($pos[0] - 461)*10 ) if _IsPressed(01) then GUICtrlSetData($x , ($pos[1] - 332)*10)