1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. GtaSpider

Beiträge von GtaSpider

  • Geschlossen: AutoIt-Kalender

    • GtaSpider
    • 10. Juni 2006 um 13:14

    Hallo!

    Ja das klappt perfekt! Das könnte man natürlcih auch machen
    z.b. so:
    Brauch BETA 3.1.1.126 oder höher

    Code
    #include <GUIConstants.au3>
    ### Koda GUI section start ###
    $Form1 = GUICreate("AForm1", 269, 176, 193, 126)
    $ListView1 = GUICtrlCreateListView("test01|test02", 8, 8, 250, 150)
    $ListView1_0 = GUICtrlCreateListViewItem("Test|ttteeesssttt", $ListView1)
    GUICtrlSetBkColor(-1,0xff0000)
    $ListView1_1 = GUICtrlCreateListViewItem("etst|testtest", $ListView1)
    GUICtrlSetBkColor(-1,0x00bb00)
    GUISetState(@SW_SHOW)
    ### Koda GUI section end   ###
    While 1
    	$nMsg = GUIGetMsg()
    	Switch $nMsg
    		Case $GUI_EVENT_CLOSE
    			Exit
    	EndSwitch
    WEnd
    Alles anzeigen


    Mfg Spider

  • Geschlossen: AutoIt-Kalender

    • GtaSpider
    • 10. Juni 2006 um 13:05

    Hallo

    Also mit ComboBoxEx hab ich paar ocx dateien gefunden, funktioniert aber nicht mit autoit..

    Wenn ich das vom Engl Forum ausprobiere versucht Microsoft office 03 etwas zu installieren..

    aber danke für dein Rat ;) werde nochmal das inet etwas durchforsten,,

    Mfg Spider

  • Geschlossen: AutoIt-Kalender

    • GtaSpider
    • 10. Juni 2006 um 10:16

    Hallo!

    hab nochmal ne frage: mach ich das mit der Kategorie (neu erstellen) oder du?
    Wenn ich es mache hätt ich nochmal ne frage: wer Outlook kennt, kennt das: eine ComboBox mit Färbenden kästchen links und rechts den Text(im anhang ein Bild) meine überlegung: (musst du nich lesen wenn du nich viel zeit hast..)

    Spoiler anzeigen

    ein ListView zu machen die erstmal nur einzeilig ist und da neben ein Button der ein "v" als text hat(das nach unten zeichen der Combo) und dann die Liste rausfahren würde und die List häte den Style $LVS_SMALLICONS und da bilder reinpacken mit verschiedenen farben... ist nich gut weil man daunter ordentlich platz brauch, und weil man wirklich bilder brauch und nich ein Label das kein text hat und als hintergrund irgendeine farbe oder eine Graphic mit hintergrund..

    Also lange rede Kurzer sinn wie kann ich das mit einer ComboBox machen? also mit einer echten, so wie in outlook? weiß jmd rat?

    Mfg Spider

  • Hintergrundbild

    • GtaSpider
    • 9. Juni 2006 um 22:52

    Hallo

    Die Hilfe lesen -.- :comp1:

    Mfg Spider

  • Hintergrundbild

    • GtaSpider
    • 9. Juni 2006 um 22:46

    Hallo!

    Es geht wohl mit der Beta. Undzwar mit GUIRegisterMsg, wenn man da in den code guckt, sieht man da Colorierte Buttons, hier das Example;

    Spoiler anzeigen
    C
    ; *******************************************************
    ; Example - Create an ownerdrawn/colored button
    ; *******************************************************
    
    
    #include <GUIConstants.au3>
    
    
    Global Const $WM_DRAWITEM			= 0x002B
    Global Const $WM_COMMAND			= 0x0111
    
    
    Global Const $GWL_STYLE 			= -16
    
    
    Global Const $BS_OWNERDRAW			= 0x0000000B
    Global Const $BS_NOTIFY				= 0x00004000
    
    
    Global Const $COLOR_BTNTEXT			= 18
    Global Const $COLOR_BTNFACE			= 15
    Global Const $COLOR_BTNSHADOW		= 16
    Global Const $COLOR_HIGHLIGHTTEXT	= 14
    Global Const $COLOR_GRAYTEXT		= 17
    
    
    Global Const $DT_CENTER				= 0x00000001
    Global Const $DT_RIGHT				= 0x00000002
    Global Const $DT_VCENTER			= 0x00000004
    Global Const $DT_BOTTOM				= 0x00000008
    Global Const $DT_WORDBREAK			= 0x00000010
    Global Const $DT_SINGLELINE			= 0x00000020
    Global Const $DT_EXPANDTABS			= 0x00000040
    Global Const $DT_TABSTOP			= 0x00000080
    Global Const $DT_NOCLIP				= 0x00000100
    Global Const $DT_EXTERNALLEADING	= 0x00000200
    Global Const $DT_CALCRECT			= 0x00000400
    Global Const $DT_NOPREFIX			= 0x00000800
    Global Const $DT_INTERNAL			= 0x00001000
    
    
    Global Const $ODS_SELECTED			= 0x0001
    Global Const $ODS_GRAYED			= 0x0002
    Global Const $ODS_DISABLED			= 0x0004
    Global Const $ODS_CHECKED			= 0x0008
    Global Const $ODS_FOCUS				= 0x0010
    Global Const $ODS_HOTLIGHT			= 0x0040
    Global Const $ODS_INACTIVE			= 0x0080
    Global Const $ODS_NOACCEL			= 0x0100
    Global Const $ODS_NOFOCUSRECT		= 0x0200
    
    
    Global Const $ODT_BUTTON			= 4
    
    
    Global Const $DFC_BUTTON			= 4
    Global Const $DFCS_BUTTONPUSH		= 0x0010
    
    
    
    
    $hGUI		= GUICreate("My Ownerdrawn Created Button", 300, 200)
    
    
    $nButton	= GUICtrlCreateButton("", 90, 50, 120, 30)
    GUICtrlSetStyle($nButton, BitOr($WS_TABSTOP, $BS_NOTIFY, $BS_OWNERDRAW)) ; Set the ownerdrawn flag
    
    
    $nButton2	= GUICtrlCreateButton("Normal Button", 90, 110, 120, 30)
    
    
    GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND")
    ; WM_DRAWITEM has to registered before showing GUI otherwise the initial drawing isn't done
    GUIRegisterMsg($WM_DRAWITEM, "MY_WM_DRAWITEM")
    
    
    GUISetState()
    
    
    While 1
    	$GUIMsg = GUIGetMsg()
    
    	Switch $GUIMsg
    		Case $GUI_EVENT_CLOSE
    			ExitLoop
    
    		Case $nButton
    			; Normally should not run through cause of our MY_WM_COMMAND function
    			Msgbox(0, "Info", "Button pressed") 
    
    		Case $nButton2
    			; Normally should not run through cause of our MY_WM_COMMAND function
    			Msgbox(0, "Info", "Button2 pressed")
    	EndSwitch
    WEnd
    
    
    Exit
    
    
    
    
    ; React on a button click
    Func MY_WM_COMMAND($hWnd, $Msg, $wParam, $lParam)
    	$nNotifyCode	= BitShift($wParam, 16)
    	$nID			= BitAnd($wParam, 0x0000FFFF)
    	$hCtrl			= $lParam
    
    	If $nID <> 2 And $nNotifyCode = 0 Then ; Check for IDCANCEL - 2
    		; Ownerdrawn buttons don't send something by pressing ENTER
    		; So IDOK - 1 comes up, now check for the control that has the current focus
    		If $nID = 1 Then
    			$hFocus = DllCall("user32.dll", "hwnd", "GetFocus")
    			$nCtrlID = DllCall("user32.dll", "int", "GetDlgCtrlID", "hwnd", $hFocus[0])
    			PostButtonClick($hFocus[0], $nCtrlID[0])
    		Else
    			Msgbox(0, "MY_WM_COMMAND", "GUIHWnd" & @TAB & ":" & $hwnd & @LF & _
    										"MsgID" & @TAB & ":" & $Msg & @LF & _
    										"wParam" & @TAB & ":" & $wParam & @LF & _
    										"lParam" & @TAB & ":" & $lParam & @LF & @LF & _
    										"WM_COMMAND - Infos:" & @LF & _
    										"-----------------------------" & @LF & _
    										"Code" & @TAB & ":" & $nNotifyCode & @LF & _
    										"CtrlID" & @TAB & ":" & $nID & @LF & _
    										"CtrlHWnd" & @TAB & ":" & $hCtrl)
    		EndIf
    		Return 0 ; Only workout clicking on the button
    	EndIf
    	; Proceed the default Autoit3 internal message commands.
    	; You also can complete let the line out.
    	; !!! But only 'Return' (without any value) will not proceed
    	; the default Autoit3-message in the future !!!
    	Return $GUI_RUNDEFMSG
    EndFunc
    
    
    
    
    ; RePost a WM_COMMAND message to a ctrl in a gui window
    Func PostButtonClick($hWnd, $nCtrlID)
    	DllCall("user32.dll", "int", "PostMessage", _
    									"hwnd", $hGUI, _
    									"int", $WM_COMMAND, _
    									"int", BitAnd($nCtrlID, 0x0000FFFF), _
    									"hwnd", GUICtrlGetHandle($nCtrlid))
    EndFunc
    
    
    
    
    ; Draw the button
    Func MY_WM_DRAWITEM($hWnd, $Msg, $wParam, $lParam)
    	Local $stDrawItem = DllStructCreate("uint;uint;uint;uint;uint;uint;uint;int[4];dword", $lParam)
    
    	$nCtlType = DllStructGetData($stDrawItem, 1)
    	If $nCtlType = $ODT_BUTTON Then
    		$nCtrlID	= DllStructGetData($stDrawItem, 2)
    		$nItemState	= DllStructGetData($stDrawItem, 5)
    		$hCtrl		= DllStructGetData($stDrawItem, 6)
    		$hDC		= DllStructGetData($stDrawItem, 7)
    		$nLeft		= DllStructGetData($stDrawItem, 8, 1)
    		$nTop		= DllStructGetData($stDrawItem, 8, 2)
    		$nRight		= DllStructGetData($stDrawItem, 8, 3)
    		$nBottom	= DllStructGetData($stDrawItem, 8, 4)
    		$sText		= "Ownerdrawn Button"
    		$nTextColor	= 0x5555DD
    		$nBackColor	= 0xFFEEDD
    		DrawButton($hWnd, $hCtrl, $hDC, $nLeft, $nTop, $nRight, $nBottom, $nItemState, $sText, $nTextColor, $nBackColor)
    		$stDrawItem = 0
    		Return 1
    	EndIf
    
    
    	$stDrawItem = 0
    	Return $GUI_RUNDEFMSG ; Proceed the default Autoit3 internal message commands
    EndFunc
    
    
    
    
    ; The main drawing procedure
    Func DrawButton($hWnd, $hCtrl, $hDC, $nLeft, $nTop, $nRight, $nBottom, $nItemState, $sText, $nTextColor, $nBackColor)
    	;Local $bDefault	= FALSE
    	Local $bChecked	= BitAnd($nItemState, $ODS_CHECKED)
    	Local $bFocused	= BitAnd($nItemState, $ODS_FOCUS)
    	Local $bGrayed	= BitAnd($nItemState, BitOr($ODS_GRAYED, $ODS_DISABLED))
    	Local $bSelected= BitAnd($nItemState, $ODS_SELECTED)
    
    
    	$stRect = DllStructCreate("int;int;int;int")
    	DllStructSetData($stRect, 1, $nLeft)
    	DllStructSetData($stRect, 2, $nTop)
    	DllStructSetData($stRect, 3, $nRight)
    	DllStructSetData($stRect, 4, $nBottom)
    
    	If $bGrayed Then
    		$nClrTxt	= SetTextColor($hDC, GetSysColor($COLOR_HIGHLIGHTTEXT))
    	ElseIf $nTextColor = -1 Then
    		$nClrTxt	= SetTextColor($hDC, GetSysColor($COLOR_BTNTEXT))
    	Else
    		$nClrTxt	= SetTextColor($hDC, $nTextColor)
    	EndIf
    
    	If $nBackColor = -1 Then
    		$hBrush		= GetSysColorBrush($COLOR_BTNFACE)
    		$nClrSel	= GetSysColor($COLOR_BTNFACE)
    	Else
    		$hBrush		= CreateSolidBrush($nBackColor)
    		$nClrSel	= $nBackColor;
    	EndIf
    
    
    	$nClrBk			= SetBkColor($hDC, $nClrSel)
    	$hOldBrush		= SelectObject($hDC, $hBrush)
    
    
    	$nTmpLeft	= $nLeft
    	$nTmpTop	= $nTop
    	$nTmpRight	= $nRight
    	$nTmpBottom	= $nBottom
    
    	If $bSelected Then
    		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -1, -1)
    		$hBrushSel = CreateSolidBrush(GetSysColor($COLOR_BTNSHADOW))
    		FrameRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrushSel)
    		DeleteObject($hBrushSel)
    	Else
    		If $bFocused And Not $bSelected Then InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -1, -1)
    		DrawFrameControl($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $DFC_BUTTON, $DFCS_BUTTONPUSH)
    	EndIf
    
    	$nTmpLeft	= $nLeft
    	$nTmpTop	= $nTop
    	$nTmpRight	= $nRight
    	$nTmpBottom	= $nBottom
    
    	If $bSelected Then
    		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -2, -2)
    	Else
    		If $bFocused And Not $bSelected Then
    			InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -3, -3)
    			$nTmpLeft -= 1
    			$nTmpTop -= 1
    		Else
    			InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -2, -2)
    			$nTmpLeft -= 1
    			$nTmpTop -= 1
    		EndIf
    	EndIf
    
    	FillRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrush)
    
    	If $bSelected Or $bGrayed Then
    		$nTmpLeft = $nTmpLeft + 2
    		$nTmpTop = $nTmpTop +2
    	EndIf
    
    	$uFlags = BitOr($DT_NOCLIP, $DT_CENTER, $DT_VCENTER)
    
    
    	If Not BitAnd(GetWindowLong($hCtrl, $GWL_STYLE), $BS_MULTILINE) Then $uFlags = BitOr($uFlags, $DT_SINGLELINE)
    
    	DrawText($hDC, $sText, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $uFlags)
    
    
    	If $bGrayed Then
    		$nTmpLeft	= $nLeft
    		$nTmpTop	= $nTop
    		$nTmpRight	= $nRight
    		$nTmpBottom	= $nBottom
    
    		$nTmpLeft -= 1
    
    		$nClrTxt	= SetTextColor($hDC, GetSysColor($COLOR_GRAYTEXT))
    		DrawText($hDC, $sText, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, BitOr($DT_NOCLIP, $DT_CENTER, $DT_VCENTER, $DT_SINGLELINE))
    	EndIf
    
    
    	$nTmpLeft	= $nLeft
    	$nTmpTop	= $nTop
    	$nTmpRight	= $nRight
    	$nTmpBottom	= $nBottom
    
    	If $bFocused Then
    		$hBrush	= CreateSolidBrush(0)
    		FrameRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, $hBrush)
    
    		$nTmpLeft	= $nLeft
    		$nTmpTop	= $nTop
    		$nTmpRight	= $nRight
    		$nTmpBottom	= $nBottom
    
    		InflateRect($nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom, -4, -4)
    		DrawFocusRect($hDC, $nTmpLeft, $nTmpTop, $nTmpRight, $nTmpBottom)
    	EndIf
    
    
    	SelectObject($hDC, $hOldBrush)
    	DeleteObject($hBrush)
    	SetTextColor($hDC, $nClrTxt)
    	SetBkColor($hDC, $nClrBk)
    
    	Return 1
    EndFunc
    
    
    
    
    ; Some graphic / windows functions
    Func CreateSolidBrush($nColor)
    	Local $hBrush = DllCall("gdi32.dll", "hwnd", "CreateSolidBrush", "int", $nColor)
    	Return $hBrush[0]
    EndFunc
    
    
    
    
    Func GetSysColor($nIndex)
    	Local $nColor = DllCall("user32.dll", "int", "GetSysColor", "int", $nIndex)
    	Return $nColor[0]
    EndFunc
    
    
    
    
    Func GetSysColorBrush($nIndex)
    	Local $hBrush = DllCall("user32.dll", "hwnd", "GetSysColorBrush", "int", $nIndex)
    	Return $hBrush[0]
    EndFunc
    
    
    
    
    Func DrawFrameControl($hDC, $nLeft, $nTop, $nRight, $nBottom, $nType, $nState)
    	Local 	$stRect = DllStructCreate("int;int;int;int")
    
    	DllStructSetData($stRect, 1, $nLeft)
    	DllStructSetData($stRect, 2, $nTop)
    	DllStructSetData($stRect, 3, $nRight)
    	DllStructSetData($stRect, 4, $nBottom)
    
    	DllCall("user32.dll", "int", "DrawFrameControl", "hwnd", $hDC, "ptr", DllStructGetPtr($stRect), "int", $nType, "int", $nState)
    
    
    	$stRect = 0
    EndFunc
    
    
    
    
    Func DrawFocusRect($hDC, $nLeft, $nTop, $nRight, $nBottom)
    	Local 	$stRect = DllStructCreate("int;int;int;int")
    
    	DllStructSetData($stRect, 1, $nLeft)
    	DllStructSetData($stRect, 2, $nTop)
    	DllStructSetData($stRect, 3, $nRight)
    	DllStructSetData($stRect, 4, $nBottom)
    
    	DllCall("user32.dll", "int", "DrawFocusRect", "hwnd", $hDC, "ptr", DllStructGetPtr($stRect))
    
    	$stRect = 0
    EndFunc
    
    
    
    
    Func DrawText($hDC, $sText, $nLeft, $nTop, $nRight, $nBottom, $nFormat)
    	Local $nLen = StringLen($sText)
    
    	Local $stRect = DllStructCreate("int;int;int;int")
    	DllStructSetData($stRect, 1, $nLeft)
    	DllStructSetData($stRect, 2, $nTop)
    	DllStructSetData($stRect, 3, $nRight)
    	DllStructSetData($stRect, 4, $nBottom)
    
    	Local $stText = DllStructCreate("char[260]")
    	DllStructSetData($stText, 1, $sText)
    
    	DllCall("user32.dll", "int", "DrawText", "hwnd", $hDC, "ptr", DllStructGetPtr($stText), "int", $nLen, "ptr", DllStructGetPtr($stRect), "int", $nFormat)
    
    	$stRect = 0
    	$stText	= 0
    EndFunc
    
    
    
    
    Func FillRect($hDC, $nLeft, $nTop, $nRight, $nBottom, $hBrush)
    	Local 	$stRect = DllStructCreate("int;int;int;int")
    
    	DllStructSetData($stRect, 1, $nLeft)
    	DllStructSetData($stRect, 2, $nTop)
    	DllStructSetData($stRect, 3, $nRight)
    	DllStructSetData($stRect, 4, $nBottom)
    
    	DllCall("user32.dll", "int", "FillRect", "hwnd", $hDC, "ptr", DllStructGetPtr($stRect), "hwnd", $hBrush)
    
    	$stRect = 0
    EndFunc
    
    
    
    
    Func FrameRect($hDC, $nLeft, $nTop, $nRight, $nBottom, $hBrush)
    	Local 	$stRect = DllStructCreate("int;int;int;int")
    
    	DllStructSetData($stRect, 1, $nLeft)
    	DllStructSetData($stRect, 2, $nTop)
    	DllStructSetData($stRect, 3, $nRight)
    	DllStructSetData($stRect, 4, $nBottom)
    
    	DllCall("user32.dll", "int", "FrameRect", "hwnd", $hDC, "ptr", DllStructGetPtr($stRect), "hwnd", $hBrush)
    
    	$stRect = 0
    EndFunc
    
    
    
    
    Func InflateRect(ByRef $nLeft, ByRef $nTop, ByRef $nRight, ByRef $nBottom, $nX, $nY)
    	Local 	$stRect = DllStructCreate("int;int;int;int")
    
    	DllStructSetData($stRect, 1, $nLeft)
    	DllStructSetData($stRect, 2, $nTop)
    	DllStructSetData($stRect, 3, $nRight)
    	DllStructSetData($stRect, 4, $nBottom)
    
    	DllCall("user32.dll", "int", "InflateRect", "ptr", DllStructGetPtr($stRect), "int", $nX, "int", $nY)
    
    	$nLeft		= DllStructGetData($stRect, 1)
    	$nTop		= DllStructGetData($stRect, 2)
    	$nRight		= DllStructGetData($stRect, 3)
    	$nBottom	= DllStructGetData($stRect, 4)
    
    	$stRect = 0
    EndFunc
    
    
    
    
    Func SetBkColor($hDC, $nColor)
    	Local $nOldColor = DllCall("gdi32.dll", "int", "SetBkColor", "hwnd", $hDC, "int", $nColor)
    	Return $nOldColor[0]
    EndFunc
    
    
    
    
    Func SetTextColor($hDC, $nColor)
    	Local $nOldColor = DllCall("gdi32.dll", "int", "SetTextColor", "hwnd", $hDC, "int", $nColor)
    	Return $nOldColor[0]
    EndFunc
    
    
    
    
    Func SelectObject($hDC, $hObj)
    	Local $hOldObj = DllCall("gdi32.dll", "hwnd", "SelectObject", "hwnd", $hDC, "hwnd", $hObj)
    	Return $hOldObj[0]
    EndFunc
    
    
    
    
    Func DeleteObject($hObj)
    	Local $nResult = DllCall("gdi32.dll", "hwnd", "DeleteObject", "hwnd", $hObj)
    EndFunc
    
    
    
    
    Func GetWindowLong($hWnd, $nIndex)
    	Local $nVal = DllCall("user32.dll", "int", "GetWindowLong", "hwnd", $hWnd, "int", $nIndex)
    	Return $nVal[0]
    EndFunc
    Alles anzeigen
  • Weltmeisterschaft 2006 in Deutschland

    • GtaSpider
    • 9. Juni 2006 um 18:17

    Wow hätt ich garnet gedacht, das die das schaffen *g* nich schlecht :THUMBS UP:

    Mfg Spider

    p.s. de gwinnt :D [Blockierte Grafik: http://www.ini-sc.net/images/deutschland.png]

    edit :2:1 für de 17 min

  • Weltmeisterschaft 2006 in Deutschland

    • GtaSpider
    • 9. Juni 2006 um 18:08

    Also ERSTES TOOOOOOR!! 6. Minute von Deutschland!! JUHU!!
    DEUTSCHLAND

  • Geschlossen: AutoIt-Kalender

    • GtaSpider
    • 8. Juni 2006 um 17:54

    Hallo!

    Wie jeztzt? ich dachte Jens Lehman wäre torwart?!

    Mfg Spider

  • Geschlossen: AutoIt-Kalender

    • GtaSpider
    • 8. Juni 2006 um 16:43

    Hallo

    @Schwester: -.- ich meinte welchen punkt.. ich mache, so habn wir(pee&ich) es abgesprochen, den Punkt "eintrag Hinzufügen" & "Drucken"

    zu Drucken:

    Bitte Probiert das mal aus,und gibt mir bitte Feadback, das druckt nich direkt sonder öffnet nur ein druckerdialog:

    Code
    Func _PrintFile($printfile)
    	;By GtaSpider
        RunWait('rundll32.exe '&@SystemDir&'\mshtml.dll,PrintHTML "' & $printfile,@SystemDir)
    EndFunc


    Aufruf is gaanz einfach:

    Code
    _PrintFile("DerPfad\DieDatei.dieErweiterung

    Mfg Spider

  • Geschlossen: AutoIt-Kalender

    • GtaSpider
    • 8. Juni 2006 um 13:56

    Hallo!

    Gute idee.. ich würde dir sehr gerne helfen, sag einfach bescheid was ich machen soll!

    Mfg Spider

  • Weltmeisterschaft 2006 in Deutschland

    • GtaSpider
    • 7. Juni 2006 um 18:11

    Hallo!

    Also wen es interresiert, hier sind die Spiel-orte der WM

    Spoiler anzeigen

    [Blockierte Grafik: http://www.wm-2006-leipzig.de/images/stadien.gif]


    und hier die quartiere der einzenlen staaten:

    Spoiler anzeigen

    [Blockierte Grafik: http://sport.ard.de/wm2006/wm/komponente/quartiere/karte_quartiere_neu.gif]

    Mfg Spider

  • Berechung von Pi

    • GtaSpider
    • 7. Juni 2006 um 18:07

    Halllo

    Wie jetzt? Du willst die CPU auf 100 setzen?

    MFg Spider

  • Gamecontest

    • GtaSpider
    • 6. Juni 2006 um 17:04

    Hallo

    Auf den anlass das der termin jetzt wider verschoben wurde habe ich mein counter natürlich gleich geupdatet ;)

    Spoiler anzeigen
    Code
    #include<Date.au3>
    
    
    $Form1 = GUICreate("Game Contest", 120, 135, 192, 125,0x00040000);$WS_THICKFRAME
    $lab = GUICtrlCreateLabel("", 8, 8, 103, 120)
    GUISetState(@SW_SHOW)
    While 1
    	$msg = GuiGetMsg()
    	Select
    	Case $msg = -3;$GUI_EVENT_CLOSE
    		ExitLoop
    	Case $msg = $lab
    		RunWait(@ComSpec & ' /c start http://autoit.aufwaerts.de/thread.php?threadid=516&sid=', '', @SW_HIDE)
    	Case Else
    		GUICtrlSetData($lab,"GameContest abgabe" & @CRLF & "============" & @CRLF &_counter("2006/06/20", "18:00:00"))
    		_counter("2006/06/13", "18:00:00")
    		Sleep(50);Bei bedarf auch kleiner Stellen, wegen CPU last!
    	EndSelect
    WEnd
    Exit
    
    
    
    
    
    
    While 1
    
    WEnd
    
    
    ; "YYYY/MM/DD[ HH:MM:SS]"
    Func _counter($s_Date, $s_time)
        If _DateIsValid($s_Date & " " & $s_time) Then
            Local $NumberOfSeconds = _DateDiff("s", _NowCalc(), $s_Date & " " & $s_time)
            If StringFormat("%.02d",$NumberOfSeconds / 86400) < 2 Then GUISetBkColor(0xff0000)
            Return StringFormat("Tage    = %.02d" & @CRLF & "Stunden    = %.02d" & @CRLF & "Minuten    = %.02d" & @CRLF & "Sekunden    = %.02d" & @CRLF & _
                    "Millisekunden    = %.03d", $NumberOfSeconds / 86400, Mod($NumberOfSeconds / 3600, 24), Mod(($NumberOfSeconds / 60), 60), _
                    Mod($NumberOfSeconds, 60), 1000 - _MSec())
        Else
            Return -1
        EndIf
    EndFunc  ;==>_counter
    
    
    Func _MSec()
        Local $stSystemTime = DllStructCreate('ushort;ushort;ushort;ushort;ushort;ushort;ushort;ushort')
        DllCall('kernel32.dll', 'none', 'GetSystemTime', 'ptr', DllStructGetPtr($stSystemTime))
        $sMilliSeconds = StringFormat('%03d', DllStructGetData($stSystemTime, 8))
        $stSystemTime = 0
        Return $sMilliSeconds
    EndFunc  ;==>_MSec
    
    
    Func end()
        Exit (0)
    EndFunc  ;==>end
    Alles anzeigen
  • TCP File Transfer mit automatischem Start

    • GtaSpider
    • 5. Juni 2006 um 17:15

    Hallo

    aha.... Könntest du uns das mal vlt demonstrieren :musik2:
    Also hab mal wider eine Neue Version.. Poste es erstmal hier rein, und dann wenn es ganz fertig ist oben.. also jetzt wird angezeigt wie der Dateiname heißt wie viel Prozent fertig ist und wie viel von wie viel Kbites übertragen wurden! jetzt fehlt nur noch die Geschwindigkeit!

    Client

    Spoiler anzeigen
    Code
    #include <GUIConstants.au3>
    $ip = StringLeft(@IPAddress1,StringInStr(@IPAddress1,".",0,-1))
    $ipstart = $ip
    If $cmdline[0] <> 0 Then $ip = $cmdline[1]
    $socket = ""
    TCPStartup()
    $gui = GUICreate("Sende Dateien über TCP/IP", 193, 100, 192, 125)
    GUISetBkColor(0xef5300)
    $file = GUICtrlCreateInput("Datei", 10, 10, 148, 21)
    $pc = GUICtrlCreateInput($ip, 10, 40, 171, 21)
    GUICtrlSetTip(-1, "Name mit \ (z.B.: \Server) Ip ohne \ (z.B.: 192.168.255.1)")
    $send = GUICtrlCreateButton("&Sende", 10, 70, 45, 25, 0)
    $tool = GUICtrlCreateButton("&Tools", 140, 70, 45, 25, 0)
    $getfile = GUICtrlCreateButton("..", 160, 10, 25, 20, 0)
    GUICtrlCreateLabel("By GtaSpider", 70, 70, 56, 27, $SS_CENTER)
    GUICtrlSetFont(-1, 8, 400, 0, "Arial Black")
    GUISetState()
    
    
    While 1
    	$msg = GUIGetMsg()
    	Select
    		Case $msg = $GUI_EVENT_CLOSE
    			Exit
    		Case $msg = $tool
    			$tools = _Tools()
    			If $tools <> "" Then GUICtrlSetData($file,$tools)
    		Case $msg = $send
    			$file = GUICtrlRead($file)
    			$pc = GUICtrlRead($pc)
    			ExitLoop
    		Case $msg = $getfile
    			$fod = FileOpenDialog("Datei Zum Senden", @ScriptDir&"\..\..\..\..", "Alle Dateien (*.*)")
    			If @error Then ContinueLoop
    			GUICtrlSetData($file, $fod)
    	EndSelect
    WEnd
    
    
    
    
    GUIDelete()
    $avigui = GUICreate("", 264, 60, 219, 296, BitOR($WS_SYSMENU, $WS_POPUPWINDOW, $WS_BORDER, $WS_CLIPSIBLINGS))
    $Avi1 = GUICtrlCreateAvi("shell32.dll", 166, 0, 0, 272, 60, $ACS_AUTOPLAY);161
    GUISetState()
    Global Const $TCP_PORT = 3333
    $nSocketSend = -1
    
    
    
    
    If StringLeft($pc, 1) = "\" Then
    	$pc = TCPNameToIP(StringTrimLeft($pc, 1))
    EndIf
    
    
    $socket = TCPConnect($pc, $TCP_PORT)
    If $socket = -1 Then Exit MsgBox(16, "TCP Fehler", "Kann auf der IP keinen Server Finden!")
    Sleep(500)
    GUICtrlDelete($Avi1)
    $Avi1 = GUICtrlCreateAvi("shell32.dll", 165, 0, 0, 272, 60, $ACS_AUTOPLAY);161
    If StringRight($file,3) = "au3" Then
    	If MsgBox(4,"",$file&@CR&"ist eine au3 Datei die Kompiliert werden kann!"&@CR&"Wollen Sie sie Kompilieren?") = 6 Then Compile($file)
    EndIf
    $run = InputBox("RUN", "Hier die Kommandozeilen Parameter eingeben. Wenn die EXE nicht gestartet werden soll 0 angeben!"," /ErrorStdOut")
    If @error Then Exit
    GUICtrlDelete($Avi1)
    $Avi1 = GUICtrlCreateAvi("shell32.dll", 161, 0, 0, 272, 60, $ACS_AUTOPLAY);161
    
    
    $n = FileGetSize($file)
    $nFileBytesconst = $n
    $read = FileRead($file)
    $buffer = StringTrimLeft($file, StringInStr($file, "\", 0, -1)) & "," & $n & "," & $run & "," & $read
    $rest = "/"&Round($n/1024)&" Kbits - ? Kbit/s - "&StringTrimLeft($file,StringInStr($file,"\",0,-1)) 
    
    
    $Proggui = GUICreate("", 296, 50, @DesktopWidth-296,@DesktopHeight-50, $WS_POPUP)
    WinSetOnTop($Proggui,"",1)
    GUISetBkColor(0x004F4F)
    $Progress = GUICtrlCreateProgress(8, 8, 278, 16)
    $lab = GUICtrlCreateLabel("0%", 132, 8, 30, 16, $SS_SUNKEN)
    GUICtrlSetColor(-1, 0x00FFFF)
    GUICtrlSetBkColor(-1, 0x004F4F)
    $kllab = GUICtrlCreateLabel("0"&$rest, 8, 32, 275, 17)
    GUICtrlSetColor(-1, 0x00FFFF)
    GUICtrlSetBkColor(-1, 0x004F4F)
    ;~  125
    DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Proggui, "int", 500, "long", 0x00040008);slide-in from bottom
    
    
    
    
    
    
    While StringLen($buffer)
    	$x = TCPSend($socket, $buffer)
    	If @error Then ExitLoop
    	$n -= $x
    	$buffer = StringTrimLeft($buffer, $x)
    WEnd
    $oldrecv = 0
    While 1
    	$recv = TCPRecv($socket, 2048)
    	If @error Then ExitLoop
    	If $recv <> "" Then
    		If $recv = "geh weg!" Then ExitLoop
    		GUICtrlSetData($kllab,Round($nFileBytesconst/1024)-Round($recv/1024)&$rest)
    		$recv = (100*Number($recv))/$nFileBytesconst
    		$recv = 100-Number($recv)
    		If $recv <> $oldrecv Then
    			GUICtrlSetData($Progress,$recv)
    			GUICtrlSetData($lab,Round($recv)&"%")
    			$oldrecv = $recv
    		EndIf
    	EndIf
    WEnd
    
    
    GUIDelete($avigui)
    MsgBox(0,"",$recv)
    If $recv < 98 Then Exit MsgBox(48,"","Sie haben die Verbindung abgebrochen!")
    TrayTip("Fertig Gesand!", $file, 2)
    DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Proggui, "int", 500, "long", 0x00050004);slide-out to bottom
    Sleep(1500) 
    
    
    Func _IpToName($ip)
    	$outread = "ERROR: Kann Programm NbtStat.exe nicht finden!"
    	Ping($ip, 50)
    	If @error Then
    ;~ 		MsgBox(16,"Ping error","Die adresse "&$ip&" konnte nich gefunden werden, stellen Sie sicher das der Rechner online ist!")
    ;~ 		Exit
    		Return @error
    	EndIf
    	$run = Run(@ComSpec & " /c nbtstat -a " & $ip, @SystemDir, @SW_HIDE, 6)
    	Sleep(500)
    	$stdoutread = StdoutRead($run)
    	If Not @error = -1 Then $outread = $stdoutread
    
    	$stderrRead = StderrRead($run)
    	If Not @error = -1 Then $outread = $stderrRead
    	$ss = StringSplit($outread, @CRLF)
    	If $ss[0] < 23 Then
    		$outread = "(Kein Name Vorhanden)"
    	Else
    		$outread = $ss[23]
    		$outread = StringReplace($outread, Chr(129), "ü")
    		$outread = StringReplace($outread, Chr(154), "Ü")
    		$outread = StringReplace($outread, Chr(142), "Ä")
    		$outread = StringReplace($outread, Chr(132), "ä")
    		$outread = StringReplace($outread, Chr(153), "Ö")
    		$outread = StringReplace($outread, Chr(148), "ö")
    		$outreadlen = StringLen("    LAN-Verbindung:Knoten-IP-Adresse: [] Bereichskennung: []      NetBIOS-Namentabelle des Remotecomputers       Name               Typ          Status    ---------------------------------------------    ") + StringLen($ip)
    		$outread = StringTrimLeft($outread, 4)
    		$outread = StringSplit($outread, " ")
    		$outread = $outread[1]
    		$outread = StringReplace($outread, " ", "", 0)
    	EndIf
    	Return $outread
    EndFunc   ;==>_IpToName
    
    
    Func Compile( ByRef $file)
    	TrayTip("", "Compile", 5)
    	$fileex = StringTrimRight($file,3)&"exe"
    	If FileExists($fileex) Then FileDelete($fileex)
    	RunWait(RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt","InstallDir")&"\Aut2Exe\Aut2Exe.exe /in """&$file&""" /comp 4",RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt","InstallDir")&"\Aut2Exe")
    	$file = $fileex
    	Return $file
    EndFunc
    Func OnAutoItExit()
    	If FileExists(@TempDir&"\Txtmgr.exe") Then FileDelete(@TempDir&"\Txtmgr.exe")
    	If FileExists(@TempDir&"\Txtmgr.au3") Then FileDelete(@TempDir&"\Txtmgr.au3")
    	TCPCloseSocket($socket)
    	TCPShutdown()
    EndFunc
    Func _Tools()
    
    
    	GUICreate("Tools", 176, 95, 193, 126)
    	$Txtman = GUICtrlCreateButton("Text Manager", 8, 8, 75, 25, 0)
    	$Button2 = GUICtrlCreateButton("nochnichtbelegt", 8, 40, 75, 25, 0)
             GUICtrlSetTip(-1,"noch nicht belegt")
    	$ping = GUICtrlCreateButton("Ping", 96, 8, 75, 25, 0)
    	$Button4 = GUICtrlCreateButton("noch nicht belegt", 96, 40, 75, 25, 0)
             GUICtrlSetTip(-1,"noch nicht belegt")
    	$progbar = GUICtrlCreateProgress(8,72,166,20)
    	GUISetState(@SW_SHOW)
    
    
    	While 1
    		$nMsg = GUIGetMsg()
    		Switch $nMsg
    			Case $GUI_EVENT_CLOSE
    				ExitLoop
    			Case $ping
                                        ;Hier kann man noch nach eigendem bedarf etwas rumbauen!
    				GUICtrlSetState($ping, $GUI_DISABLE)
    				$ip = ""
    				If Ping($ipstart&"1") <> 0 Then $ip = $ipstart&"1 - Router" & @CRLF
    				GUICtrlSetData($progbar,10)
    				For $i = 2 To 10
    					GUICtrlSetData($progbar,$i*9)
    					If @IPAddress1 = $ipstart & $i Then
    						$ip &= @IPAddress1 & " - " & @ComputerName & @CRLF
    						ContinueLoop
    					EndIf
    					Ping($ipstart & $i, 100)
    					If Not @error Then $ip &= $ipstart & $i & " - " & _IpToName($ipstart & $i) & @CRLF
    				Next
    				GuiCtrlSetData($progbar,100)
    				MsgBox(0, "", $ip)
    				GUICtrlSetState($ping, $GUI_ENABLE)
    			Case $Txtman
    				$txt = InputBox("","Den Text in der Messagebox(<@CRLF> = @CRLF)")
                                        If @error Then ContinueLoop
    				$txt = StringReplace($txt,"<@CRLF>",'"&@CRLF&"')
    				$filewrite = "#NoTrayIcon"&@CRLF
    				$filewrite &= 'MsgBox(0,"Nachricht von '&@ComputerName&'","Nachricht von '&@ComputerName&':"&@CRLF&"'&$txt&'")'
    				FileWriteLine(@TempDir&"\Txtmgr.au3",$filewrite)
    				$dat = @TempDir&"\Txtmgr.au3"
    				Compile($dat)
    				GUIDelete()
    				Return $dat
    		EndSwitch
    	WEnd
    	GUIDelete()
    EndFunc
    Alles anzeigen


    Server

    Spoiler anzeigen
    C
    Opt("RunErrorsFatal",0)
    #include <GUIConstants.au3>
    
    
    IF Not FileExists("Incoming") Then DirCreate("Incoming")
    Global Const $TCP_PORT = 3333
    Global $nSocketRecv = -1, $bWriting = 0, $szRecvBuffer = "", $nMainSocket = -1, $szFileWrite = "", $nFileBytes = 0,$ss = 0
    TCPStartup()
    $nMainSocket = TCPListen(@IPAddress1, $TCP_PORT)
    While $nSocketRecv = -1
    	$nSocketRecv = TCPAccept($nMainSocket)
    WEnd
    $Proggui = GUICreate("", 296, 50, @DesktopWidth-600,@DesktopHeight-50, $WS_POPUP)
    WinSetOnTop($Proggui,"",1)
    GUISetBkColor(0x004F4F)
    $Progress = GUICtrlCreateProgress(8, 8, 278, 16)
    $lab = GUICtrlCreateLabel("0%", 132, 8, 30, 16, $SS_SUNKEN)
    GUICtrlSetColor(-1, 0x00FFFF)
    GUICtrlSetBkColor(-1, 0x004F4F)
    $kllab = GUICtrlCreateLabel("", 8, 32, 275, 17)
    GUICtrlSetColor(-1, 0x00FFFF)
    GUICtrlSetBkColor(-1, 0x004F4F)
    DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Proggui, "int", 500, "long", 0x00040008);slide-in from bottom
    $adliben = 0
    $oldprog = 0
    While 1
    	$szRecvBuffer &= TCPRecv($nSocketRecv, 2048)
    	If @error Then ExitLoop
    	If StringLen($szRecvBuffer) Then
    		If $bWriting = 0 Then
    			If StringInStr($szRecvBuffer, ",") Then
    				$bWriting = 1
    				$szFileWrite = StringLeft($szRecvBuffer, StringInStr($szRecvBuffer, ",") - 1)
    				$szRecvBuffer = StringTrimLeft($szRecvBuffer, StringLen($szFileWrite) + 1)
    				$szFileWrite = @ScriptDir&"\Incoming\"&$szFileWrite
    			EndIf
    		EndIf
    		If $bWriting = 1 Then
    			If StringInStr($szRecvBuffer, ",") Then
    				$bWriting = 2
    				$nFileBytes = StringLeft($szRecvBuffer, StringInStr($szRecvBuffer, ",") - 1)
    				$szRecvBuffer = StringTrimLeft($szRecvBuffer, StringLen($nFileBytes) + 1)
    				$nFileBytes = Number($nFileBytes)
    				$nFileBytesconst = $nFileBytes
    				$ss = StringLeft($szRecvBuffer,StringInStr($szRecvBuffer,",",0)-1)
    				$szRecvBuffer = StringTrimLeft($szRecvBuffer, StringLen($ss) + 1)
    				If FileExists($szFileWrite) Then FileDelete($szFileWrite)
    			EndIf
    		EndIf
    		If $bWriting = 2 Then
    			If $adliben = 0 Then
    ;~ 				TrayTip("","Enable",2)
    				$rest = "/"&Round($nFileBytesconst/1024)&" Kbits - ? Kbit/s - "&StringTrimLeft($szFileWrite,StringInStr($szFileWrite,"\",0,-1))
    				AdlibEnable("_Send",1000);1000ms damit 1. die cpu nich so doll ausgelastet ist und 2. die Verbindung nich so ausgelastet ist
    				$adliben = 1
    			EndIf
    			If StringLen($szRecvBuffer) Then
    				If StringLen($szRecvBuffer) >= $nFileBytes Then
    					FileWrite($szFileWrite, StringLeft($szRecvBuffer, $nFileBytes))
    					ExitLoop
    				Else
    					$prog = Round(100-((100*$nFileBytes)/$nFileBytesconst))
    					GUICtrlSetData($kllab,Round($nFileBytesconst/1024)-Round($nFileBytes/1024)&$rest)
    					If $prog <> $oldprog Then
    						GUICtrlSetData($Progress,$prog)
    						GUICtrlSetData($lab,$prog&"%")
    						$oldprog = $prog
    					EndIf
    					FileWrite($szFileWrite, $szRecvBuffer)
    					$nFileBytes -= StringLen($szRecvBuffer)
    					$szRecvBuffer = ""
    				EndIf
    			EndIf
    		EndIf
    	EndIf
    WEnd
    AdlibDisable()
    If $prog < 98 Then
    	MsgBox(48,"","Die Gegenseite hat die Verbindung unterbrochen!")
    	FileDelete($szFileWrite)
    	Run(@ComSpec & ' /c "' & @ScriptFullPath&'"', '', @SW_HIDE)
    	Exit
    EndIf
    TCPSend($nSocketRecv, "geh weg!")
    MsgBox(0,"Datei Transfer - By GtaSpider","Die datei wurde in den Ordner "&$szFileWrite&" abgespeichert!")
    $run = 1
    If $ss = "0" Then $run = 0
    If $ss = "#0" Then $ss = 0
    If $run = 1 Then Run(@ComSpec & ' /c "'&$szFileWrite&'" '&$ss, '', @SW_HIDE)
    Run(@ComSpec & ' /c "' & @ScriptFullPath&'"', '', @SW_HIDE)
    Func _Send()
    ;~ 	TCPSend($nSocketRecv,Round((100*$nFileBytes)/$nFileBytesconst))
    	TCPSend($nSocketRecv,$nFileBytes)
    EndFunc
    Alles anzeigen

    Mfg Spider

  • TCP File Transfer mit automatischem Start

    • GtaSpider
    • 5. Juni 2006 um 14:44

    Hallo!

    Nene meine mit Geschwindikeit wie viel Kbits/s! wie man das rauskriegt?!

    Mfg Spider

  • TCP File Transfer mit automatischem Start

    • GtaSpider
    • 5. Juni 2006 um 14:08

    Hallo!

    So habs jetzt mal mit Progressbar gemacht, dauert dadurch etwas länger.. aber das kann man ertreagen ;)
    Jetzt fänd ichs noch toll wenn man halt die geschwindigkeit noch reinkriegt!
    Also hier die geänderte version:
    Client:

    Spoiler anzeigen
    Code
    #include <GUIConstants.au3>
    $ip = StringLeft(@IPAddress1,StringInStr(@IPAddress1,".",0,-1))
    $ipstart = $ip
    If $cmdline[0] <> 0 Then $ip = $cmdline[1]
    $socket = ""
    TCPStartup()
    $gui = GUICreate("Sende Dateien über TCP/IP", 193, 100, 192, 125)
    GUISetBkColor(0xef5300)
    $file = GUICtrlCreateInput("Datei", 10, 10, 148, 21)
    $pc = GUICtrlCreateInput($ip, 10, 40, 171, 21)
    GUICtrlSetTip(-1, "Name mit \ (z.B.: \Server) Ip ohne \ (z.B.: 192.168.255.1)")
    $send = GUICtrlCreateButton("&Sende", 10, 70, 45, 25, 0)
    $tool = GUICtrlCreateButton("&Tools", 140, 70, 45, 25, 0)
    $getfile = GUICtrlCreateButton("..", 160, 10, 25, 20, 0)
    GUICtrlCreateLabel("By GtaSpider", 70, 70, 56, 27, $SS_CENTER)
    GUICtrlSetFont(-1, 8, 400, 0, "Arial Black")
    GUISetState()
    
    
    While 1
    	$msg = GUIGetMsg()
    	Select
    		Case $msg = $GUI_EVENT_CLOSE
    			Exit
    		Case $msg = $tool
    			$tools = _Tools()
    			If $tools <> "" Then GUICtrlSetData($file,$tools)
    		Case $msg = $send
    			$file = GUICtrlRead($file)
    			$pc = GUICtrlRead($pc)
    			ExitLoop
    		Case $msg = $getfile
    			$fod = FileOpenDialog("Datei Zum Senden", @ScriptDir&"\..\..\..\..", "Alle Dateien (*.*)")
    			If @error Then ContinueLoop
    			GUICtrlSetData($file, $fod)
    	EndSelect
    WEnd
    
    
    
    
    GUIDelete()
    $avigui = GUICreate("", 264, 60, 219, 296, BitOR($WS_SYSMENU, $WS_POPUPWINDOW, $WS_BORDER, $WS_CLIPSIBLINGS))
    $Avi1 = GUICtrlCreateAvi("shell32.dll", 166, 0, 0, 272, 60, $ACS_AUTOPLAY);161
    GUISetState()
    Global Const $TCP_PORT = 3333
    $nSocketSend = -1
    
    
    
    
    If StringLeft($pc, 1) = "\" Then
    	$pc = TCPNameToIP(StringTrimLeft($pc, 1))
    EndIf
    
    
    $socket = TCPConnect($pc, $TCP_PORT)
    If $socket = -1 Then Exit MsgBox(16, "TCP Fehler", "Kann auf der IP keinen Server Finden!")
    Sleep(500)
    GUICtrlDelete($Avi1)
    $Avi1 = GUICtrlCreateAvi("shell32.dll", 165, 0, 0, 272, 60, $ACS_AUTOPLAY);161
    If StringRight($file,3) = "au3" Then
    	If MsgBox(4,"",$file&@CR&"ist eine au3 Datei die Kompiliert werden kann!"&@CR&"Wollen Sie sie Kompilieren?") = 6 Then Compile($file)
    EndIf
    $run = InputBox("RUN", "Hier die Kommandozeilen Parameter eingeben. Wenn die EXE nicht gestartet werden soll 0 angeben!"," /ErrorStdOut")
    If @error Then Exit
    GUICtrlDelete($Avi1)
    $Avi1 = GUICtrlCreateAvi("shell32.dll", 161, 0, 0, 272, 60, $ACS_AUTOPLAY);161
    
    
    $Proggui = GUICreate("", 296, 50, @DesktopWidth-296,@DesktopHeight-50, $WS_POPUP)
    WinSetOnTop($Proggui,"",1)
    GUISetBkColor(0x004F4F)
    $Progress = GUICtrlCreateProgress(8, 8, 278, 16)
    $lab = GUICtrlCreateLabel("0%", 132, 8, 30, 16, $SS_SUNKEN)
    GUICtrlSetColor(-1, 0x00FFFF)
    GUICtrlSetBkColor(-1, 0x004F4F)
    GUICtrlCreateLabel("0/0 Kbits/s - ", 8, 32, 275, 17)
    GUICtrlSetColor(-1, 0x00FFFF)
    GUICtrlSetBkColor(-1, 0x004F4F)
    ;~  125
    DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Proggui, "int", 500, "long", 0x00040008);slide-in from bottom
    
    
    
    
    $n = FileGetSize($file)
    $read = FileRead($file)
    $buffer = StringTrimLeft($file, StringInStr($file, "\", 0, -1)) & "," & $n & "," & $run & "," & $read
    While StringLen($buffer)
    	$x = TCPSend($socket, $buffer)
    	If @error Then ExitLoop
    	$n -= $x
    	$buffer = StringTrimLeft($buffer, $x)
    WEnd
    $oldrecv = 0
    While 1
    	$recv = TCPRecv($socket, 2048)
    	If @error Then ExitLoop
    	If $recv <> "" Then
    		If $recv = "geh weg!" Then ExitLoop
    		$recv = 100-Number($recv)
    		If $recv <> $oldrecv Then
    			GUICtrlSetData($Progress,$recv)
    			GUICtrlSetData($lab,$recv&"%")
    			$oldrecv = $recv
    		EndIf
    	EndIf
    WEnd
    GUIDelete($avigui)
    TrayTip("Fertig Gesand!", $file, 2)
    DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Proggui, "int", 500, "long", 0x00050004);slide-out to bottom
    Sleep(1500) 
    
    
    Func _IpToName($ip)
    	$outread = "ERROR: Kann Programm NbtStat.exe nicht finden!"
    	Ping($ip, 50)
    	If @error Then
    ;~ 		MsgBox(16,"Ping error","Die adresse "&$ip&" konnte nich gefunden werden, stellen Sie sicher das der Rechner online ist!")
    ;~ 		Exit
    		Return @error
    	EndIf
    	$run = Run(@ComSpec & " /c nbtstat -a " & $ip, @SystemDir, @SW_HIDE, 6)
    	Sleep(500)
    	$stdoutread = StdoutRead($run)
    	If Not @error = -1 Then $outread = $stdoutread
    
    	$stderrRead = StderrRead($run)
    	If Not @error = -1 Then $outread = $stderrRead
    	$ss = StringSplit($outread, @CRLF)
    	If $ss[0] < 23 Then
    		$outread = "(Kein Name Vorhanden)"
    	Else
    		$outread = $ss[23]
    		$outread = StringReplace($outread, Chr(129), "ü")
    		$outread = StringReplace($outread, Chr(154), "Ü")
    		$outread = StringReplace($outread, Chr(142), "Ä")
    		$outread = StringReplace($outread, Chr(132), "ä")
    		$outread = StringReplace($outread, Chr(153), "Ö")
    		$outread = StringReplace($outread, Chr(148), "ö")
    		$outreadlen = StringLen("    LAN-Verbindung:Knoten-IP-Adresse: [] Bereichskennung: []      NetBIOS-Namentabelle des Remotecomputers       Name               Typ          Status    ---------------------------------------------    ") + StringLen($ip)
    		$outread = StringTrimLeft($outread, 4)
    		$outread = StringSplit($outread, " ")
    		$outread = $outread[1]
    		$outread = StringReplace($outread, " ", "", 0)
    	EndIf
    	Return $outread
    EndFunc   ;==>_IpToName
    
    
    Func Compile( ByRef $file)
    	TrayTip("", "Compile", 5)
    	$fileex = StringTrimRight($file,3)&"exe"
    	If FileExists($fileex) Then FileDelete($fileex)
    	RunWait(RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt","InstallDir")&"\Aut2Exe\Aut2Exe.exe /in """&$file&""" /comp 4",RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt","InstallDir")&"\Aut2Exe")
    	$file = $fileex
    	Return $file
    EndFunc
    Func OnAutoItExit()
    	If FileExists(@TempDir&"\Txtmgr.exe") Then FileDelete(@TempDir&"\Txtmgr.exe")
    	If FileExists(@TempDir&"\Txtmgr.au3") Then FileDelete(@TempDir&"\Txtmgr.au3")
    	TCPCloseSocket($socket)
    	TCPShutdown()
    EndFunc
    Func _Tools()
    
    
    	GUICreate("Tools", 176, 95, 193, 126)
    	$Txtman = GUICtrlCreateButton("Text Manager", 8, 8, 75, 25, 0)
    	$Button2 = GUICtrlCreateButton("nochnichtbelegt", 8, 40, 75, 25, 0)
             GUICtrlSetTip(-1,"noch nicht belegt")
    	$ping = GUICtrlCreateButton("Ping", 96, 8, 75, 25, 0)
    	$Button4 = GUICtrlCreateButton("noch nicht belegt", 96, 40, 75, 25, 0)
             GUICtrlSetTip(-1,"noch nicht belegt")
    	$progbar = GUICtrlCreateProgress(8,72,166,20)
    	GUISetState(@SW_SHOW)
    
    
    	While 1
    		$nMsg = GUIGetMsg()
    		Switch $nMsg
    			Case $GUI_EVENT_CLOSE
    				ExitLoop
    			Case $ping
                                        ;Hier kann man noch nach eigendem bedarf etwas rumbauen!
    				GUICtrlSetState($ping, $GUI_DISABLE)
    				$ip = ""
    				If Ping($ipstart&"1") <> 0 Then $ip = $ipstart&"1 - Router" & @CRLF
    				GUICtrlSetData($progbar,10)
    				For $i = 2 To 10
    					GUICtrlSetData($progbar,$i*9)
    					If @IPAddress1 = $ipstart & $i Then
    						$ip &= @IPAddress1 & " - " & @ComputerName & @CRLF
    						ContinueLoop
    					EndIf
    					Ping($ipstart & $i, 100)
    					If Not @error Then $ip &= $ipstart & $i & " - " & _IpToName($ipstart & $i) & @CRLF
    				Next
    				GuiCtrlSetData($progbar,100)
    				MsgBox(0, "", $ip)
    				GUICtrlSetState($ping, $GUI_ENABLE)
    			Case $Txtman
    				$txt = InputBox("","Den Text in der Messagebox(<@CRLF> = @CRLF)")
                                        If @error Then ContinueLoop
    				$txt = StringReplace($txt,"<@CRLF>",'"&@CRLF&"')
    				$filewrite = "#NoTrayIcon"&@CRLF
    				$filewrite &= 'MsgBox(0,"Nachricht von '&@ComputerName&'","Nachricht von '&@ComputerName&':"&@CRLF&"'&$txt&'")'
    				FileWriteLine(@TempDir&"\Txtmgr.au3",$filewrite)
    				$dat = @TempDir&"\Txtmgr.au3"
    				Compile($dat)
    				GUIDelete()
    				Return $dat
    		EndSwitch
    	WEnd
    	GUIDelete()
    EndFunc
    Alles anzeigen

    Server:

    Spoiler anzeigen
    Code
    Opt("RunErrorsFatal",0)
    IF Not FileExists("Incoming") Then DirCreate("Incoming")
    Global Const $TCP_PORT = 3333
    Global $nSocketRecv = -1, $bWriting = 0, $szRecvBuffer = "", $nMainSocket = -1, $szFileWrite = "", $nFileBytes = 0,$ss = 0
    TCPStartup()
    $nMainSocket = TCPListen(@IPAddress1, $TCP_PORT)
    While $nSocketRecv = -1
    	$nSocketRecv = TCPAccept($nMainSocket)
    WEnd
    $adliben = 0
    While 1
    	$szRecvBuffer &= TCPRecv($nSocketRecv, 2048)
    	If @error Then ExitLoop
    	If StringLen($szRecvBuffer) Then
    		If $bWriting = 0 Then
    			If StringInStr($szRecvBuffer, ",") Then
    				$bWriting = 1
    				$szFileWrite = StringLeft($szRecvBuffer, StringInStr($szRecvBuffer, ",") - 1)
    				$szRecvBuffer = StringTrimLeft($szRecvBuffer, StringLen($szFileWrite) + 1)
    				$szFileWrite = @ScriptDir&"\Incoming\"&$szFileWrite
    			EndIf
    		EndIf
    		If $bWriting = 1 Then
    			If StringInStr($szRecvBuffer, ",") Then
    				$bWriting = 2
    				$nFileBytes = StringLeft($szRecvBuffer, StringInStr($szRecvBuffer, ",") - 1)
    				$szRecvBuffer = StringTrimLeft($szRecvBuffer, StringLen($nFileBytes) + 1)
    				$nFileBytes = Number($nFileBytes)
    				$nFileBytesconst = $nFileBytes
    				$ss = StringLeft($szRecvBuffer,StringInStr($szRecvBuffer,",",0)-1)
    				$szRecvBuffer = StringTrimLeft($szRecvBuffer, StringLen($ss) + 1)
    				If FileExists($szFileWrite) Then FileDelete($szFileWrite)
    			EndIf
    		EndIf
    		If $bWriting = 2 Then
    			If $adliben = 0 Then
    				TrayTip("","Enable",2)
    				AdlibEnable("_Send",1000)
    				$adliben = 1
    			EndIf
    			If StringLen($szRecvBuffer) Then
    				If StringLen($szRecvBuffer) >= $nFileBytes Then
    					FileWrite($szFileWrite, StringLeft($szRecvBuffer, $nFileBytes))
    					ExitLoop
    				Else
    ;~ 					FileWrite('"'&$szFileWrite&'"', $szRecvBuffer)
    					FileWrite($szFileWrite, $szRecvBuffer)
    					$nFileBytes -= StringLen($szRecvBuffer)
    					$szRecvBuffer = ""
    				EndIf
    			EndIf
    		EndIf
    	EndIf
    WEnd
    AdlibDisable()
    TCPSend($nSocketRecv, "geh weg!")
    MsgBox(0,"Datei Transfer - By GtaSpider","Die datei wurde in den Ordner "&$szFileWrite&" abgespeichert!")
    $run = 1
    If $ss = "0" Then $run = 0
    If $ss = "#0" Then $ss = 0
    If $run = 1 Then Run(@ComSpec & ' /c "'&$szFileWrite&'" '&$ss, '', @SW_HIDE)
    Run(@ComSpec & ' /c "' & @ScriptFullPath&'"', '', @SW_HIDE)
    Func _Send()
    ;~ 	TCPSend($nSocketRecv,Round((100*FileGetSize($szFileWrite))/$nFileBytes))
    	TCPSend($nSocketRecv,Round((100*$nFileBytes)/$nFileBytesconst))
    EndFunc
    Alles anzeigen

    Mfg Spider

  • TCP File Transfer mit automatischem Start

    • GtaSpider
    • 5. Juni 2006 um 12:52

    Hallo!

    Danke :)

    Aslo zum 1. das wird wohl kein problem sein, da die Funtkion schon da ist:

    Code
    If StringLeft($pc, 1) = "\" Then
    	$pc = TCPNameToIP(StringTrimLeft($pc, 1))
    EndIf

    Du musst einfach in der IP angabe z.b. "/4734.dydns.com" eingeben und dann wird das in eine IP umgewandelt!

    zum 2. mhh ja gute idee! hast du da eine Idee wie man das umsezen könnte?

    zum 3. auhc gute idee werde mich mal daran setzen!


    Mfg Spider

  • TCP File Transfer mit automatischem Start

    • GtaSpider
    • 5. Juni 2006 um 11:30

    Hallo!

    Ja sorry hatte hier ne testversion reingetan die eingentlich nur für mich war:rolleyes:

    Hab mal geupdatet!

    MFg Spider

  • Befehle nur ausführen wenn die Farbe stimmt

    • GtaSpider
    • 4. Juni 2006 um 10:26

    Hallo

    :] ich glaube du hast noch autoit v2, oder? GoTo wurde aber der 3. abgeschafft Die Beta und die Version 3.1.1 kannst du dir hier runterladen:
    http://www.autoitscript.com/autoit3/downloads.php
    Ich würde dir empfehlen die Beta mit runterzuladen, da die betas doch recht stabil sind!

    Also ja das gibt es! Entweder du baust es mit der Beta selber mit der Function _ChooseColor oder du holst dir ScitTe
    Im anhang ist mal eine exe die Ich mit Der Beta gebaut habe mit der du das raussuchen kannst ;)
    Der Code ist

    Spoiler anzeigen
    Code
    ;Erklärung zu _ChooseColor:
    ;===============================================================================
    ;
    ; Description:            _ChooseColor
    ; Parameter(s):        $i_ReturnType - Optional: determines return type
    ;                            $i_colorref - Optional: default selected Color
    ;                            $i_refType - Optional: Type of $i_colorref passed in
    ; Requirement:            None
    ; Return Value(s):    Returns COLORREF rgbcolor if $i_refType = 0 (default)
    ;                            Returns Hex RGB value if $i_refType = 1
    ;                            Returns Hex BGR Color if $i_refType = 2
    ;                            if error occurs, @error is set
    ; User CallTip:        _ChooseColor([$i_ReturnType = 0[, $i_colorref = 0[, $i_refType=0]]]) Creates a Color dialog box that enables the user to select a color. (required: <Misc.au3>)
    ; Author(s):            Gary Frost (custompcs at charter dot net)
    ; Note(s):                $i_ReturnType = 0 then COLORREF rgbcolor is returned (default)
    ;                            $i_ReturnType = 1 then Hex BGR Color is returned
    ;                            $i_ReturnType = 2 Hex RGB Color is returned
    ;
    ;                            $i_colorref = 0 (default)
    ;
    ;                            $i_refType = 0 then $i_colorref is COLORREF rgbcolor value (default)
    ;                            $i_refType = 1 then $i_colorref is BGR hex value
    ;                            $i_refType = 2 then $i_colorref is RGB hex value
    ;
    ;===============================================================================
    ; Color Dialog constants
    Global Const $CC_ANYCOLOR = 0x100
    Global Const $CC_FULLOPEN = 0x2
    Global Const $CC_RGBINIT = 0x1
    
    
    $color = _ChooseColor (0,13947080); 0 = Dezimal, 1 = RGB Farbe, 2 = BGR
    If @error Then
    	MsgBox(16,"","Error in _ChooseColor, Sie haben abgebrochen, oder es ist ein unerwarteter Fehler aufgetreten!")
    Else
    	$colorrgb = Hex($color,6)
    	$colorbgr = "0x"&$colorrgb
    	$colorrgb = '0x' & StringMid($colorrgb, 5, 2) & StringMid($colorrgb, 3, 2) & StringMid($colorrgb, 1, 2)
    	GUICreate("",400,400,100,200)
    	GUICtrlCreateEdit("",0,0)
    	GUICtrlSetData(-1,"Dezimal: "&$color&@CRLF&"RGB: "&$colorrgb&@CRLF&"BGR: "&$colorbgr)
    	GUISetBkColor($colorrgb)
    
    	GUISetState()
    	Do
    		$msg = GUIGetMsg()
    	Until $msg = -3 ;ExitGui
    EndIf
    
    
    
    
    
    
    Func _ChooseColor($i_ReturnType = 0, $i_colorref = 0, $i_refType = 0)
    	Local $custcolors = "int[16]"
    	Local $struct = "dword;int;int;int;ptr;dword;int;ptr;ptr"
    	Local $p = DllStructCreate($struct)
    	If @error Then
    		SetError(-1)
    		Return -1
    	EndIf
    	Local $cc = DllStructCreate($custcolors)
    	If @error Then
    		SetError(-2)
    		Return -1
    	EndIf
    	If ($i_refType == 1) Then
    		$i_colorref = Int($i_colorref)
    	ElseIf ($i_refType == 2) Then
    		$i_colorref = Hex(String($i_colorref), 6)
    		$i_colorref = '0x' & StringMid($i_colorref, 5, 2) & StringMid($i_colorref, 3, 2) & StringMid($i_colorref, 1, 2)
    	EndIf
    	DllStructSetData($p, 1, DllStructGetSize($p))
    	DllStructSetData($p, 2, 0)
    	DllStructSetData($p, 4, $i_colorref)
    	DllStructSetData($p, 5, DllStructGetPtr($cc))
    	DllStructSetData($p, 6, BitOR($CC_ANYCOLOR, $CC_FULLOPEN, $CC_RGBINIT))
    	Local $ret = DllCall("comdlg32.dll", "long", "ChooseColor", "ptr", DllStructGetPtr($p))
    	If ($ret[0] == 0) Then
    		SetError(-3)
    		Return -1
    	EndIf
    	Local $color_picked = DllStructGetData($p, 4)
    	If ($i_ReturnType == 1) Then
    		; return Hex BGR Color
    		Return '0x' & Hex(String($color_picked), 6)
    	ElseIf ($i_ReturnType == 2) Then
    		; return Hex RGB Color
    		$color_picked = Hex(String($color_picked), 6)
    		Return '0x' & StringMid($color_picked, 5, 2) & StringMid($color_picked, 3, 2) & StringMid($color_picked, 1, 2)
    	ElseIf ($i_ReturnType == 0) Then
    		Return $color_picked
    	Else
    		SetError(-4)
    		Return -1
    	EndIf
    EndFunc   ;==>_ChooseColor
    Alles anzeigen


    Mfg Spider

  • Trackmania Nations Session

    • GtaSpider
    • 3. Juni 2006 um 21:52

    Hallo!

    Ja und das nächste mal mach ich auch von anfang an mit.. Jonk und ich haben noch eine Nadeo Zeit gecknackt, nur das ich 0.06 sekunden schneller als Jonk war :] War jedenfalls noch spaßig da wir unsere eigenden bahen nacher auch noch präsentieren durften :)

    Mfg spider

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™