Hallo SiroCool,
du kannst ja mit
[autoit]_GUICtrlListView_SetItemText
[/autoit]jedem einzelnen SubItem den Wert zuweisen. Ich finde die Idee gut,
mfg autoBert
Hallo SiroCool,
du kannst ja mit
[autoit]_GUICtrlListView_SetItemText
[/autoit]jedem einzelnen SubItem den Wert zuweisen. Ich finde die Idee gut,
mfg autoBert
Hallo meinnameisthase,
bei diesem Skript, wird das Bild skaliert so dass das Verhältnis Breite/Höhe gleich bleibt aber das Bild immer die Breite von ~ 617 Pixeln hat:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
$Form1 = GUICreate("Picture Viewer", 625, 443, -1, -1, -1, $WS_EX_TOOLWINDOW)
$Button1 = GUICtrlCreateButton("Öffnen...", 0, 416, 73, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
Global $p
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Pic1 = FileOpenDialog("Wählen Sie ein Bild.", @DesktopDir & "\", "(*.jpg;*.png)")
_GDIPlus_Startup()
$hImage = _GDIPlus_ImageLoadFromFile($Pic1)
$iWidth = _GDIPlus_ImageGetWidth($hImage)
$iHeight = _GDIPlus_ImageGetHeight($hImage)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_Shutdown()
Local $iRatio = $iWidth / $iHeight
ConsoleWrite("Orig.: " & $iWidth & " " & $iHeight & " " & $iRatio & @CRLF)
If $iRatio >= 1 Then
$iWidth = 617
$iHeight = $iWidth / $iRatio
Else
$iHeight = 417
$iWidth = $iHeight * $iRatio
EndIf
ConsoleWrite("New : " & $iWidth & " " & $iHeight & " " & $iRatio & @CRLF)
GUICtrlDelete($p)
$p = GUICtrlCreatePic($Pic1, 0, 0, $iWidth, $iHeight)
EndSwitch
WEnd
mfg autoBert
Hallo meinnameisthase,
dann teste einmal dieses Skript:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
$Form1 = GUICreate("Picture Viewer", 625, 443, -1, -1, -1, $WS_EX_TOOLWINDOW)
$Button1 = GUICtrlCreateButton("Öffnen...", 0, 416, 73, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
Global $p
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Pic1 = FileOpenDialog("Wählen Sie ein Bild.", @DesktopDir & "\", "(*.jpg;*.png)")
$hImage = _GDIPlus_ImageLoadFromFile($Pic1)
$iW = _GDIPlus_ImageGetWidth($hImage)
$iH = _GDIPlus_ImageGetHeight($hImage)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_Shutdown()
GUICtrlDelete($p)
$p = GUICtrlCreatePic($Pic1, 0, 0, $iW, $iH)
EndSwitch
WEnd
mfg autoBert
dazu herzliche Glückwünsche, weiterso und eine fette ![]()
Hallo Prrixma,
da du ja auch bei 00:xx Probleme bekommen würdest, schlage ich dir vor zuerst die Zeit zu ermitteln und davon mit der Func _DateAdd 1 Stunde abzuziehen. Dieses Ergebnis splittest du dann in Datum und Zeit (dazwischen ist ein Leerzeichen) und weisst die beiden Werte zu,
mfg autoBert
Hallo flo,
poste doch bitte dein komplettes lauffähiges Skript (Syntax) oder finde dich damit ab, dass es Programme gibt die etwas gegen das Fotografieren haben,
Edit: nachdem ich eine GUI und alle nötigen Includes eingefügt habe läuft es bei mir mit normalen Programmen korrekt:
#include <APIConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#Include <WinAPI.au3>
#Include <ScreenCapture.au3>
$sPicPath = @ScriptDir & "\screens"
If not FileExists($sPicPath) Then DirCreate($sPicPath)
#region - GUI Create
GUICreate('')
$Button2 = GUICtrlCreateButton("&Foto", 10, 10)
$Button1 = GUICtrlCreateButton("&Schliessen", 10, 50)
GUISetState()
#endregion - GUI Create
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Exit
Case $Button2
_getScreen($sPicPath & "\aktuellerscreen.jpg")
ShellExecute($sPicPath & "\aktuellerscreen.jpg")
Sleep(5000)
EndSwitch
WEnd
[/autoit] [autoit][/autoit] [autoit]Func _getScreen($sFileName)
If WinExists("Neue Antwort") Then
$hWnd = WinGetHandle("Neue Antwort")
WinActivate($hWnd)
_ScreenCapture_SetJPGQuality(50)
_ScreenCapture_CaptureWndV2($sFileName, $hWnd)
EndIf
EndFunc ;==>_getScreen
; #FUNCTION# ====================================================================================================================
; Name...........: _ScreenCapture_CaptureWndV2
; Description ...: Captures a screen shot of a specified window. This function is an alternative to '_ScreenCapture_CaptureWnd'.
; It is able to take screenshots of layered windows (drawn by the graphic card). See 'remarks' below.
; Syntax.........: _ScreenCapture_CaptureWndV2($sFileName, $hWnd[, $iLeft = 0[, $iTop = 0[, $iRight = -1[, $iBottom = -1[, $fCursor = True]]]]])
; Parameters ....: $sFileName - Full path and extension of the image file
; $hWnd - Handle to the window to be captured
; $iLeft - X coordinate of the upper left corner of the client rectangle
; $iTop - Y coordinate of the upper left corner of the client rectangle
; $iRight - X coordinate of the lower right corner of the rectangle
; $iBottom - Y coordinate of the lower right corner of the rectangle
; $fCursor - If True the cursor will be captured with the image
; Return values .: See remarks
; Remarks .......: 1/ If FileName is not blank this function will capture the screen and save it to file. If FileName is blank, this
; function will capture the screen and return a HBITMAP handle to the bitmap image. In this case, after you are
; finished with the bitmap you must call _WinAPI_DeleteObject to delete the bitmap handle. All coordinates are in
; client coordinate mode.
;
; 2.1/ Layered windows do not appear on screenshots taken by '_ScreenCapture_Capture' because it uses the desktop's
; handle whereas the layered windows are drawn directly by the graphic card. 2.2/ '_ScreenCapture_CaptureWnd'
; is a wrapper of '_ScreenCapture_Capture' and, therefore, has the same limitations. 2.3/ Instead,
; '_ScreenCapture_CaptureWndV2', THIS FUNCTION, is using the handle of the targetted window to perfom its task
; (in a similar way than '_ScreenCapture_Capture'uses the Desktop's handle).
;
; Author ........: Patryk Szczepankiewicz (pszczepa at gmail dot com)
; History .......: JAN 21, 2009 - Created
; OCT 18, 2010 - First release on the AutoIT forum
; OCT 28, 2010 - Cleaned the border code and fixed the capture of the cursor.
; APR 06, 2011 - Updated for AutoIT 3.3.6.1
; Related .......: _WinAPI_DeleteObject
; Link ..........; http://www.autoitscript.com/forum/index.php?showtopic=65008
; Example .......; No
; Credits .......: Based on Paul Campbell's '_ScreenCapture_Capture' function and inspired by Jennico's '_WinGetBorderSize'.
; ===============================================================================================================================
Func _ScreenCapture_CaptureWndV2($sFileName, $hWnd, $iLeft = 0, $iTop = 0, $iRight = -1, $iBottom = -1, $fCursor = True)
ConsoleWrite($sFileName & @CRLF)
Local $tRect
Local $iWndX, $iWndY, $iWndW, $iWndH
Local $tClient
Local $iBorderV, $iBorderT
Local $iPicHeight, $iPicWidth
Local $iPicCursorX, $iPicCursorY
Local $hDDC, $hCDC, $hBMP, $aCursor, $aIcon, $hIcon
[/autoit] [autoit][/autoit] [autoit]; Get the absolute coordinates of the window
$tRect = _WinAPI_GetWindowRect($hWnd)
; Get useful variables
$iWndX = DllStructGetData($tRect, "Left")
$iWndY = DllStructGetData($tRect, "Top")
$iWndW = DllStructGetData($tRect, "Right")
$iWndH = DllStructGetData($tRect, "Bottom")
; Assign automatic values: the right and bottom are computed as
; the width and height of the absolute coordinates of the window.
If $iRight = -1 Then $iRight = $iWndW - $iWndX
If $iBottom = -1 Then $iBottom = $iWndH - $iWndY
; Check user values: check that caller is not putting the top-left
; corner out of the window.
If $iLeft > $iWndW Then $iLeft = $iWndX
If $iTop > $iWndH Then $iTop = $iWndY
; Check user values: check that caller is not asking for a
; screenshot bigger than the window itelf.
If $iRight > $iWndW Then $iRight = $iWndW
If $iBottom > $iWndH Then $iBottom = $iWndH
; Compute the size of the final picture.
$iPicWidth = $iRight - $iLeft
$iPicHeight = $iBottom - $iTop
; Compute the borders sizes
$tClient = _WinAPI_GetClientRect($hWnd)
$iBorderV = (($iWndW - $iWndX) - DllStructGetData($tClient, "Right")) / 2
$iBorderT = ($iWndH - $iWndY) - DllStructGetData($tClient, "Bottom") - $iBorderV
; Transfert color data
$hDDC = _WinAPI_GetDC($hWnd)
$hCDC = _WinAPI_CreateCompatibleDC($hDDC)
$hBMP = _WinAPI_CreateCompatibleBitmap($hDDC, $iPicWidth, $iPicHeight)
_WinAPI_SelectObject($hCDC, $hBMP)
_WinAPI_BitBlt($hCDC, 0, 0, $iPicWidth, $iPicHeight, $hDDC, $iLeft - $iBorderV, $iTop - $iBorderT, $SRCCOPY)
; Add the cursor on the screenshot
If $fCursor Then
$aCursor = _WinAPI_GetCursorInfo()
If $aCursor[1] Then
$hIcon = _WinAPI_CopyIcon($aCursor[2])
$aIcon = _WinAPI_GetIconInfo($hIcon)
$iPicCursorX = $aCursor[3] - $aIcon[2] - $iWndX - $iLeft
$iPicCursorY = $aCursor[4] - $aIcon[3] - $iWndY - $iTop
_WinAPI_DrawIcon($hCDC, $iPicCursorX, $iPicCursorY, $hIcon)
EndIf
EndIf
; Clean and save data
_WinAPI_ReleaseDC($hWnd, $hDDC)
_WinAPI_DeleteDC($hCDC)
If $sFileName = "" Then Return $hBMP
_ScreenCapture_SaveImage($sFileName, $hBMP)
EndFunc ;==>_ScreenCapture_CaptureWndV2
[/autoit]siehe
mfg autoBert
Hast du es denn schon mit der FF.au3 probiert?
Hallo sc4ry.
genau wie vorher. Er einzigste Unterschied ist bei Verwendung von Select Name, Street FROM db Where ...) dass du selbst nach einfügen einer Spalte in die Tabelle die Indices des Arrays aRow nicht mehr anpassen musst da ja jetz immer Name und Street zurückgegeben werden alle anderen Spalten der Tabelle werden ignoriert.
mfg autoBert
Hallo ,
herzlich willkommen im Forum und viel Spass mit AutoIt.
Hier kannst du dir die deutsche Hilfe herunterladen.
Hier gibt es ein AutoIt-Tutorial: http://wiki.autoit.de/wiki/index.php/TutorialSehr hilfreich ist auch das Buch von peethebee
und jetzt zu deiner Frage du kannst Chr(9) nehmen um es zu splitten.
[autoit]#include <Array.au3>
$sTest ="Dies ist die 1.Zeile eines Tests."
$aSplit = StringSplit($sTest,Chr(9))
_ArrayDisplay($aSplit)
oder das Makro @Tab
[autoit]#include <Array.au3>
$sTest ="Dies ist die 1.Zeile eines Tests."
$aSplit = StringSplit($sTest,@TAB)
_ArrayDisplay($aSplit)
wie Schnitzel schon vorschlug,
mfg autoBert
EDIT: okay habe es geschafft
schön, dann ist dein Problem ja gelöst, schön wäre es allerdings auch wenn du den Thread auf gelöst setzt. Einfach 1. Beitrag bearbeiten, Präfix (nähe Überschrift) ändern und speichern (absenden)
mfg autoBert
Der Link zu dieser _FilePrint-UDF wäre interessant, vielleicht kann man sie ja an deine Bedürfnisse anpassen.
mfg autoBert
deine Lösung funktioniert doch:
[autoit]$download = "http://translation.autoit.de/autoitinfo/hilfedateien/AutoIt-Hilfe-Deutsch-3.3.6.1-Stand-07_09_10.zip"
$upath = @ScriptDir & "\AutoIt-Hilfe-Deutsch-3.3.6.1-Stand-07_09_10.zip"
ProgressOn("Test", "Test2")
$get = InetGet($download, $upath, 1, 1)
Do
Sleep(10)
$iPercent = Round(InetGetInfo($get, 0) / InetGetInfo($get, 1), 2) * 100
ProgressSet($iPercent, $iPercent & " %")
Until InetGetInfo($get, 2) ; Check if the download is complete.
ProgressOff()
du kannst dir auch [Beispiel] Gesamtfortschritt mehrer Downloads anzeigen anschauen, da benutze ich anstatt eines Progressbarfensters 2 Progressbars in einer Gui,
mfg autoBert
Hallo White,
herzlich willkommen im Forum und viel Spass mit AutoIt.
Hier kannst du dir die deutsche Hilfe herunterladen.
Hier gibt es ein AutoIt-Tutorial: http://wiki.autoit.de/wiki/index.php/TutorialSehr hilfreich ist auch das Buch von peethebee .
mfg autoBert
Alles anzeigenBin grad zufälligerweise auf HotKeySet gestoßen, wie macht man das wenn man a drückt, das Script schreibt [ICQ - JimBim] - a schreibt?
[autoit]
bin soweit:HotKeySet("{F9}", "Ende")
[/autoit] [autoit][/autoit] [autoit]HotKeySet("{a}", "PressA")
[/autoit] [autoit][/autoit] [autoit]Func Ende()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
Tooltip ("Test", 800, 15, "Test beendet.")
sleep (1000)
Exit
EndFuncWhile 1
[/autoit] [autoit][/autoit] [autoit]
sleep(5)
WendFunc PressA()
[/autoit]
$win=WinGetHandle("")
$title=WinGetTitle($win)
$von=@hour&":"&@MIN
Do
Until Not WinActive($win)
$bis=@hour&":"&@MIN
FileWriteLine("Test.txt",$von&" - "&$bis&@TAB&$title)
FileWrite ("Test.txt","a")
EndFunc
Das liest sich für mich wie wenn du die Gewohnheiten eines anderen ausspionieren wolltest, in dem du die Zeiten mitloggst wann ein bestimmtes Programm benutzt wird. Bezweifle dass dies mit den Forenregeln kompatibel ist,
mfg autoBert
Hallo schlimm23,
herzlich willkommen im Forum und viel Spass mit AutoIt.
Hier kannst du dir die deutsche Hilfe herunterladen.
Hier gibt es ein AutoIt-Tutorial: http://wiki.autoit.de/wiki/index.php/TutorialSehr hilfreich ist auch das Buch von peethebee
und jetzt zu deiner Frage: du hast ein EndIf vergessen, das Skript muss so aussehen:
#include <Misc.au3>
$dll = DllOpen("user32.dll")
While 1
If _IsPressed("6A", $dll) Then
While 1
Send("{F1}")
Send("{F2}")
While 1
[/autoit] [autoit][/autoit] [autoit]$var = PixelGetColor(855, 174)
If $var = 0 Then
Sleep(3000)
;MsgBox(0,"The decmial color is", $var)
Send("{SPACE}")
Sleep(4500)
EndIf
WEnd
WEnd
EndIf ;<================ Diese End If hat gefehlt
WEnd
DllClose($dll)
wenn du deinen Skriptcode dem Syntax entsprechend ein- und ach wieder ausrückst fäll dassleichter auf. Du kannst auch das Tidy-Tool von Scite benutzem (CTRL-T) das erledigt dies für dich bzw. zeigt dir Fehler an.
mfg autoBert
Hallo Button421,
ich würde es so lösen:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ListViewConstants.au3>
;----------------------------------HOME-------------------------------------------------------
$hFrmHome = GUICreate("Arduino Tools 1.2", 627, 443, 192, 124)
;$background =
GUICtrlCreatePic(@ScriptDir & "\Images\computer_0014.jpg", 0, 0, 625, 441, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
GUICtrlSetState(-1, $GUI_DISABLE)
;$was =
GUICtrlCreateLabel("Was möchten sie tun?", 176, 24, 257, 33, $SS_SUNKEN)
GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0x00FF00)
$idBtnComandRef = GUICtrlCreateButton("&Befehlsreferenz", 8, 136, 249, 41, $WS_GROUP)
GUICtrlSetTip(-1, "Zeigt eine Referenz aller Grundbefehle an")
$idBtnShowCharCreator = GUICtrlCreateButton("LCD-Charakter-&Creator", 10, 191, 249, 41, $WS_GROUP)
GUICtrlSetTip(-1, "Damit können sie einen LCD-Charakter selbst erstellen")
$idBtnArduinoHP = GUICtrlCreateButton("Arduino-&Homepage", 8, 248, 249, 41, $WS_GROUP)
GUICtrlSetTip(-1, "Blättern sie in vielen Schaltungsbildern!")
$idBtnInfoHelp = GUICtrlCreateButton("&Info/ Hilfe", 8, 384, 177, 49, $WS_GROUP)
$idBtnExit = GUICtrlCreateButton("Be&enden", 400, 384, 217, 49, $WS_GROUP)
GUISetState(@SW_SHOW)
;----------------------------------------------------------------------------------------------
;--------------------------------BEFEHLSREFERENZ-----------------------------------------------
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=
$hFrmComandRef = GUICreate("Arduino Tools - Befehlsreferenz", 627, 444, 192, 124)
;$background =
GUICtrlCreatePic(@ScriptDir & "\Images\computer_0014.jpg", 0, 0, 625, 441, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
GUICtrlSetState(-1, $GUI_DISABLE)
;$das1 =
GUICtrlCreateLabel("Befehlsreferenz", 216, 24, 188, 33, $SS_SUNKEN)
GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0x00FF00)
$idLVComannds = GUICtrlCreateListView("Befehl", 8, 64, 241, 369)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 237)
Global $idLVItemComand[15]
$idLvItemComand[0] = GUICtrlCreateListViewItem("int", $idLVComannds)
$idLvItemComand[1] = GUICtrlCreateListViewItem("LiquidCrystal", $idLVComannds)
$idLvItemComand[2] = GUICtrlCreateListViewItem("void setup()", $idLVComannds)
$idLvItemComand[3] = GUICtrlCreateListViewItem("void loop()", $idLVComannds)
$idLvItemComand[4] = GUICtrlCreateListViewItem("tone", $idLVComannds)
$idLvItemComand[5] = GUICtrlCreateListViewItem("lcd.begin()", $idLVComannds)
$idLvItemComand[6] = GUICtrlCreateListViewItem("lcd.setCursor()", $idLVComannds)
$idLvItemComand[7] = GUICtrlCreateListViewItem("lcd.print()", $idLVComannds)
$idLvItemComand[8] = GUICtrlCreateListViewItem("lcd.noBlink()", $idLVComannds)
$idLvItemComand[9] = GUICtrlCreateListViewItem("lcd.noCursor", $idLVComannds)
$idLvItemComand[10] = GUICtrlCreateListViewItem("digitalWrite()", $idLVComannds)
$idLvItemComand[11] = GUICtrlCreateListViewItem("delay()", $idLVComannds)
$idLvItemComand[12] = GUICtrlCreateListViewItem("pinMode()", $idLVComannds)
$idLvItemComand[13] = GUICtrlCreateListViewItem("Serial.begin()", $idLVComannds)
$idLvItemComand[14] = GUICtrlCreateListViewItem("Serial.print()", $idLVComannds)
$idEdtReference = GUICtrlCreateEdit("", 280, 64, 337, 369)
GUICtrlSetData(-1, "<---- Bitte links Befehl auswählen!")
$idBtnBackToHomeFromCCFromCF = GUICtrlCreateButton("&Zurück", 536, 0, 89, 25, $WS_GROUP)
GUISetState(@SW_HIDE)
#endregion ### END Koda GUI section ###
;----------------------------------------------------------------------------------------------
;-------------------------------LCD-CHARAKTER-CREATOR------------------------------------------
$hFrmCharCreator = GUICreate("Arduino Tools - LCD-Charakter-Creator", 627, 442, 192, 124)
;$background =
GUICtrlCreatePic(@ScriptDir & "\Images\computer_0014.jpg", 0, 0, 625, 441, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
GUICtrlSetState(-1, $GUI_DISABLE)
;$das2 =
GUICtrlCreateLabel("LCD-Charakter-Creator", 176, 16, 272, 33, $SS_SUNKEN)
GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0x00FF00)
Global $aBit[5][8]
Global $aBitPics[5][8]
for $i = 0 to 4
for $j = 0 to 7
$aBitPics[$i][$j] = GUICtrlCreatePic(@ScriptDir & "\Images\lcddeactiv.bmp", 16+ $i*38, 80+$j*40, 33, 33)
Next
Next
$idBtnBackToHomeFromCC = GUICtrlCreateButton("&Zurück", 536, 0, 89, 25, $WS_GROUP)
$script = GUICtrlCreateEdit("", 304, 80, 313, 353, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN))
GUICtrlSetData(-1, StringFormat("#include <LiquidCrystal.h>\r\n\r\nLiquidCrystal lcd(12,11,10,5,4,3,2);\r\n\r\nbyte myChar[8] =\r\n{\r\n B00000,\r\n B00000,\r\n B00000,\r\n B00000,\r\n B00000,\r\n B00000,\r\n B00000,\r\n B00000\r\n};\r\n\r\nvoid setup()\r\n{\r\n lcd.createChar(0, myChar);\r\n lcd.begin(16,2);\r\n lcd.write(0);\r\n}\r\n\r\nvoid loop() {}"))
GUISetState(@SW_HIDE)
;----------------------------------------------------------------------------------------------
While 1
$nMsg = GUIGetMsg(1)
Switch $nMsg[1] ;von welchem Fnster kommt die Message?
Case $hFrmHome ;Message des Hauptfensters
Switch $nMsg[0]
Case $GUI_EVENT_CLOSE, $idBtnExit
Exit
Case $idBtnShowCharCreator
GUISetState(@SW_SHOW, $hFrmCharCreator)
GUISetState(@SW_DISABLE, $hFrmHome)
Case $idBtnComandRef
GUISetState(@SW_SHOW, $hFrmComandRef)
GUISetState(@SW_DISABLE, $hFrmHome)
Case $idBtnArduinoHP
ShellExecute("http://arduino.cc/")
Case $idBtnInfoHelp
MsgBox(64, "Info/Hilfe", "Zuerst wählen sie ein Menüpunkt aus! Klicken sie auf ""Befehlsreferenz"" um eine vollständige Referenz für alle Grundbefehle zu erhalten! Klicken sie auf ""LCD-Charakter-Creator"", um einen eigenen LCD-Charakter zu erstellen. Der Quellcode wird rechts angezeigt." & @CRLF & "" & @CRLF & "created by button421 on autoit.de!")
EndSwitch
Case $hFrmComandRef
Switch $nMsg[0]
Case $idBtnBackToHomeFromCCFromCF, $GUI_EVENT_CLOSE
GUISetState(@SW_HIDE, $hFrmComandRef)
GUISetState(@SW_ENABLE, $hFrmHome)
WinActivate($hFrmHome)
EndSwitch
Case $hFrmCharCreator
Switch $nMsg[0]
Case $idBtnBackToHomeFromCC, $GUI_EVENT_CLOSE
GUISetState(@SW_HIDE, $hFrmCharCreator)
GUISetState(@SW_ENABLE, $hFrmHome)
WinActivate($hFrmHome)
Case $aBitPics[0][0] to $aBitPics[4][7]
$id = $nMsg[0]-$aBitPics[0][0]
$iRow = int($id/8)
$iCol = mod($id,8)
if $aBit[$iRow][$iCol] Then
GUICtrlSetImage($aBitPics[$iRow][$iCol],@ScriptDir & "\Images\lcddeactiv.bmp")
Else
GUICtrlSetImage($aBitPics[$iRow][$iCol],@ScriptDir & "\Images\lcdactiv.bmp")
EndIf
$aBit[$iRow][$iCol] = not $aBit[$iRow][$iCol]
EndSwitch
EndSwitch
WEnd
Ich habe gleichzeitig auf GuiGetMsg mit Extended-Parameter umgestellt, das solltest du dir also in der Hilfe durchlesen. Ausserdem die Befehle Int und Mod auch in der Hilfe nachlesen. Und da das ganze jetzt mit Array realisiert ist solltest du auch Literatr zu Arrays lesen z.B. das Array-Tut aus BugFix Signatur obwohl ich befürchte dass dies noch zu schwer für dich ist.
Dass ich die Variablen zum Teil umbenannt hatte liegt daran dass es so (zumindest für mich) deutlich einfacher lesbar wird.
Edit: Das Array aBit von 1 D auf 2 D umgestellt. Könnte im weiteren Projektverlauf nützlich sein.
mfg autoBert
Hallo scheilo,
ich habe einmal das Beispiel von autoitscript erweitert:
[autoit#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
$hGUI = GUICreate("$WS_EX_CONTEXTHELP ----------------------------------> CLICK ?", 400, 300, -1, -1, $WS_SYSMENU, $WS_EX_CONTEXTHELP)
$idInpName = GUICtrlCreateInput("Name", 10, 10)
$idInpStrasse = GUICtrlCreateInput("Strasse", 10, 35)
$idInpOrt = GUICtrlCreateInput("Ort", 10, 60)
$idbtnOK = GUICtrlCreateButton("&OK", 10, 90)
GUIRegisterMsg($WM_SYSCOMMAND, "help")
GUISetState()
$bHelp = False
While 1
Switch GUIGetMsg()
Case $idInpName
MsgBox(0, "Normale Aktion", "zu Name aufrufen")
Case $idInpStrasse
MsgBox(0, "Normale Aktion", "zu Strasse aufrufen")
Case $idInpOrt
MsgBox(0, "Normale Aktion", "zu Ort aufrufen")
Case $idbtnOK
MsgBox(0, "Normale Aktion", "zu OK aufrufen")
Case $GUI_EVENT_CLOSE
Exit
Case $bHelp = True
While 1
$bHelp = False
$MouseData = GUIGetCursorInfo()
If $MouseData[2] = 1 Then
Switch $MouseData[4]
Case $idInpName
MsgBox(0, "Hilfe", "zu Name aufrufen")
Case $idInpStrasse
MsgBox(0, "Hilfe", "zu Strasse aufrufen")
Case $idInpOrt
MsgBox(0, "Hilfe", "zu Ort aufrufen")
Case $idbtnOK
MsgBox(0, "Hilfe", "zu OK aufrufen")
EndSwitch
ExitLoop
EndIf
WEnd
EndSwitch
WEnd
Func help($hWnd, $Msg, $wParam, $lParam)
If $wParam = 0xF180 Then $bHelp = True
Return $GUI_RUNDEFMSG
EndFunc ;==>help[/autoit]
mfg autoBert
Hallo schello,
herzlich willkommen im Forum und viel Spass mit AutoIt.
Hier kannst du dir die deutsche Hilfe herunterladen.
Hier gibt es ein AutoIt-Tutorial: http://wiki.autoit.de/wiki/index.php/TutorialSehr hilfreich ist auch das Buch von peethebee
mfg autoBert
Hi BugFix,
habe erst jetzt dein Antwort gelesen. War ich blind oder?
Vielen Vielen DankGruss Oxi
Und vor allem wäre es konsequent gewesen diesen Post auc gleich mit auf gelöst zu setzen.
mfg autoBert
Es ist auch irgendwie sinnlos darüber noch weiter zu diskutieren, da könnten wir genauso gut darüber reden, ob es einen Gott gibt oder nicht.
Da kommt man nämlich nie zu einem Schluss.
Und ich dachte er nennt sich in diesem Forum peethebee
mfg autoBert