GDI+ - Punkte + Hotkeys SciTE

  • Hallo alle zusammen!

    Ich habe folgenden Skriptausschnitt geschrieben:

    [autoit]

    For $x = 0 To Ceiling($Form_Background_Size[0] / 10)
    For $y = 0 To Ceiling($Form_Background_Size[1] / 10)
    _GDIPlus_GraphicsDrawRect($Form_Background_Graphic, $x * 10, $y * 10, 1, 1)
    ;~ _GDIPlus_GraphicsDrawLine($Form_Background_Graphic, $x * 10, $y * 10, $x * 10 + 1, $y * 10, $Form_Background_Pen)
    Next
    Next

    [/autoit]


    Problem: Will ich die Punkte auf 1*1 Pixel machen, funzt gar nichts...
    Was muss ich tun ?(

    Und noch eine Frage: Wo finde ich eine List mit allen Hotkeys in SciTE?

    Dankeschön schon im Voraus! :thumbup:

    MatthiasG.

  • Wo finde ich eine List mit allen Hotkeys in SciTE?

    In der Hilfe zu Scite steht das hier:


    • Customized Syntax highlighting.
    • AutoComplete AutoIt3 commands automatically (suggest the option in a
      dropdownbox while typing), just hit ENTER or TAB to Autocomplete.)
    • AutoComplete anything already in the script, like variable and Func names,
      with Ctrl+Enter.
    • Intellisense (Show a ToolTip with the parameter expected in the selected
      function).
    • Code folding for easy code viewing.
    • Auto indentation while typing.
    • F1 - open Helpfile on the keyword were the cursor
      is located.
    • Alt+F1 - open the Beta Helpfile on the keyword
      were the cursor is located.
    • Shift+F1 will bring up a Popup screen showing all AutoIt3
      functions. Just Double-Click or Enter on the function you need and it will be pasted back
      into your script. It Also has a dynamic Help facility!
    • Ctrl+F1 - open this Helpfile.
    • Ctrl+1 - open SciTEConfig.exe program to change the Font/Color
      setting used by SciTE.
    • F5 - Run Tylo's Au3Check and when no
      errors/warnings found run AutoIt3.exe.
    • Alt+F5 - Run BETA versions of Tylo's Au3Check and
      when no errors/warnings found run AutoIt3.exe.
    • Ctrl+F5 - Run Tylo's SyntaxCheck with the latest
      Production definitions, showing all Syntax errors and possible
      issues with variable declarations. (See details)
    • Ctrl+Alt+F5 - Run Tylo's SyntaxCheck with the latest
      Beta definitions, showing all Syntax errors and possible issues
      with variable declarations. (See
      details
      )
    • Alt+F6 - Run Larry's AU3Recorder to record clicks and keystrokes and write
      this into your AutoIt Script.
    • Ctrl+F6 - Run Larry's AU3_Spy
      program
      to detect the Text and Names of controls on the program windows.
    • F7 - Build: Run Tylo's Au3Check and when no
      errors/warnings found run AU3EXE.
    • Alt+F7 - Build: Run
      BETA version of Tylo's Au3Check and when no errors/warnings found run AU3EXE.
    • Ctrl+F7 - AutoIt3Wrapper: Build (compile) your script with
      Options to change Compiler version, ICON, Passphrase or compression,
      Update Resource info of the target program like Program version etc.
      Optional
      run Tylo's AU3Check before compiling the source and running other programs
      Before or After compilation..
    • Ctrl+T will run Tidy.exe (included in this install) to auto indent and
      Tidy your AutoIt3 source file.
    • Alt+W will run
      CodeWizard.exe
      which assists you in creating MsgBox, InputBox() and more.
    • Alt+M will run Koda formdesigner wrtten by
      Lookfar and Lazycat, another tool to create a GUI.
    • Alt+A - Run VoSs2o0o's
      AutoItMacroGenerator
      ...Another recorder for script.
    • Ctrl+Alt+s will Run the Snippet holder .
    • Several LUA scripts to enhance SciTE editing.

      • Insert a copy of the Bookmarked line(s) - Ctrl+Alt+B
        This functions will insert all Bookmarked
        lines at the beginning for the current line.
        Lines can be Bookmarked by
        pressing Ctrl+F2.
      • Jump to the "Func ???" definition of the functionname under the Cursor -
        Ctrl+J
        It will also Bookmark the original line to
        enable you to jump back to the original line with F2.
      • List dropdownbox Ctrl+L with all available Func's
        in the current script and jumps to selected script. It will also Bookmark the
        original line to enable you to jump back to the original line with F2.
      • Alt+I - Open #include "" file.
      • Ctrl+Shift+D - Add Debug msgbox
        This function
        will add a MSGBOX below the current line that contains the Var the cursor is
        at
        $a = $b + 1 (Put the cursor on $b and press Ctrl+Shift+D the following line will be added)
        MsgBox(4096,'debug:' & $b,$b) ;### Debug MSGBOX
      • Alt+D - Add Debug ConsoleWrite message
        This
        function will add a ConsoleWrite line below the current line that contains the
        Var the cursor is at
        $a = $b + 1 (Put the cursor on $b and press Alt+D the following line will be added)
        ConsoleWrite('Line:~4 debug ==> $b: ' & $b & @lf) ;###
        Debug Console
      • Alt+Shift+D - Comment ALL DEBUG MsgBox and
        ConsoleWrite lines.
      • Ctrl+Alt+D - UnComment ALL Debug MsgBoxes and
        ConsoleWrite lines.
      • Add TRACE ConsoleWrites to all lines to easily trace your program:Available
        under Tools/Debug: Add Trace lines
      • Remove ALL Debug MsgBoxes and ConsoleWrite lines: Available under Tools/Debug: Remove ALL lines

    Gruß Ashpool

    Zitat von mir

    Bin immer wieder erstaunt, wie begrenzt ein Horizont sein kann.

  • Danke! :thumbup: Ich hatte die Hilfe gelesen, das aber nicht gefunden...
    Edit: Hab das Scrollen vergessen :thumbdown:

    Aber was ist mit den Punkten zu GDI+

  • Du kannst ja eine Linie mit der Länge 1 machen ;)

    Spoiler anzeigen
    [autoit]

    #include <GuiConstantsEx.au3>
    #include <GDIPlus.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt('MustDeclareVars', 1)

    [/autoit] [autoit][/autoit] [autoit]

    _Main()

    [/autoit] [autoit][/autoit] [autoit]

    Func _Main()
    Local $hGUI, $hWnd, $hGraphic, $hPen

    [/autoit] [autoit][/autoit] [autoit]

    ; Create GUI
    $hGUI = GUICreate("GDI+", 400, 300)
    $hWnd = WinGetHandle("GDI+")
    GUISetState()

    [/autoit] [autoit][/autoit] [autoit]

    ; Draw line
    _GDIPlus_Startup ()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hWnd)
    $hPen = _GDIPlus_PenCreate ()
    _GDIPlus_GraphicsDrawLine ($hGraphic, 10, 150, 11, 150, $hPen)

    [/autoit] [autoit][/autoit] [autoit]

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    [/autoit] [autoit][/autoit] [autoit]

    ; Clean up resources
    _GDIPlus_PenDispose ($hPen)
    _GDIPlus_GraphicsDispose ($hGraphic)
    _GDIPlus_Shutdown ()

    [/autoit] [autoit][/autoit] [autoit]

    EndFunc ;==>_Main

    [/autoit]
  • Aber was ist mit den Punkten zu GDI+


    Ist zwar nicht GDI+, erzeugt aber einzelne Punkte:

    [autoit]


    #include <GUIConstantsEx.au3>
    GUICreate("Pixel", 160, 150)
    GUICtrlCreateGraphic(50, 50, 100, 100)
    GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xFF0000)

    [/autoit][autoit][/autoit][autoit]

    For $x = 0 To 6
    For $y = 0 To 4
    GUICtrlSetGraphic(-1, $GUI_GR_PIXEL, $x * 10, $y * 10)
    Next
    Next
    GUISetState()

    [/autoit][autoit][/autoit][autoit]

    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    Exit

    [/autoit]

    Gruß Ashpool

    Gruß Ashpool

    Zitat von mir

    Bin immer wieder erstaunt, wie begrenzt ein Horizont sein kann.