Ich habe ein problem mit dem script denn wenn ich es starte kommt eine gui mit einem hintergrundbild
und oben links ein rotes viereck mit den pfeiltasten kann man das viereck bewegen .dafür wird immer eine neue gui erstellt und ich würde gern die alte gui dann "verstecken" das krieg ich aber irgendwie nicht hin :(
hier der code:
PS:Gibt ein fettes THX wenn ihr mir helfen könnt :D
und oben links ein rotes viereck mit den pfeiltasten kann man das viereck bewegen .dafür wird immer eine neue gui erstellt und ich würde gern die alte gui dann "verstecken" das krieg ich aber irgendwie nicht hin :(
hier der code:
PHP Code:
HotKeySet( "{F4}" , "_Exit")
HotKeySet( "{left}" , "Links")
HotKeySet( "{right}" , "Rechts")
HotKeySet( "{Down}" , "Unten")
HotKeySet( "{UP}" , "Oben")
$1 = 0
$2 = 0
$3 = 62
$4 = 79
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Gui = GUICreate("Versuch", 633, 447, 192, 124 )
$Pic = GUICtrlCreatePic(@ScriptDir & "\music.jpg",0 ,0, 1024, 768)
guictrlsetstate(-1,$Gui_disable)
$Pic1 = GUICtrlCreatePic(@ScriptDir & "\Rot.jpg",$1 ,$2, $3, $4)
guictrlsetstate(-1,$Gui_disable)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUISetState(@SW_HIDE)
EndSwitch
WEnd
Func Rechts()
$1 = $1 + 25
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Gui = GUICreate("Versuch", 633, 447, 192, 124 )
$Pic = GUICtrlCreatePic(@ScriptDir & "\music.jpg",0 ,0, 1024, 768)
guictrlsetstate(-1,$Gui_disable)
$Pic1 = GUICtrlCreatePic(@ScriptDir & "\Rot.jpg",$1 ,$2, $3, $4)
guictrlsetstate(-1,$Gui_disable)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUISetState(@SW_HIDE)
EndSwitch
WEnd
WinSetState ("Versuch","",@SW_HIDE)
Endfunc
Func Links()
$1 = $1 - 25
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Gui = GUICreate("Versuch", 633, 447, 192, 124 )
$Pic = GUICtrlCreatePic(@ScriptDir & "\music.jpg",0 ,0, 1024, 768)
guictrlsetstate(-1,$Gui_disable)
$Pic1 = GUICtrlCreatePic(@ScriptDir & "\Rot.jpg", $1 ,$2, $3, 79)
guictrlsetstate(-1,$Gui_disable)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUISetState(@SW_HIDE)
EndSwitch
WEnd
WinSetState ("Versuch","",@SW_HIDE)
Endfunc
Func Unten()
$2 = $2 + 25
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Gui = GUICreate("Versuch", 633, 447, 192, 124 )
$Pic = GUICtrlCreatePic(@ScriptDir & "\music.jpg",0 ,0, 1024, 768)
guictrlsetstate(-1,$Gui_disable)
$Pic1 = GUICtrlCreatePic(@ScriptDir & "\Rot.jpg", $1 ,$2, 62, 79)
guictrlsetstate(-1,$Gui_disable)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUISetState(@SW_HIDE)
EndSwitch
WEnd
WinSetState ("Versuch","",@SW_HIDE)
Endfunc
Func Oben()
$2 = $2 - 25
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Gui = GUICreate("Versuch", 633, 447, 192, 124)
$Pic = GUICtrlCreatePic(@ScriptDir & "\music.jpg",0 ,0, 1024, 768)
guictrlsetstate(-1,$Gui_disable)
$Pic1 = GUICtrlCreatePic(@ScriptDir & "\Rot.jpg", $1 ,$2, 62, 79)
guictrlsetstate(-1,$Gui_disable)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUISetState(@SW_HIDE)
EndSwitch
WEnd
WinSetState ("Versuch","",@SW_HIDE)
Endfunc
Func _Exit()
Exit
Endfunc
PS:Gibt ein fettes THX wenn ihr mir helfen könnt :D