Hallo,
so jetzt habe ich mir vorgenommen in zukunft mehr selbst zu machen aber ich hänge an einer stelle komme auch über die hilfe nicht weiter
würde mich über eine kleine hilfe freuen
ich weiss es gibt keine if exist funktion,
aber ich wolle abfragen wenn es kein $pic dann zähle hoch also $pic2
Spoiler anzeigen
Func _fpic
if exist $pic1 + 1 ;????????????????????????
EndFunc
Spoiler anzeigen
#include <ListviewConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <SliderConstants.au3>
#Include <GuiListView.au3>
#Include <Array.au3>
#Include <File.au3>
#Include <Misc.au3>
Opt("GUIOnEventMode", 1)
Global $posXStart, $posYStart, $posXStop, $posYStop, $pic, $hGui, $Pos_M2 = MouseGetPos()
$hGUI = GUICreate("Transparent", 575, 510)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Ex")
$insert = GuiCtrlCreateButton("Insert Pic" ,10,10)
GuiCtrlSetOnEvent(-1, "_insert")
$Pic=GUICtrlCreatePic("", 50, 50)
GuiCtrlSetOnEvent(-1, "_DragMe")
$insert = GuiCtrlCreateButton("Del Pic" ,65,10)
GuiCtrlSetOnEvent(-1, "_del")
GUISetState(@SW_SHOW)
While 1
sleep(100)
WEnd
Func _fpic
if exist $pic1 + 1 ;????????????????????????
EndFunc
Func _insert()
$bild = FileOpenDialog("Wählen Sie eine Datei aus!", @WindowsDir & "\", "Bilder (*.jpg;*.bmp)", 1 + 4 )
$Pic1 = GUICtrlCreatePic($bild, 150, 150)
GuiCtrlSetOnEvent(-1, "_DragMe")
EndFunc
Func _del()
GuiCtrlDelete($pic1)
EndFunc
Func _DragMe()
Global $Pos_C, $Pos_M, $Pos_M2, $Opt_old
Local $dll = DllOpen("user32.dll")
$Opt_old = Opt('MouseCoordMode', 0)
$Pos_C = ControlGetPos($hGui, "", $pic)
$Pos_M = MouseGetPos()
$Pos_W = WinGetPos($hGui)
$x_Offset = $Pos_M[0] - $Pos_C[0]
$y_Offset = $Pos_M[1] - $Pos_C[1]
_MouseTrap($Pos_W[0]+$x_Offset,$Pos_W[1]+$y_Offset,$Pos_W[0]+$Pos_W[2],$Pos_W[1]+$Pos_W[3])
While _IsPressed('01', $dll)
$Pos_M = MouseGetPos()
If $Pos_M <> $Pos_M2 Then
GUICtrlSetPos($pic,$Pos_M[0] - $x_Offset, $Pos_M[1] - $y_Offset)
sleep(10)
EndIf
$Pos_M = $Pos_M2
sleep(50)
WEnd
DllClose($dll)
Opt('MouseCoordMode', $Opt_old)
_MouseTrap()
EndFunc
Func _Ex()
Exit
EndFUnc
so sieht mein code jetzt aus zeile 29 fängt das problem an.
Eine idee?