Hey, bin noch ziehmlich neu bei AutoIt und wollte fragen wie ich ein Bild als Hintergrund nehme das nicht aufm PC sondern auf einer homepage ist :D ([Only registered and activated users can see links. Click Here To Register...])
LG
LG
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <INet.au3>
$Bild = _INetGetSource("URL mit http:// hier eingeben!")
FileDelete("Bild.tmp")
FileWrite("Bild.tmp",$Bild)
$Form1 = GUICreate("Form1", 442, 370, 192, 124)
$Pic1 = GUICtrlCreatePic("Bild.tmp", 0, 0, 441, 369, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button1 = GUICtrlCreateButton("Test", 152, 168, 97, 25, $WS_GROUP)
$Input1 = GUICtrlCreateInput("Input1", 152, 144, 97, 21)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
If $nMsg = $GUI_EVENT_CLOSE Then
Exit
EndIf
WEnd
Genau so hab ichs gemacht funzt auch aber jetzt gehen die Buttons nich mehr -.-Quote:
Du musst dein Problem genauer beschreiben.
Wenn du ein Bild als Hintergrund in einem GUI haben willst, dann ist hier ein Beispiel :
Bemerkungen :PHP Code:#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <INet.au3>
$Bild = _INetGetSource("URL mit http:// hier eingeben!")
FileDelete("Bild.tmp")
FileWrite("Bild.tmp",$Bild)
$Form1 = GUICreate("Form1", 442, 370, 192, 124)
$Pic1 = GUICtrlCreatePic("Bild.tmp", 0, 0, 441, 369, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button1 = GUICtrlCreateButton("Test", 152, 168, 97, 25, $WS_GROUP)
$Input1 = GUICtrlCreateInput("Input1", 152, 144, 97, 21)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
If $nMsg = $GUI_EVENT_CLOSE Then
Exit
EndIf
WEnd
Da manche aus irgendeinem Grund Probleme mit InetGet haben, benutze ich _InetGetSource aus INet.au3 .
Wenn du dir das mit dem BitOR nicht merken kannst, dann lass das ", BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)" weg und lass den Hintergrund als erstes erstellen.
GUICtrlCreatePic("Bild.tmp", 0, 0, 441, 369, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) erstellt ein Bild , oben links in der Ecke bis über das gesamte GUI geht.
GUIGetMsg() überprüft, ob sich irgendetwas im GUI geändert hat, zum Beispiel, wenn ein Button gedrückt wird.
"If $nMsg = $GUI_EVENT_CLOSE Then Exit" bedeutet, dass wenn man auf das Kreuz des GUIs drückt, das GUI sich beendet.
Edit : Mist, BlackHybrid war schneller
GuiCreate("Elite-Network Starter by TheReasoN",350,130,110,181)
$button1=GuiCtrlCreateButton("Client starten",15,19,90,40)
$button2=GuiCtrlCreateButton("Optionen",245,19,90,40)
$button3=GuiCtrlCreateButton("Metin2.de",15,75,90,40)
$button4=GuiCtrlCreateButton("Schließen",245,75,90,40)
$button5=GuiCtrlCreateButton("xD",1000,1000,1,1)
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <INet.au3>
$Bild = _INetGetSource("http://img6.imagebanana.com/img/79zuy66l/asd.jpg")
FileDelete("Back1.jpg")
FileWrite("Back1.jpg",$Bild)
$Pic1 = GUICtrlCreatePic("Back1.jpg", 0, 0, 314, 119, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)
GUICtrlCreatePic(@tempdir & "\Back1.jpg", 0, 0, 314, 119)
While 1
$nMsg = GUIGetMsg()
If $nMsg = $GUI_EVENT_CLOSE Then
Exit
EndIf
WEnd
GuiSetState()
While 1
$msg=GuiGetMsg()
If $msg=-3 Then button5()
If $msg=$button1 Then button1()
If $msg=$button2 Then button2()
If $msg=$button3 Then button3()
If $msg=$button4 Then button4()
If $msg=$button5 Then button5()
Wend
Func button1()
Run ("Elite-Network.exe")
EndFunc
Func button2()
run ("config.exe")
EndFunc
Func button3()
ShellExecute ("http://www.metin2.de/", 1)
EndFunc
Func button4()
exit
EndFunc
Func button5()
EndFunc