Hallo Leute,
gibt es eine Möglichkeit Windows Icons abzufangen?
Also hier z.B. das rote Kreuzchen.
Hallo Leute,
gibt es eine Möglichkeit Windows Icons abzufangen?
Also hier z.B. das rote Kreuzchen.
Alles Gute nachträglich
Alles Gute auch von mir
Schön das du dir zu helfen weist, geht aber viel einfacher
[autoit]$cBG = GUICtrlCreatePic($path, 0, 0, 253, 149)
GUICtrlSetState(-1, $GUI_DISABLE)
Durch das $GUI_DISABLE sollten die Events ganz normal empfangen werden
Vielen Dank!
Meiner Leber geht`s gut danke
Alles Gute auch von mir!
Musst du denn unbedingt GENAU wissen , wann das Fenster erscheint, oder reicht da nicht die Info , dass es gerade geladen wird?
SplashTextOn("Loading...","GUI is loading...",150,50)
Opt("GUIOnEventMode",1)
[/autoit] [autoit][/autoit] [autoit]$hwnd = GUICreate ("GUI", 250, 250)
GUISetOnEvent(-3,"_Exit")
Sleep(5000) ; Simuliert deine Wartezeit
GUISetState()
SplashOff()
While Sleep(20)
WEnd
Func _Exit()
Exit
EndFunc
Alles Gute name!
ZitatEin grund mehr Windows7 NICHT zu nehmen wenn nichtmal dieses Praktische Menü aufkommt.
Win7 ist einfach das bessere OS, XP hat ausgedient
Einfach mal 1 und 1 zusammenzählen:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Sound.au3>
$aSound = _SoundOpen("C:\Test.mp3")
[/autoit] [autoit][/autoit] [autoit]$Form1 = GUICreate("Form1", 194, 58, 192, 124)
$Button1 = GUICtrlCreateButton("Ton an", 16, 16, 75, 25, 0)
$Button2 = GUICtrlCreateButton("Ton aus", 104, 16, 75, 25, 0)
GUISetState()
_SoundPlay($aSound, 0)
[/autoit] [autoit][/autoit] [autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_SoundResume($aSound)
Case $Button2
_SoundPause($aSound)
EndSwitch
WEnd
Hab da mal ne Funktion von Seubo rausgekramt, ich find die recht praktisch.
#include <GDIPlus.au3>
#include <WindowsConstants.au3>
#include <GuiConstantsEx.au3>
InetGet("http://upload.wikimedia.org/wikipedia/commons/7/7a/Basketball.png",@ScriptDir & "\Ball.png")
[/autoit] [autoit][/autoit] [autoit]Opt('GUIOnEventMode', 1)
[/autoit] [autoit][/autoit] [autoit]$hGUI = GUICreate("",350,350); Gui elemte ausblenden
GUISetOnEvent(-3,"_Exit")
GUISetBkColor(0xFF7F24)
$guibk = GUICtrLCreatePng($hGUI,@ScriptDir & "\Ball.png",20,20)
GUICtrlSetOnEvent(-1,"_Basketfunc")
GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]While Sleep(50)
WEnd
Func GUICtrlCreatePng($hWnd, $sPath, $iX, $iY) ; SEuBo
_GDIPlus_Startup()
Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend, $hGUI
Local $hImage = _GDIPlus_ImageLoadFromFile($sPath), $iWidth = _GDIPlus_ImageGetWidth($hImage), $iHeight = _GDIPlus_ImageGetHeight($hImage)
$hGUI = GUICreate("", $iWidth, $iHeight, $iX, $iY, 0x80000000, BitOR(0x40, 0x80000), $hWnd)
$cLabel = GUICtrlCreateLabel("", 0, 0, $iWidth, $iHeight)
GUICtrlSetBkColor(-1, -2)
GUISetState(@SW_SHOWNOACTIVATE, $hGUI)
$hScrDC = _WinAPI_GetDC(0)
$hMemDC = _WinAPI_CreateCompatibleDC($hScrDC)
$hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
$hOld = _WinAPI_SelectObject($hMemDC, $hBitmap)
$tSize = DllStructCreate("int X;int Y")
$pSize = DllStructGetPtr($tSize)
DllStructSetData($tSize, "X", $iWidth)
DllStructSetData($tSize, "Y", $iHeight)
$tSource = DllStructCreate("int X;int Y")
$pSource = DllStructGetPtr($tSource)
$tBlend = DllStructCreate("byte Op;byte Flags;byte Alpha;byte Format")
$pBlend = DllStructGetPtr($tBlend)
DllStructSetData($tBlend, "Alpha", 255)
DllStructSetData($tBlend, "Format", 1)
_WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)
_WinAPI_ReleaseDC(0, $hScrDC)
_WinAPI_SelectObject($hMemDC, $hOld)
_WinAPI_DeleteObject($hBitmap)
_WinAPI_DeleteDC($hMemDC)
GUISwitch($hWnd)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_Shutdown()
Return SetError(0,$hGUI,$cLabel)
EndFunc ;==>GUICtrlCreatePng
Func _Basketfunc()
MsgBox(0,"","Du hast den Ball angeklickt!")
EndFunc
Func _Exit()
Exit
EndFunc
Kleines Update auf v.0.8
- Mehrere kleine Stabilitätsprobleme & Schönheitsfehler beseitigt
- Radiostreamerkennung verbessert
Happy Birthday
chip: Die Tasse ist ja mal geil
Danke, somit gelöst.
Alles GUTE !
Danke!
Aber ich nehme an das sind alles inputboxen, mir gings besonders um guicreate bzw. das handling von controls...
Also nur interessehalber , kann mir das jemand 1:1 in Python umschreiben?
Würde gern man den Syntax vergleichen, was das für eine Umstellung wäre....
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Test", 259, 108, 852, 50)
$Button1 = GUICtrlCreateButton("Read", 32, 48, 193, 41)
$Input1 = GUICtrlCreateInput("", 24, 16, 209, 21)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_func1()
EndSwitch
WEnd
Func _func1()
MsgBox(0,"test",GUICtrlRead($Input1))
EndFunc
Hab es jetzt mal so probiert, passt das so?
If _isRadioStream("http://www.youtube.com/watch?v=y1iOG6vELGE") Then
MsgBox(0,"","Radiostream!")
Else
MsgBox(0,"","Kein Radiostream!")
EndIf
Func _isRadioStream($sURL)
Local $ret
$WMP = ObjCreate("WMPlayer.OCX")
$WMP.URL = $sURL
$WMP.controls.play()
While $WMP.playstate = 9
Sleep(20)
WEnd
If $WMP.playstate <> 10 Then
$ret = True
Else
$ret = False
EndIf
$WMP.controls.stop()
$WMP = 0
Return $ret
EndFunc
Hallo Com.,
ich wollte mal nachfragen wie man am besten einen Radiostream anhand einer URL erkennt.
Bei einem Stream wie diesem hier:
kann ich ja das asx am ende als Indikator nehmen, aber wie schaut`s bei dem hier aus?
Jemand ne Idee? Weil ich denke das "webradio" am anfang der URL ist ja kein Standart oder?