Ich habe ja auch nur Englidch in der Schule aber das reicht trotzdem um zu programmieren oder im Englischen Forum zu posten^^.
Und ich find es trotz allerdem toll das es hier im Forum immer wieder Leute gibt die schnell und ausführlich antworten ![]()
Ich habe ja auch nur Englidch in der Schule aber das reicht trotzdem um zu programmieren oder im Englischen Forum zu posten^^.
Und ich find es trotz allerdem toll das es hier im Forum immer wieder Leute gibt die schnell und ausführlich antworten ![]()
Ähm also soweit ich es verstanden habe so oder?
[autoit]While 1
$msg = GUIGetMsg(1)
Switch $msg[1]
Case $IEGUI
Switch $msg[0]
Case $GUI_EVENT_CLOSE
_TrayIconDelete($nTrayIcon1)
ExitLoop
Case $TrayTop
AdlibEnable("_Topmost")
Case $TrayNormal_1
AdlibDisable()
WinSetOnTop($IEGUI,"",0)
Case $TrayHide
GUISetState(@SW_HIDE,$IEGUI)
Case $TrayNormal_2
GUISetState(@SW_SHOW,$IEGUI)
Case $TrayExit
_TrayIconDelete($nTrayIcon1)
ExitLoop
Case $TrayPlay
_wmpvalue( $oWMP, "Play" )
Case $TrayPause
_wmpvalue( $oWMP, "Stop" )
EndSwitch
Case $Dialog_1
Switch $msg[0]
Case $gui_event_close
GUISetState(@SW_HIDE, $Dialog_1)
EndSwitch
Case $Traymenu
Switch $msg[0]
Case $trayexit
exit
EndSwitch
EndSwitch
WEnd
Und wens doch falsch ist nicht sauer sein pls ![]()
KANN MAL PLS JEMAND HELFEN??? :pinch:
es funkt aber trotzdem nicht :wacko:
sry jetzt weiß ich nicht genau was du meinst
![]()
und wie soll ich das jetzt einfügen?
aber so funkt es auch nicht ![]()
While 1
$msg = GUIGetMsg(1)
Switch $msg[1]
Case $IEGUI
Switch $msg[0]
Case $GUI_EVENT_CLOSE
_TrayIconDelete($nTrayIcon1)
ExitLoop
Case $TrayTop
AdlibEnable("_Topmost")
Case $TrayNormal_1
AdlibDisable()
WinSetOnTop($IEGUI,"",0)
Case $TrayHide
GUISetState(@SW_HIDE,$IEGUI)
Case $TrayNormal_2
GUISetState(@SW_SHOW,$IEGUI)
Case $TrayExit
_TrayIconDelete($nTrayIcon1)
ExitLoop
Case $TrayPlay
_wmpvalue( $oWMP, "Play" )
Case $TrayPause
_wmpvalue( $oWMP, "Stop" )
EndSwitch
Case $Dialog_1
Switch $msg[0]
Case $gui_event_close
GUISetState(@SW_HIDE, $Dialog_1)
EndSwitch
EndSwitch
WEnd
Hallo,
ich habe mir mal mit hilfe der ModernMenü.au3 etwas zusammengebastelt. Es besteht aus 2 GUI´s und einen Traycontrol.
Das problem ist, dass Traymenü nichts maccht wen man z.b auf beeden klickt. Es hat irgendwas mit While 1 und WEnd zu tun.
Und es kommen auch keine Fehlermeldungen.
Nun weiß ich aber nicht wie ich dieses Problem lösen kann.
Kann mir einer helfen?
While 1
$msg = GUIGetMsg(1)
Switch $msg[1]
Case $IEGUI, $nTrayMenu1
Switch $msg[0]
Case $GUI_EVENT_CLOSE
_TrayIconDelete($nTrayIcon1)
ExitLoop
Case $TrayTop
AdlibEnable("_Topmost")
Case $TrayNormal_1
AdlibDisable()
WinSetOnTop($IEGUI,"",0)
Case $TrayHide
GUISetState(@SW_HIDE,$IEGUI)
Case $TrayNormal_2
GUISetState(@SW_SHOW,$IEGUI)
Case $TrayExit
_TrayIconDelete($nTrayIcon1)
ExitLoop
Case $TrayPlay
_wmpvalue( $oWMP, "Play" )
Case $TrayPause
_wmpvalue( $oWMP, "Stop" )
EndSwitch
Case $Dialog_1
Switch $msg[0]
Case $gui_event_close
GUISetState(@SW_HIDE, $Dialog_1)
EndSwitch
EndSwitch
WEnd
hmm ich weiß nicht da blick ich nicht mehr durch bei den rebar ctrls :wacko:
meinst du es so? :
[autoit]#include <Constants.au3>
[/autoit][autoit][/autoit][autoit]Local $foo = Run(@ComSpec & " /c ping 127.0.0.1", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
Local $line
While 1
$line = StdoutRead($foo)
If @error Then ExitLoop
MsgBox(0, "STDOUT read:", $line,1)
Wend
Hallo,
ich hatte mir mal die Reabr funktionen angeschaut aber irgendwie schaff ich es nicht, das z.b beim klicken auf dem speicherbutton z.b eine msgbox geöffnent wird.
wie mach ich das?
#include <GuiReBar.au3>
#include <GuiToolBar.au3>
#include <GuiComboBox.au3>
#include <GuiDateTimePicker.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>
#include <GuiConstantsEx.au3>
Opt("MustDeclareVars", 1)
[/autoit] [autoit][/autoit] [autoit]$Debug_RB = False
[/autoit] [autoit][/autoit] [autoit]Global $hReBar
[/autoit] [autoit][/autoit] [autoit]_Main()
[/autoit] [autoit][/autoit] [autoit]Func _Main()
Local $hgui, $btnExit, $hToolbar, $hCombo, $hDTP, $hInput
Local Enum $idNew = 1000, $idOpen, $idSave, $idHelp
$hgui = GUICreate("Rebar", 400, 396, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_MAXIMIZEBOX))
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]; create the rebar control
$hReBar = _GUICtrlReBar_Create($hgui, BitOR($CCS_TOP, $WS_BORDER, $RBS_VARHEIGHT, $RBS_AUTOSIZE, $RBS_BANDBORDERS))
; create a toolbar to put in the rebar
$hToolbar = _GUICtrlToolBar_Create($hgui, BitOR($TBSTYLE_FLAT, $CCS_NORESIZE, $CCS_NOPARENTALIGN))
; Add standard system bitmaps
Switch _GUICtrlToolbar_GetBitmapFlags($hToolbar)
Case 0
_GUICtrlToolbar_AddBitmap($hToolbar, 1, -1, $IDB_STD_SMALL_COLOR)
Case 2
_GUICtrlToolbar_AddBitmap($hToolbar, 1, -1, $IDB_STD_LARGE_COLOR)
EndSwitch
; Add buttons
_GUICtrlToolbar_AddButton($hToolbar, $idNew, $STD_FILENEW)
_GUICtrlToolbar_AddButton($hToolbar, $idOpen, $STD_FILEOPEN)
_GUICtrlToolbar_AddButton($hToolbar, $idSave, $STD_FILESAVE)
_GUICtrlToolbar_AddButtonSep($hToolbar)
_GUICtrlToolbar_AddButton($hToolbar, $idHelp, $STD_HELP)
; create a combobox to put in the rebar
$hCombo = _GUICtrlComboBox_Create($hgui, "", 0, 0, 120)
_GUICtrlComboBox_BeginUpdate($hCombo)
_GUICtrlComboBox_AddDir($hCombo, @WindowsDir & "\*.exe")
_GUICtrlComboBox_EndUpdate($hCombo)
; create a date time picker to put in the rebar
$hDTP = _GUICtrlDTP_Create($hgui, 0, 0, 190)
; create a input box to put in the rebar
$hInput = GUICtrlCreateInput("Input control", 0, 0, 120, 20)
; default for add is append
; add band with control
_GUICtrlReBar_AddBand($hReBar, $hCombo, 120, 200, "Dir *.exe")
; add band with date time picker
_GUICtrlReBar_AddBand($hReBar, $hDTP, 120)
; add band with toolbar to begining of rebar
_GUICtrlReBar_AddToolBarBand($hReBar, $hToolbar, "", 0)
;add another control
_GUICtrlReBar_AddBand($hReBar, GUICtrlGetHandle($hInput), 120, 200, "Name:")
$btnExit = GUICtrlCreateButton("Exit", 150, 360, 100, 25)
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE, $btnExit
Exit
EndSwitch
WEnd
EndFunc ;==>_Main
bernd670: Spoiler-Tags gesetzt!
hey danke für die Hilfe ![]()
es kommt keine fehlermeldung. hier:
[autoit]#NoTrayIcon
#include <IE.au3>
#include <GUIConstants.au3>
#include <WINDOWSCONSTANTS.au3>
Opt("TrayMenuMode",1)
[/autoit][autoit][/autoit][autoit]Global $lastURL = ""
$IEGUI = GUICreate("InternetRadio",160,165,-1,-1,-1,$WS_EX_TOOLWINDOW)
$oWMP = _wmpcreate(1,0,0,200,200)
_wmpvalue($oWMP,"controls")
$oIE = _IECreateEmbedded()
$GuiIE = GUICtrlCreateObj($oIE,0,0,100,100)
GUISetState()
GUICtrlCreateObj($oIE,0,0)
_wmploadmedia($oWMP,"http://www.wdr.de/wdrlive/media/einslive-wm32.asx",1)
_wmpvalue($oWMP,"play")
$topmostitem = TrayCreateItem("Immer im Vordergrund")
TrayCreateItem("")
$normalitem = TrayCreateItem("Normal")
TrayCreateItem("")
$hideitem = TrayCreateItem("Verstecken")
TrayCreateItem("")
$showitem = TrayCreateItem("Wiederherstellen")
TrayCreateItem("")
$exititem = TrayCreateItem("Beenden")
TraySetState()
While 1
$msg_1 = TrayGetMsg()
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg_1 = $topmostitem
AdlibEnable("_Topmost")
Case $msg_1 = $normalitem
AdlibDisable()
Case $msg_1 = $exititem
ExitLoop
Case $msg_1 = $hideitem
GUISetState(@SW_HIDE,$IEGUI)
Case $msg_1 = $showitem
GUISetState(@SW_SHOW,$IEGUI)
EndSelect
WEnd
Func _Topmost()
[/autoit][autoit][/autoit][autoit]WinSetOnTop("InternetRadio","",1)
Sleep(10)
EndFunc
[/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit]Func _wmpcreate($show, $left, $top, $width = 100, $height = 100)
$oWMP = ObjCreate("WMPlayer.OCX")
If $oWMP = 0 Then Return 0
$oWMP.settings.autoStart = "False"
If $show = 1 Then
GUICtrlCreateObj($oWMP, $left, $top, $width, $height)
EndIf
Return $oWMP
EndFunc
Func _wmploadmedia(ByRef $object, $URL, $autostart = 1 )
$object.URL = $URL
While Not $object.controls.isAvailable("play")
Sleep(1)
WEnd
If $autostart = 1 Then $object.controls.play()
EndFunc
Func _wmpvalue( $object, $setting, $para=1 )
Select
Case $setting = "play"
If $object.controls.isAvailable("play") Then $object.controls.play()
Case $setting = "stop"
If $object.controls.isAvailable("stop") Then $object.controls.stop()
Case $setting = "pause"
If $object.controls.isAvailable("pause") Then $object.controls.pause()
Case $setting = "invisible"
$object.uiMode = "invisible"
Case $setting = "controls"
$object.uiMode = "mini"
Case $setting = "nocontrols"
$object.uiMode = "none"
Case $setting = "fullscreen"
$object.fullscreen = "true"
Case $setting = "step"
If $object.controls.isAvailable("step") Then $object.controls.step($para)
Case $setting = "fastForward"
If $object.controls.isAvailable("fastForward") Then $object.controls.fastForward()
Case $setting = "fastReverse"
If $object.controls.isAvailable("fastReverse") Then $object.controls.fastReverse()
Case $setting = "volume"
$object.settings.volume = $para
Case $setting = "rate"
$object.settings.rate = $para
Case $setting = "playcount"
$object.settings.playCount = $para
Case $setting = "setposition"
$object.controls.currentPosition = $para
Case $setting = "getposition"
Return $object.controls.currentPosition
Case $setting = "getpositionstring";Returns HH:MM:SS
Return $object.controls.currentPositionString
Case $setting = "getduration"
Return $object.currentMedia.duration
EndSelect
EndFunc
ok hier:
[autoit]$topmostitem = TrayCreateItem("Immer im Vordergrund")
TrayCreateItem("")
$normalitem = TrayCreateItem("Normal")
TrayCreateItem("")
$hideitem = TrayCreateItem("Verstecken")
TrayCreateItem("")
$showitem = TrayCreateItem("Wiederherstellen")
TrayCreateItem("")
$exititem = TrayCreateItem("Beenden")
TraySetState()
While 1
$msg_1 = TrayGetMsg()
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg_1 = $topmostitem
AdlibEnable("_Topmost")
Case $msg_1 = $normalitem
AdlibDisable()
Case $msg_1 = $exititem
ExitLoop
Case $msg_1 = $hideitem
GUISetState(@SW_HIDE,$IEGUI)
Case $msg_1 = $showitem
GUISetState(@SW_SHOW,$IEGUI)
EndSelect
WEnd
Func _Topmost()
[/autoit][autoit][/autoit][autoit]WinSetOnTop("InternetRadio","",1)
Sleep(10)
EndFunc
[/autoit]doch doch gibt es dads ist nur ein ausschnitt. aber woanders kann das problem ja nicht liegen das es nicht funkt ![]()
was ist daran falsch? ![]()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $topmost_1
AdlibEnable("_Topmost")
Case $msg = $topmost_2
AdlibDisable()
EndSelect
WEnd
Error Nummber: 10061
Connection refused.
No connection could be made because the target machine actively
refused it. This usually results from trying to connect to a
service that is inactive on the foreign host - i.e. one with
no server application running.
übersetzt mit google =
Verbindung abgelehnt.
Keine Verbindung gemacht werden könnte, weil der Zielrechner aktiv
verweigert. Dies ergibt sich aus der Regel versucht, eine Verbindung zu einem
Service inaktiv ist, dass in der Außen-Host - dh ein mit
keine Server-Anwendung ausgeführt wird.
Hier mal als Vorlage ![]()
#include <GUIConstantsEx.au3>
GUICreate("My GUI Button")
$Button_1 = GUICtrlCreateButton("Run Notepad", 10, 30, 100)
$Button_2 = GUICtrlCreateButton("Button Test", 0, -1)
GUISetState()
[/autoit][autoit][/autoit][autoit]
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button_1
Run('Notepad.exe')
Case $msg = $Button_2
MsgBox(0, 'Testing', 'Button 2 was pressed')
EndSelect
WEnd
EndFunc
hab ich ja aber mein Client reagiert danach nicht mehr und es kommt eine Fehlermeldung
es connectet trotzdem nicht auch mit der portfreigabe :wacko: