nein - mega meint den AUTOIT Code - der der in Scite steht ...
MsgBox - Maus
-
- [ offen ]
-
Lenny -
8. August 2007 um 17:17 -
Geschlossen -
Erledigt
-
-
Nadann ...
Danke ,,,
aber könnte mir vllt jemand sagen was falsch ist ?Spoiler anzeigen
[autoit]#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
$Form2 = GUICreate("Dialog", 316, 231, 347, 263, BitOR($WS_MINIMIZEBOX,$WS_CAPTION,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetIcon("D:\003.ico")
$GroupBox1 = GUICtrlCreateGroup("Festplatte Formatieren?", 8, 1, 297, 193)
GUICtrlSetFont(-1, 20, 400, 0, "comic")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("&OK", 65, 203, 75, 25, 0)
GUICtrlSetTip(-1, "Danke!")
GUICtrlSetCursor ($Button1, 3)
$Button2 = GUICtrlCreateButton("&Cancel", 162, 203, 75, 25, 0)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###While 1
[/autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$status = Not $status
If $status Then
$pos_Button1 = WinGetPos($gui)
_MouseTrap($pos_A[0], $pos_A[1], $pos_A[0] + $pos_A[2], $pos_A[1] + $pos_A[3])
EndSwitch
WEndEr sagt immer:
Endswitch Statement has no matching Switch statementDanke im Voraus
-
Hi der fehler liegt unten bei der If-schleife. Dort fehlt ein endif.
Spoiler anzeigen
[autoit]#include <GUIConstants.au3>
[/autoit]
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Dialog", 316, 231, 347, 263, BitOR($WS_MINIMIZEBOX,$WS_CAPTION,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetIcon("D:\003.ico")
$GroupBox1 = GUICtrlCreateGroup("Festplatte Formatieren?", 8, 1, 297, 193)
GUICtrlSetFont(-1, 20, 400, 0, "comic")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("&OK", 65, 203, 75, 25, 0)
GUICtrlSetTip(-1, "Danke!")
GUICtrlSetCursor ($Button1, 3)
$Button2 = GUICtrlCreateButton("&Cancel", 162, 203, 75, 25, 0)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$status = Not $status
If $status Then
$pos_Button1 = WinGetPos($gui)
_MouseTrap($pos_A[0], $pos_A[1], $pos_A[0] + $pos_A[2], $pos_A[1] + $pos_A[3])
endif
EndSwitch
WEnd -
Spoiler anzeigen
[autoit]#include <GUIConstants.au3>
[/autoit]
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Dialog", 316, 231, 347, 263, BitOR($WS_MINIMIZEBOX,$WS_CAPTION,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetIcon("D:\003.ico")
$GroupBox1 = GUICtrlCreateGroup("Festplatte Formatieren?", 8, 1, 297, 193)
GUICtrlSetFont(-1, 20, 400, 0, "comic")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("&OK", 65, 203, 75, 25, 0)
GUICtrlSetTip(-1, "Danke!")
GUICtrlSetCursor ($Button1, 3)
$Button2 = GUICtrlCreateButton("&Cancel", 162, 203, 75, 25, 0)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$status = Not $status
If $status Then
$pos_Button1 = WinGetPos($gui)
_MouseTrap($pos_A[0], $pos_A[1], $pos_A[0] + $pos_A[2], $pos_A[1] + $pos_A[3])
EndIf ; -> hat gefehlt
EndSwitch
WEnd -
Vielen Danke aber irgentwie Funktioniert das mit der Mousetrap funk. nicht mehr ... ?
Und wenn ich auf dem Button klicke sag er/sie/es
$status = Not $status
Error: Variable used without being declared! ... ???
( Entschuldigt meine ganzen fragen, mache das ganze erst seit vorgestern Oo)Vielen vielen vielen [SIZE=7]vielen[/SIZE] DANK!
Naja .... -
- Offizieller Beitrag
Hi,
Spoiler anzeigen
[autoit]#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <Misc.au3>Global $status = 0
[/autoit]
#Region ### START Koda GUI section ### Form=
$gui = GUICreate("Dialog", 316, 231, 347, 263, BitOR($WS_MINIMIZEBOX,$WS_CAPTION,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetIcon("D:\003.ico")
$GroupBox1 = GUICtrlCreateGroup("Festplatte Formatieren?", 8, 1, 297, 193)
GUICtrlSetFont(-1, 20, 400, 0, "comic")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("&OK", 65, 203, 75, 25, 0)
GUICtrlSetTip(-1, "Danke!")
GUICtrlSetCursor ($Button1, 3)
$Button2 = GUICtrlCreateButton("&Cancel", 162, 203, 75, 25, 0)
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$status = Not $status
If $status Then
$pos_A = WinGetPos($gui)
_MouseTrap($pos_A[0], $pos_A[1], $pos_A[0] + $pos_A[2], $pos_A[1] + $pos_A[3])
EndIf ; -> hat gefehlt
EndSwitch
WEndSo long,
Mega
-
Hallllo
Ja supi! Vielen dank!Aber kann man es irgentwie hinbekommen das der mauszeiger von anfang an nicht heruas kann ?
-
- Offizieller Beitrag
ZitatOriginal von Warlenny
Hallllo
Ja supi! Vielen dank!Aber kann man es irgentwie hinbekommen das der mauszeiger von anfang an nicht heruas kann ?
Edit: Hab's nochmal geändert. In der bisherigen Version konnte _MouseTrap() durch Verschieben der GUI ausgehebelt werden.
Jetzt wird alle 500 ms _MouseTrap neu gesetzt.Kann man:
Spoiler anzeigen
[autoit]#include <GUIConstants.au3>
[/autoit]
#include <Misc.au3>
Global $pos_A
#Region ### START Koda GUI section ### Form=
$gui = GUICreate("Dialog", 316, 231, 347, 263, BitOR($WS_MINIMIZEBOX,$WS_CAPTION,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetIcon("D:\003.ico")
$GroupBox1 = GUICtrlCreateGroup("Festplatte Formatieren?", 8, 1, 297, 193)
GUICtrlSetFont(-1, 20, 400, 0, "comic")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("&OK", 65, 203, 75, 25, 0)
GUICtrlSetTip(-1, "Danke!")
GUICtrlSetCursor ($Button1, 3)
$Button2 = GUICtrlCreateButton("&Cancel", 162, 203, 75, 25, 0)
;~ GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$begin = TimerInit()
While WinExists($gui)
If TimerDiff($begin) > 500 Then
$pos_A = WinGetPos($gui)
_MouseTrap($pos_A[0], $pos_A[1], $pos_A[0] + $pos_A[2], $pos_A[1] + $pos_A[3])
$begin = TimerInit()
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button2
MsgBox(0, '', "Button2 gedrückt")
Exit
Case $Button1
MsgBox(0, '', "Button1 gedrückt")
EndSwitch
WEnd -
Hiho !
Vielen Dank!
Genau sowas meinte ich !
Funktioniert super !DANKE DANKE DANKE
LEnny
Nur eines noch :
Könnte man das hierSpoiler anzeigen
[autoit]#include <GUIConstants.au3>
[/autoit]
#include <Misc.au3>
Global $pos_A
#Region ### START Koda GUI section ### Form=
$gui = GUICreate("Dialog", 316, 231, 347, 263, BitOR($WS_MINIMIZEBOX,$WS_CAPTION,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetIcon("D:\003.ico")
$GroupBox1 = GUICtrlCreateGroup("Festplatte Formatieren?", 8, 1, 297, 193)
GUICtrlSetFont(-1, 20, 400, 0, "comic")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("&OK", 65, 203, 75, 25, 0)
GUICtrlSetTip(-1, "Danke!")
GUICtrlSetCursor ($Button1, 3)
$Button2 = GUICtrlCreateButton("&Cancel", 162, 203, 75, 25, 0)
;~ GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$begin = TimerInit()
While WinExists($gui)
If TimerDiff($begin) > 500 Then
$pos_A = WinGetPos($gui)
_MouseTrap($pos_A[0], $pos_A[1], $pos_A[0] + $pos_A[2], $pos_A[1] + $pos_A[3])
$begin = TimerInit()
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button2
MsgBox(0, '', "Button2 gedrückt")
Exit
Case $Button1
MsgBox(0, '', "Button1 gedrückt")
EndSwitch
WEndSpoiler anzeigen
[autoit]#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
$Form1 = GUICreate("Windows", 582, 93, 193, 115)
$Icon1 = GUICtrlCreateIcon("D:\Dokumente und Einstellungen\Lenny\Eigene Dateien\Azureus Downloads\Photoshop CS2\AutoPlay\RESDATA\CS2_AutoplayQuit_Md_N.ico", 0, 16, 16, 49, 49, BitOR($SS_NOTIFY,$WS_GROUP))
$Label1 = GUICtrlCreateLabel("Grober Fehler des pfades rundll32.exe eine neuinstallation ihres Systems könnte das problem beheben!", 80, 32, 485, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###While 1
[/autoit] [autoit][/autoit] [autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitEndSwitch
[/autoit]
WEnd
Irgentwie kombinieren sodaß wenn man den Button 2 (cancel)
klickt so eine meldung kommt und dann wieder zurück zur Box kommt ?Lenny
-
- Offizieller Beitrag
Verstehe nicht ganz, was du meinst.
Soll hier jetzt ein Button rein? Und wohin willst du zurück?Spoiler anzeigen
[autoit]#include <misc.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstants.au3>#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
$Form1 = GUICreate("Windows", 582, 93, 193, 115)
$Icon1 = GUICtrlCreateIcon("D:\Dokumente und Einstellungen\Lenny\Eigene Dateien\Azureus Downloads\Photoshop CS2\AutoPlay\RESDATA\CS2_AutoplayQuit_Md_N.ico", 0, 16, 16, 49, 49, BitOR($SS_NOTIFY,$WS_GROUP))
$Label1 = GUICtrlCreateLabel("Grober Fehler des pfades rundll32.exe eine neuinstallation ihres Systems könnte das problem beheben!", 80, 32, 485, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###$begin = TimerInit()
[/autoit]
While WinExists($Form1)
If TimerDiff($begin) > 500 Then
$pos_A = WinGetPos($Form1)
_MouseTrap($pos_A[0], $pos_A[1], $pos_A[0] + $pos_A[2], $pos_A[1] + $pos_A[3])
$begin = TimerInit()
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_Event_Close
Exit
EndSwitch
WEnd -
Hallo .. !
Sorry für die Blöde erklärung !Also ich habe mir über Koda ein GUI gemacht
und jetzt möchte ich das, wenn ich "cancel" klicke dieser gui zum einsatz kommt! Und wenn ich da auf OK geklickt habe möchte ich wieder zu der Frage am anfang!GUI:
Spoiler anzeigen
[autoit]#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
$Form1 = GUICreate("Windows", 582, 93, 193, 115)
$Icon1 = GUICtrlCreateIcon("http://www.mkportal-support.de/mkportal/templates/MKPBlue/images/error.gif", 0, 16, 16, 49, 49, BitOR($SS_NOTIFY,$WS_GROUP))
$Label1 = GUICtrlCreateLabel("Müll müll Ka Quatsch!", 80, 32, 485, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###While 1
[/autoit] [autoit][/autoit] [autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitEndSwitch
[/autoit]
WEndalso :
Spoiler anzeigen
[Blockierte Grafik: http://warlenny.funsurf.org/klick.PNG]
Und dann:
[Blockierte Grafik: http://warlenny.funsurf.org/button.PNG]DANKE schön ...
-
- Offizieller Beitrag
Meinst du so?
Spoiler anzeigen
[autoit]#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <Misc.au3>
[/autoit] [autoit][/autoit] [autoit]
#Region ### START Koda GUI section ### Form=
$gui = GUICreate("Dialog", 316, 231, 347, 263, BitOR($WS_MINIMIZEBOX,$WS_CAPTION,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
GUISetIcon("D:\003.ico")
$GroupBox1 = GUICtrlCreateGroup("Festplatte Formatieren?", 8, 1, 297, 193)
GUICtrlSetFont(-1, 20, 400, 0, "comic")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("&OK", 65, 203, 75, 25, 0)
GUICtrlSetTip(-1, "Danke!")
GUICtrlSetCursor ($Button1, 3)
$Button2 = GUICtrlCreateButton("&Cancel", 162, 203, 75, 25, 0)$Form1 = GUICreate("Windows", 582, 93, 193, 115)
[/autoit] [autoit][/autoit] [autoit]
$Icon1 = GUICtrlCreateIcon("D:\Dokumente und Einstellungen\Lenny\Eigene Dateien\Azureus Downloads\Photoshop CS2\AutoPlay\RESDATA\CS2_AutoplayQuit_Md_N.ico", 0, 16, 16, 49, 49, BitOR($SS_NOTIFY,$WS_GROUP))
$Label1 = GUICtrlCreateLabel("Grober Fehler des pfades rundll32.exe eine neuinstallation ihres Systems könnte das problem beheben!", 80, 32, 485, 17)GUISetState(@SW_SHOW, $gui)
[/autoit]
#EndRegion ### END Koda GUI section ###
$begin = TimerInit()
While WinExists($gui)
If WinActive($gui) And (TimerDiff($begin) > 500) Then
$pos_A = WinGetPos($gui)
_MouseTrap($pos_A[0], $pos_A[1], $pos_A[0] + $pos_A[2], $pos_A[1] + $pos_A[3])
$begin = TimerInit()
EndIf
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button1
MsgBox(0, '', "Button1 gedrückt")
Exit
Case $Button2
GUISetState(@SW_HIDE, $gui)
GUISetState(@SW_SHOW, $Form1)
Case $GUI_EVENT_CLOSE
GUISetState(@SW_SHOW, $gui)
GUISetState(@SW_HIDE, $Form1)
EndSwitch
WEnd -
Haiii!
geanial! vielen dank an alle!
Auf meiner seite sind alle fragen beantwortet!Vielen vielne vielen vielen DANK
Ps: kann man mein signatur bild sehen ? XD
DANKE
-
- Offizieller Beitrag
Hi,
oh man, das hätte man auch schneller haben können
P.S.: Nein dein Bild ist nicht zu sehen.
So long,
Mega
-