Funzt jetzt! ![]()
Gruß,
UEZ
Funzt jetzt! ![]()
Gruß,
UEZ
Bei mir sturzt dein Skript ab: AutoIT3.exe ended.rc:-1073741819 (FFFFFFFFC0000005)
Gruß,
UEZ
Not ist ein boolescher Operator, d.h. wahr oder falsch bzw. nicht wahr oder nicht falsch.
Du kannst damit nicht prüfen, ob z.B. eine Zahl größer ist als eine andere.
Gruß,
UEZ
Vielleicht hilft dir die SAP UDF: http://www.autoitscript.com/forum/topic/86574-sap-udf
Gruß,
UEZ
Führe ScriptomaticV2.hta aus, warte ein bissl und schaue unter WMI Class nach, ob dort irgendwo was von DHCP steht.
Wenn ja, kann man das Ganze auch in AutoIt coden, falls die Infos brauchbar sind.
Gruß,
UEZ
Kannst du per WMI die DHCP Informationen lesen?
Gruß,
UEZ
Auf den Servern, wo ein DHCP Dienst läuft, läuft's ohne Probleme.
Auf Workstation habe ich noch nie getestet.
Gruß,
UEZ
Du kannst mit dem CMD Befehl: netsh DHCP server dump dir die DHCP Konfig ausgeben lassen. Per STDIN kannst du den Stream einlesen und nach den gesuchten Zeilen schauen.
Add Optiondef 66 "Boot Server Host Name" STRING 0 comment="TFTP boot server host name"
Add Optiondef 67 "Bootfile Name" STRING 0 comment="Bootfile Name"
Ich hoffe, dass hilft dir ein bissl weiter.
Gruß,
UEZ
Probiere mal das hier aus:
;coded by Großvater
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
Const $IMAGE_BITMAP = 0x0000
Const $STM_SETIMAGE = 0x0172
Const $STM_GETIMAGE = 0x0173
GUICreate("Dummy")
$au3path = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir")
$Pic = $au3path & "\Examples\GUI\msoobe.jpg"
$idPIC = GUICtrlCreatePic($Pic, 0, 0, 198, 18)
$hBitmap = GUICtrlSendMsg($idPIC, $STM_GETIMAGE, $IMAGE_BITMAP, 0)
$aR = DllCall("Gdi32.dll", "Handle", "CreatePatternBrush", "Handle", $hBitmap)
$hBrush = $aR[0]
$hGUI = GUICreate("Test", 400, 100)
$idINP = GUICtrlCreateInput("", 20, 20, 200, 20)
$hINP = GUICtrlGetHandle($idINP)
$InputColor = 0xFFFFFF
GUICtrlCreateInput("", 20, 60, 200, 20)
[/autoit] [autoit][/autoit] [autoit]GUIRegisterMsg($WM_CTLCOLOREDIT, "ColorInput")
If @OSBuild > 5999 Then GUIRegisterMsg($WM_ERASEBKGND, "WM_ERASEBKGND")
GUISetState()
[/autoit] [autoit][/autoit] [autoit]While True
$Msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
DllCall("Gdi32.dll", "BOOL", "DeleteObject", "Handle", $hBrush)
Exit
EndSwitch
WEnd
Func ColorInput($hWnd, $iMsg, $wParam, $lParam)
If $lParam = $hINP Then
DllCall("Gdi32.dll", "UINT", "SetTextColor", "Handle", $wParam, "UInt", $InputColor)
DllCall("Gdi32.dll", "Int", "SetBkMode", "Handle", $wParam, "Int", 1)
Return $hBrush
EndIf
Return $GUI_RUNDEFMSG
EndFunc
Func WM_ERASEBKGND($hWnd, $iMsg, $wParam, $lParam)
_WinAPI_RedrawWindow($hGUI, "", "", BitOR($RDW_INVALIDATE, $RDW_UPDATENOW))
Return 1
EndFunc
Gruß,
UEZ
Stimmt!
Ich habe nicht genau hingesehen!
Gruß,
UEZ
Ich habe weder in meiner WinXP VM noch unter Win7 x64 das Problem!
Gruß,
UEZ
Stimmt, jetzt sehe ich was.
Vielleicht sollte man das Ganze in Blau Tönen darstellen, damit es wie Wolken aussieht!
Gruß,
UEZ
Klasse Beispiel Großvater ![]()
Gruß,
UEZ
Alles anzeigenNeue Funktion:
//Edit: Musste ich leider entfernen, da iwo der Speicher nicht wieder freigegeben wurde. --> nach ein paar min hat man eine Ram Überlastung.
//Edit2: Fehler gefunden. ein dc wurde nur freigegeben statt gelöscht.Arbeitet nun auch korrekt mit Helligkeiten.
Man hat 255 Abstufungen. von 0 = Schwarz bis 255 = weiß.Da ich leider keine Ordentliche Interpolation per StretchBlt hinbekomme
( _WinAPI_SetStretchBltMode kann _GDIPlus_GraphicsSetInterpolationMode iwie nicht ersetzen)
ist das Ganze leider etwas ausgebremst.Zudem macht das Vergrößern immer nur nach rechts unten vergrößern und die obere Linke Ecke bleibt gleich.
Dadurch muss man einen Rand verwenden der 1/3 der Bildbreite ausmacht. (also 1/6 an jeder seite) und den später abschneiden.
Auch das verlangsamt natürlich alles noch einmal.Im Endeffekt kommt man aber auch annehmbare Zeiten:
200x200 - 950 ms - 42px/ms
400x400 - 3.820ms - 41.5px/ms
600x600 - 8.454ms - 42.58px/ms
Ich sehe "nur" ein schwarzes Bild und unten die Schrift mit den Angaben. Ist das normal?
Gruß,
UEZ
Hier eine Version, um aus SciTE zu kompilieren:
[autoit]
#AutoIt3Wrapper_Run_Before=del /f /q "%scriptfile%_x64.exe"
#AutoIt3Wrapper_Run_Before=del /f /q "%scriptfile%_x86.exe"
#AutoIt3Wrapper_Run_Before=""%autoitdir%\aut2exe\aut2exe.exe" /in "%in%" /out "%scriptdir%\%scriptfile%_x64.exe" /nopack /x64"
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Run_After=ren "%out%" "%scriptfile%_x86.exe"
...
Gruß,
UEZ
Das klappt bei mir ohne Probleme:
Test System: Win7x64 Englisch:
"c:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2exe.exe" /in "C:\temp\test.au3" /out "C:\temp\test.exe" /icon "C:\Program Files (x86)\AutoIt3\Aut2Exe\Icons\AutoIt_Old1.ico"
Auf WinXP Ger:
c:\Programme\AutoIt3\Aut2Exe\Aut2exe.exe /in c:\AutoIt\Test01.au3 /out c:\AutoIt\Test01.exe /icon c:\Programme\AutoIt3\Aut2Exe\Icons\AutoIt_Old1.ico
Gruß,
UEZ
Nächster Versuch! Hier ein Mischmasch aus den beiden Versionen!
#include <GUIConstantsEx.au3>
#include <SendMessage.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
HotKeySet("{ESC}", "_Exit")
Global Const $SC_DRAGMOVE = 0xF012
[/autoit] [autoit][/autoit] [autoit]$hGUI = GUICreate("Test", 82, 34, -1, -1, $WS_POPUP, $WS_EX_LAYERED)
GUISetBkColor(0xFEDCBA, $hGUI)
$pic1 = GUICtrlCreatePic("back1.jpg", 0, 0, 78, 14)
GUICtrlSetState(-1, $GUI_DISABLE)
$pic2 = GUICtrlCreatePic("back2.jpg", 0, 18, 78, 14)
GUICtrlSetState(-1, $GUI_DISABLE)
$hGUI_Child = GUICreate("", 82, 32, 0, 0, $WS_POPUP, $WS_EX_MDICHILD +$WS_EX_LAYERED, $hGUI)
GUICtrlSetBkColor($hGUI_Child, 0xABCDEF)
$Input1 = GUICtrlCreateInput("", 0, 0, 82, 16)
GUICtrlSetOnEvent(-1, "_1")
GUICtrlSetFont($Input1, 8, 800, 0, "Tahoma")
GUICtrlSetBkColor($Input1, 0xABCDEF)
$Input2 = GUICtrlCreateInput("", 0, 18, 82, 16)
GUICtrlSetOnEvent(-1, "_2")
GUICtrlSetFont($Input2, 8, 800, 0, "Tahoma")
GUICtrlSetBkColor($Input2, 0xABCDEF)
_WinAPI_SetLayeredWindowAttributes($hGUI, 0xFEDCBA)
_WinAPI_SetLayeredWindowAttributes($hGUI_Child, 0xABCDEF)
GUISetState(@SW_SHOW, $hGUI_Child)
GUISetState(@SW_SHOW, $hGUI)
WinActivate($hGUI_Child)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
While Sleep(10000)
WEnd
Func _1()
Local $Input_1_Text = GUICtrlRead($Input1)
GUICtrlSetData($Input1, "")
MsgBox(0, "", "1: " & "''" & $Input_1_Text & "''")
EndFunc
Func _2()
Local $Input_2_Text = GUICtrlRead($Input2)
GUICtrlSetData($Input2, "")
MsgBox(0, "", "2: " & "''" & $Input_2_Text & "''")
EndFunc
Func _Exit()
GUIDelete($hGUI)
Exit
EndFunc
Gruß,
UEZ
Ich verstehe nicht ganz genau, was du machen willst! Willst du 2 Input Felder haben, die durchsichtig sind, so dass der Hintergrund sichtbar ist?
Falls ja, dann probiere mal dies:
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
$hGUI = GUICreate("Test", 229, 44, -1, -1, $WS_POPUP, $WS_EX_TOPMOST+ $WS_EX_LAYERED)
$Input1 = GUICtrlCreateInput("", 0, 0, 229, 21)
GUICtrlSetFont($Input1, 9, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor($Input1, 0xABCDEF)
$Input2 = GUICtrlCreateInput("", 0, 23, 229, 21)
GUICtrlSetFont($Input2, 9, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor($Input2, 0xABCDEF)
GUISetState(@SW_SHOW, $hGUI)
_WinAPI_SetLayeredWindowAttributes($hGUI, 0xABCDEF)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUIDelete($hGUI)
Exit
EndSwitch
WEnd
Gruß,
UEZ
Ersetze mal in deinem Code vom ersten Beitrag die Zeilen 15-19 mit
[autoit]
;Transparente GUI erstellen
$hDummy = GUICreate("") ; Dummy GUI, damit richtiges nicht in Taskleiste auftaucht.
$hGUI = GUICreate("", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST,$WS_EX_TRANSPARENT),$hDummy)
GUISetBkColor(0x0, $hGUI)
_WinAPI_SetLayeredWindowAttributes($hGUI, 0x0, 255)
Gruß,
UEZ
Probiere es mal damit:
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
$hGUI = GUICreate("Test", 615, 438)
[/autoit] [autoit][/autoit] [autoit]$pic = GUICtrlCreatePic("raster_pink.bmp", 56, 64, 329, 21)
GUICtrlSetState(-1, $GUI_DISABLE)
$hGUI_Child = GUICreate("Test", 329, 21, 56, 64, $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_MDICHILD + $WS_EX_LAYERED, $hGUI)
GUICtrlSetBkColor($hGUI_Child, 0xABCDEF)
$Input1 = GUICtrlCreateInput("", 0, 0, 329, 21, $WS_BORDER)
GUICtrlSetFont($Input1, 9, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor($Input1, 0xABCDEF)
GUISetState(@SW_SHOW, $hGUI_Child)
GUISetState(@SW_SHOW, $hGUI)
_WinAPI_SetLayeredWindowAttributes($hGUI_Child, 0xABCDEF)
WinActivate($hGUI_Child)
[/autoit] [autoit][/autoit] [autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Gruß,
UEZ