Ein Elch der Gude sagt ^^

  • Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 633, 447, 0, 210, $WS_POPUP)
    GUISetBkColor ( 0x8B4513, $Form1 )
    ;~ GUICtrlCreateLabel("", 0, 0, 633, 447, -1, $GUI_WS_EX_PARENTDRAG)
    ;~ GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

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

    # ==> Start
    Local $_Left_pos, $_Top_pos, $_GUI_NAME
    $_Left_pos = 0
    $_Top_pos = 0
    _GuiImageHole($Form1, $_Left_pos, $_Top_pos, 633, 447)
    # <== End

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

    GUISetState(@SW_SHOW, $Form1)
    #EndRegion ### END Koda GUI section ###

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

    For $i=1 To 600 Step +1
    WinMove ( "Form1", "", 0+$i, 210 )
    Next

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

    $Form2=GUICreate ( "Form2", 536, 376, 600, 210, $WS_POPUP )
    GUISetBkColor ( 0xABCDEF, $Form2 )
    GUISetFont ( 13, 400, 2, "Arial", $Form2 )
    GUICtrlCreateLabel ( "GUDE!!", 390, 150, 80, 25 )

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

    # ==> Start
    Local $_Left_pos, $_Top_pos, $_GUI_NAME
    $_Left_pos = 0
    $_Top_pos = 0
    _GuiImageHoleBild2($Form2, $_Left_pos, $_Top_pos, 536, 376)
    # <== End

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

    GUISetState(@SW_SHOW, $Form2)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

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

    #FUNCTION# ==============================================================
    Func _GuiImageHoleBild2($window_handle, $pos_x, $pos_y,$Image_Width ,$Image_Height)
    Local $aClassList, $aM_Mask, $aMask
    #Region picture array
    Local $PictArray[90]
    $PictArray[0] = '460,118,469,118'
    $PictArray[1] = '449,119,478,119'
    $PictArray[2] = '442,120,481,120'
    $PictArray[3] = '438,121,485,121'
    $PictArray[4] = '434,122,488,122'
    $PictArray[5] = '430,123,490,123'
    $PictArray[6] = '426,124,492,124'
    $PictArray[7] = '423,125,494,125'
    $PictArray[8] = '420,126,495,126'
    $PictArray[9] = '417,127,496,127'
    $PictArray[10] = '415,128,498,128'
    $PictArray[11] = '412,129,499,129'
    $PictArray[12] = '409,130,500,130'
    $PictArray[13] = '406,131,501,131'
    $PictArray[14] = '404,132,502,132'
    $PictArray[15] = '402,133,502,133'
    $PictArray[16] = '400,134,503,134'
    $PictArray[17] = '398,135,504,135'
    $PictArray[18] = '395,136,504,136'
    $PictArray[19] = '393,137,505,137'
    $PictArray[20] = '391,138,506,138'
    $PictArray[21] = '389,139,506,139'
    $PictArray[22] = '387,140,506,140'
    $PictArray[23] = '385,141,507,141'
    $PictArray[24] = '383,142,507,142'
    $PictArray[25] = '381,143,507,143'
    $PictArray[26] = '380,144,507,144'
    $PictArray[27] = '378,145,508,145'
    $PictArray[28] = '376,146,508,146'
    $PictArray[29] = '374,147,508,147'
    $PictArray[30] = '372,148,508,148'
    $PictArray[31] = '370,149,508,149'
    $PictArray[32] = '369,150,508,150'
    $PictArray[33] = '367,151,508,151'
    $PictArray[34] = '365,152,508,152'
    $PictArray[35] = '364,153,507,153'
    $PictArray[36] = '362,154,507,154'
    $PictArray[37] = '361,155,507,155'
    $PictArray[38] = '359,156,507,156'
    $PictArray[39] = '357,157,506,157'
    $PictArray[40] = '356,158,506,158'
    $PictArray[41] = '354,159,506,159'
    $PictArray[42] = '353,160,505,160'
    $PictArray[43] = '351,161,505,161'
    $PictArray[44] = '349,162,505,162'
    $PictArray[45] = '348,163,504,163'
    $PictArray[46] = '346,164,504,164'
    $PictArray[47] = '345,165,503,165'
    $PictArray[48] = '343,166,503,166'
    $PictArray[49] = '342,167,502,167'
    $PictArray[50] = '341,168,501,168'
    $PictArray[51] = '339,169,500,169'
    $PictArray[52] = '338,170,500,170'
    $PictArray[53] = '336,171,499,171'
    $PictArray[54] = '335,172,498,172'
    $PictArray[55] = '334,173,498,173'
    $PictArray[56] = '332,174,497,174'
    $PictArray[57] = '331,175,496,175'
    $PictArray[58] = '329,176,495,176'
    $PictArray[59] = '328,177,494,177'
    $PictArray[60] = '327,178,492,178'
    $PictArray[61] = '325,179,491,179'
    $PictArray[62] = '324,180,490,180'
    $PictArray[63] = '322,181,489,181'
    $PictArray[64] = '321,182,488,182'
    $PictArray[65] = '320,183,487,183'
    $PictArray[66] = '319,184,485,184'
    $PictArray[67] = '317,185,484,185'
    $PictArray[68] = '316,186,482,186'
    $PictArray[69] = '315,187,481,187'
    $PictArray[70] = '314,188,479,188'
    $PictArray[71] = '312,189,478,189'
    $PictArray[72] = '311,190,476,190'
    $PictArray[73] = '310,191,474,191'
    $PictArray[74] = '309,192,472,192'
    $PictArray[75] = '307,193,470,193'
    $PictArray[76] = '306,194,468,194'
    $PictArray[77] = '305,195,465,195'
    $PictArray[78] = '304,196,463,196'
    $PictArray[79] = '307,197,460,197'
    $PictArray[80] = '312,198,458,198'
    $PictArray[81] = '317,199,455,199'
    $PictArray[82] = '321,200,451,200'
    $PictArray[83] = '326,201,448,201'
    $PictArray[84] = '331,202,444,202'
    $PictArray[85] = '338,203,440,203'
    $PictArray[86] = '345,204,435,204'
    $PictArray[87] = '352,205,429,205'
    $PictArray[88] = '359,206,423,206'
    $PictArray[89] = '373,207,411,207'
    #EndRegion picture array

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

    ; get the size of the active window
    $size = WinGetClientSize($window_handle)
    $Window_width = $size[0]
    $Window_height = $size[1] + 40 ; include height of title bar up to 30 dots
    ; First hide the window
    $aClassList = StringSplit(_WinGetClassListEx($window_handle), @LF)
    $aM_Mask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', 0, 'long', 0)
    ; rectangle A - left side
    $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', $pos_x, 'long', $Window_height)
    DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    ; rectangle B - Top
    $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', $Window_width, 'long', $pos_y)
    DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    ; rectangle C - Right side
    $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', $pos_x + $Image_Width , 'long', 0 , 'long', $Window_width + 30, 'long', $Window_height)
    DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    ; rectangle D - Bottom
    $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0 , 'long', $pos_y + $Image_Height, 'long', $Window_width, 'long', $Window_height)
    DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    ; now unhide all regions as defined in array $PictArray
    For $i = 0 To (UBound($PictArray) - 1)
    $Block_value = StringSplit($PictArray[$i],',')
    $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', $pos_x + $Block_value[1] - 2 , 'long', $pos_y + $Block_value[2], 'long', $pos_x + $Block_value[3], 'long', $pos_y + $Block_value[4] -1)
    DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    Next
    DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $window_handle, 'long', $aM_Mask[0], 'int', 1)
    $PictArray='' ; empty array
    EndFunc ;==>_GuiImageHole

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

    #FUNCTION# ==============================================================
    Func _GuiImageHole($window_handle, $pos_x, $pos_y,$Image_Width ,$Image_Height)
    Local $aClassList, $aM_Mask, $aMask
    #Region picture array
    Local $PictArray[364]
    $PictArray[0] = '277,43,278,43'
    $PictArray[1] = '128,44,129,44'
    $PictArray[2] = '277,44,278,44'
    $PictArray[3] = '127,45,129,45'
    $PictArray[4] = '276,45,278,45'
    $PictArray[5] = '127,46,129,46'
    $PictArray[6] = '276,46,278,46'
    $PictArray[7] = '127,47,129,47'
    $PictArray[8] = '276,47,278,47'
    $PictArray[9] = '127,48,129,48'
    $PictArray[10] = '276,48,278,48'
    $PictArray[11] = '127,49,129,49'
    $PictArray[12] = '275,49,278,49'
    $PictArray[13] = '127,50,129,50'
    $PictArray[14] = '275,50,278,50'
    $PictArray[15] = '127,51,129,51'
    $PictArray[16] = '275,51,278,51'
    $PictArray[17] = '127,52,129,52'
    $PictArray[18] = '275,52,278,52'
    $PictArray[19] = '127,53,129,53'
    $PictArray[20] = '274,53,278,53'
    $PictArray[21] = '127,54,129,54'
    $PictArray[22] = '274,54,278,54'
    $PictArray[23] = '127,55,129,55'
    $PictArray[24] = '274,55,278,55'
    $PictArray[25] = '127,56,129,56'
    $PictArray[26] = '274,56,278,56'
    $PictArray[27] = '127,57,129,57'
    $PictArray[28] = '273,57,278,57'
    $PictArray[29] = '127,58,130,58'
    $PictArray[30] = '273,58,278,58'
    $PictArray[31] = '127,59,130,59'
    $PictArray[32] = '273,59,278,59'
    $PictArray[33] = '127,60,130,60'
    $PictArray[34] = '273,60,278,60'
    $PictArray[35] = '127,61,130,61'
    $PictArray[36] = '272,61,278,61'
    $PictArray[37] = '126,62,130,62'
    $PictArray[38] = '272,62,278,62'
    $PictArray[39] = '126,63,131,63'
    $PictArray[40] = '272,63,278,63'
    $PictArray[41] = '126,64,131,64'
    $PictArray[42] = '271,64,278,64'
    $PictArray[43] = '126,65,131,65'
    $PictArray[44] = '271,65,278,65'
    $PictArray[45] = '126,66,131,66'
    $PictArray[46] = '271,66,278,66'
    $PictArray[47] = '126,67,131,67'
    $PictArray[48] = '271,67,278,67'
    $PictArray[49] = '126,68,131,68'
    $PictArray[50] = '270,68,278,68'
    $PictArray[51] = '126,69,132,69'
    $PictArray[52] = '270,69,278,69'
    $PictArray[53] = '126,70,132,70'
    $PictArray[54] = '270,70,278,70'
    $PictArray[55] = '126,71,132,71'
    $PictArray[56] = '270,71,278,71'
    $PictArray[57] = '126,72,132,72'
    $PictArray[58] = '269,72,278,72'
    $PictArray[59] = '126,73,133,73'
    $PictArray[60] = '269,73,278,73'
    $PictArray[61] = '125,74,133,74'
    $PictArray[62] = '269,74,278,74'
    $PictArray[63] = '125,75,133,75'
    $PictArray[64] = '268,75,278,75'
    $PictArray[65] = '125,76,133,76'
    $PictArray[66] = '268,76,278,76'
    $PictArray[67] = '125,77,134,77'
    $PictArray[68] = '268,77,278,77'
    $PictArray[69] = '125,78,134,78'
    $PictArray[70] = '267,78,278,78'
    $PictArray[71] = '125,79,134,79'
    $PictArray[72] = '267,79,278,79'
    $PictArray[73] = '125,80,134,80'
    $PictArray[74] = '267,80,278,80'
    $PictArray[75] = '125,81,135,81'
    $PictArray[76] = '266,81,278,81'
    $PictArray[77] = '125,82,135,82'
    $PictArray[78] = '266,82,278,82'
    $PictArray[79] = '125,83,135,83'
    $PictArray[80] = '266,83,278,83'
    $PictArray[81] = '125,84,136,84'
    $PictArray[82] = '265,84,278,84'
    $PictArray[83] = '125,85,136,85'
    $PictArray[84] = '265,85,278,85'
    $PictArray[85] = '125,86,137,86'
    $PictArray[86] = '265,86,278,86'
    $PictArray[87] = '125,87,137,87'
    $PictArray[88] = '264,87,278,87'
    $PictArray[89] = '125,88,137,88'
    $PictArray[90] = '264,88,278,88'
    $PictArray[91] = '125,89,138,89'
    $PictArray[92] = '264,89,278,89'
    $PictArray[93] = '125,90,138,90'
    $PictArray[94] = '263,90,278,90'
    $PictArray[95] = '125,91,139,91'
    $PictArray[96] = '263,91,278,91'
    $PictArray[97] = '125,92,140,92'
    $PictArray[98] = '262,92,278,92'
    $PictArray[99] = '125,93,140,93'
    $PictArray[100] = '262,93,278,93'
    $PictArray[101] = '125,94,141,94'
    $PictArray[102] = '261,94,278,94'
    $PictArray[103] = '125,95,142,95'
    $PictArray[104] = '261,95,278,95'
    $PictArray[105] = '125,96,142,96'
    $PictArray[106] = '261,96,277,96'
    $PictArray[107] = '125,97,143,97'
    $PictArray[108] = '260,97,277,97'
    $PictArray[109] = '125,98,144,98'
    $PictArray[110] = '260,98,277,98'
    $PictArray[111] = '125,99,144,99'
    $PictArray[112] = '259,99,277,99'
    $PictArray[113] = '125,100,145,100'
    $PictArray[114] = '259,100,277,100'
    $PictArray[115] = '125,101,146,101'
    $PictArray[116] = '258,101,277,101'
    $PictArray[117] = '125,102,147,102'
    $PictArray[118] = '258,102,277,102'
    $PictArray[119] = '125,103,148,103'
    $PictArray[120] = '257,103,277,103'
    $PictArray[121] = '126,104,149,104'
    $PictArray[122] = '257,104,277,104'
    $PictArray[123] = '126,105,150,105'
    $PictArray[124] = '256,105,277,105'
    $PictArray[125] = '126,106,151,106'
    $PictArray[126] = '255,106,276,106'
    $PictArray[127] = '126,107,151,107'
    $PictArray[128] = '255,107,276,107'
    $PictArray[129] = '126,108,152,108'
    $PictArray[130] = '254,108,276,108'
    $PictArray[131] = '127,109,153,109'
    $PictArray[132] = '253,109,276,109'
    $PictArray[133] = '127,110,154,110'
    $PictArray[134] = '253,110,276,110'
    $PictArray[135] = '127,111,155,111'
    $PictArray[136] = '252,111,275,111'
    $PictArray[137] = '127,112,156,112'
    $PictArray[138] = '251,112,275,112'
    $PictArray[139] = '128,113,156,113'
    $PictArray[140] = '250,113,275,113'
    $PictArray[141] = '128,114,157,114'
    $PictArray[142] = '249,114,275,114'
    $PictArray[143] = '129,115,158,115'
    $PictArray[144] = '248,115,274,115'
    $PictArray[145] = '130,116,158,116'
    $PictArray[146] = '247,116,274,116'
    $PictArray[147] = '130,117,159,117'
    $PictArray[148] = '246,117,274,117'
    $PictArray[149] = '131,118,160,118'
    $PictArray[150] = '245,118,273,118'
    $PictArray[151] = '132,119,160,119'
    $PictArray[152] = '244,119,273,119'
    $PictArray[153] = '132,120,161,120'
    $PictArray[154] = '243,120,272,120'
    $PictArray[155] = '133,121,161,121'
    $PictArray[156] = '241,121,272,121'
    $PictArray[157] = '134,122,162,122'
    $PictArray[158] = '240,122,271,122'
    $PictArray[159] = '135,123,162,123'
    $PictArray[160] = '239,123,271,123'
    $PictArray[161] = '136,124,163,124'
    $PictArray[162] = '237,124,270,124'
    $PictArray[163] = '137,125,163,125'
    $PictArray[164] = '236,125,269,125'
    $PictArray[165] = '138,126,164,126'
    $PictArray[166] = '235,126,268,126'
    $PictArray[167] = '139,127,164,127'
    $PictArray[168] = '234,127,268,127'
    $PictArray[169] = '141,128,165,128'
    $PictArray[170] = '232,128,267,128'
    $PictArray[171] = '142,129,165,129'
    $PictArray[172] = '231,129,266,129'
    $PictArray[173] = '143,130,166,130'
    $PictArray[174] = '230,130,264,130'
    $PictArray[175] = '145,131,166,131'
    $PictArray[176] = '229,131,263,131'
    $PictArray[177] = '146,132,167,132'
    $PictArray[178] = '227,132,262,132'
    $PictArray[179] = '148,133,167,133'
    $PictArray[180] = '226,133,260,133'
    $PictArray[181] = '150,134,168,134'
    $PictArray[182] = '225,134,258,134'
    $PictArray[183] = '152,135,168,135'
    $PictArray[184] = '224,135,256,135'
    $PictArray[185] = '153,136,168,136'
    $PictArray[186] = '223,136,254,136'
    $PictArray[187] = '155,137,169,137'
    $PictArray[188] = '222,137,251,137'
    $PictArray[189] = '157,138,169,138'
    $PictArray[190] = '220,138,249,138'
    $PictArray[191] = '159,139,169,139'
    $PictArray[192] = '219,139,245,139'
    $PictArray[193] = '161,140,170,140'
    $PictArray[194] = '218,140,241,140'
    $PictArray[195] = '163,141,170,141'
    $PictArray[196] = '217,141,237,141'
    $PictArray[197] = '165,142,171,142'
    $PictArray[198] = '216,142,233,142'
    $PictArray[199] = '167,143,171,143'
    $PictArray[200] = '215,143,228,143'
    $PictArray[201] = '168,144,179,144'
    $PictArray[202] = '214,144,223,144'
    $PictArray[203] = '171,145,199,145'
    $PictArray[204] = '213,145,218,145'
    $PictArray[205] = '171,146,219,146'
    $PictArray[206] = '169,147,230,147'
    $PictArray[207] = '167,148,230,148'
    $PictArray[208] = '166,149,231,149'
    $PictArray[209] = '164,150,232,150'
    $PictArray[210] = '162,151,233,151'
    $PictArray[211] = '160,152,234,152'
    $PictArray[212] = '158,153,236,153'
    $PictArray[213] = '157,154,237,154'
    $PictArray[214] = '155,155,238,155'
    $PictArray[215] = '153,156,239,156'
    $PictArray[216] = '151,157,240,157'
    $PictArray[217] = '150,158,241,158'
    $PictArray[218] = '148,159,242,159'
    $PictArray[219] = '146,160,243,160'
    $PictArray[220] = '144,161,227,161'
    $PictArray[221] = '228,161,244,161'
    $PictArray[222] = '143,162,225,162'
    $PictArray[223] = '228,162,245,162'
    $PictArray[224] = '141,163,188,163'
    $PictArray[225] = '191,163,224,163'
    $PictArray[226] = '228,163,247,163'
    $PictArray[227] = '139,164,186,164'
    $PictArray[228] = '193,164,223,164'
    $PictArray[229] = '229,164,248,164'
    $PictArray[230] = '137,165,184,165'
    $PictArray[231] = '193,165,223,165'
    $PictArray[232] = '229,165,249,165'
    $PictArray[233] = '136,166,184,166'
    $PictArray[234] = '194,166,222,166'
    $PictArray[235] = '229,166,250,166'
    $PictArray[236] = '134,167,185,167'
    $PictArray[237] = '195,167,221,167'
    $PictArray[238] = '229,167,251,167'
    $PictArray[239] = '132,168,186,168'
    $PictArray[240] = '194,168,221,168'
    $PictArray[241] = '229,168,252,168'
    $PictArray[242] = '130,169,187,169'
    $PictArray[243] = '194,169,221,169'
    $PictArray[244] = '228,169,253,169'
    $PictArray[245] = '128,170,188,170'
    $PictArray[246] = '193,170,221,170'
    $PictArray[247] = '228,170,254,170'
    $PictArray[248] = '127,171,189,171'
    $PictArray[249] = '191,171,222,171'
    $PictArray[250] = '228,171,255,171'
    $PictArray[251] = '125,172,223,172'
    $PictArray[252] = '227,172,257,172'
    $PictArray[253] = '123,173,224,173'
    $PictArray[254] = '226,173,258,173'
    $PictArray[255] = '121,174,259,174'
    $PictArray[256] = '120,175,260,175'
    $PictArray[257] = '119,176,261,176'
    $PictArray[258] = '118,177,262,177'
    $PictArray[259] = '117,178,263,178'
    $PictArray[260] = '116,179,264,179'
    $PictArray[261] = '115,180,265,180'
    $PictArray[262] = '114,181,267,181'
    $PictArray[263] = '113,182,268,182'
    $PictArray[264] = '112,183,266,183'
    $PictArray[265] = '268,183,269,183'
    $PictArray[266] = '111,184,265,184'
    $PictArray[267] = '269,184,270,184'
    $PictArray[268] = '110,185,264,185'
    $PictArray[269] = '270,185,271,185'
    $PictArray[270] = '109,186,263,186'
    $PictArray[271] = '271,186,272,186'
    $PictArray[272] = '108,187,263,187'
    $PictArray[273] = '272,187,273,187'
    $PictArray[274] = '107,188,263,188'
    $PictArray[275] = '272,188,273,188'
    $PictArray[276] = '106,189,262,189'
    $PictArray[277] = '272,189,273,189'
    $PictArray[278] = '105,190,263,190'
    $PictArray[279] = '272,190,273,190'
    $PictArray[280] = '104,191,265,191'
    $PictArray[281] = '272,191,273,191'
    $PictArray[282] = '103,192,267,192'
    $PictArray[283] = '271,192,272,192'
    $PictArray[284] = '102,193,270,193'
    $PictArray[285] = '271,193,272,193'
    $PictArray[286] = '101,194,272,194'
    $PictArray[287] = '100,195,272,195'
    $PictArray[288] = '99,196,272,196'
    $PictArray[289] = '98,197,272,197'
    $PictArray[290] = '97,198,272,198'
    $PictArray[291] = '96,199,272,199'
    $PictArray[292] = '95,200,272,200'
    $PictArray[293] = '94,201,271,201'
    $PictArray[294] = '93,202,271,202'
    $PictArray[295] = '92,203,271,203'
    $PictArray[296] = '91,204,271,204'
    $PictArray[297] = '90,205,271,205'
    $PictArray[298] = '89,206,271,206'
    $PictArray[299] = '88,207,271,207'
    $PictArray[300] = '87,208,271,208'
    $PictArray[301] = '86,209,271,209'
    $PictArray[302] = '85,210,270,210'
    $PictArray[303] = '84,211,270,211'
    $PictArray[304] = '83,212,270,212'
    $PictArray[305] = '82,213,270,213'
    $PictArray[306] = '81,214,270,214'
    $PictArray[307] = '80,215,270,215'
    $PictArray[308] = '79,216,270,216'
    $PictArray[309] = '78,217,270,217'
    $PictArray[310] = '77,218,270,218'
    $PictArray[311] = '76,219,233,219'
    $PictArray[312] = '252,219,270,219'
    $PictArray[313] = '75,220,252,220'
    $PictArray[314] = '74,221,269,221'
    $PictArray[315] = '73,222,269,222'
    $PictArray[316] = '72,223,269,223'
    $PictArray[317] = '71,224,269,224'
    $PictArray[318] = '70,225,269,225'
    $PictArray[319] = '69,226,269,226'
    $PictArray[320] = '68,227,269,227'
    $PictArray[321] = '67,228,269,228'
    $PictArray[322] = '66,229,67,229'
    $PictArray[323] = '68,229,268,229'
    $PictArray[324] = '70,230,268,230'
    $PictArray[325] = '72,231,179,231'
    $PictArray[326] = '195,231,268,231'
    $PictArray[327] = '74,232,178,232'
    $PictArray[328] = '224,232,268,232'
    $PictArray[329] = '76,233,176,233'
    $PictArray[330] = '253,233,268,233'
    $PictArray[331] = '78,234,175,234'
    $PictArray[332] = '80,235,174,235'
    $PictArray[333] = '82,236,173,236'
    $PictArray[334] = '84,237,172,237'
    $PictArray[335] = '86,238,171,238'
    $PictArray[336] = '87,239,169,239'
    $PictArray[337] = '89,240,168,240'
    $PictArray[338] = '91,241,167,241'
    $PictArray[339] = '93,242,166,242'
    $PictArray[340] = '95,243,165,243'
    $PictArray[341] = '97,244,164,244'
    $PictArray[342] = '99,245,162,245'
    $PictArray[343] = '101,246,161,246'
    $PictArray[344] = '103,247,160,247'
    $PictArray[345] = '104,248,159,248'
    $PictArray[346] = '106,249,158,249'
    $PictArray[347] = '108,250,157,250'
    $PictArray[348] = '110,251,155,251'
    $PictArray[349] = '112,252,154,252'
    $PictArray[350] = '114,253,153,253'
    $PictArray[351] = '116,254,152,254'
    $PictArray[352] = '118,255,151,255'
    $PictArray[353] = '120,256,150,256'
    $PictArray[354] = '122,257,148,257'
    $PictArray[355] = '123,258,147,258'
    $PictArray[356] = '125,259,146,259'
    $PictArray[357] = '127,260,145,260'
    $PictArray[358] = '129,261,144,261'
    $PictArray[359] = '131,262,143,262'
    $PictArray[360] = '133,263,141,263'
    $PictArray[361] = '135,264,140,264'
    $PictArray[362] = '137,265,139,265'
    $PictArray[363] = '139,266,140,266'
    #EndRegion picture array

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

    ; get the size of the active window
    $size = WinGetClientSize($window_handle)
    $Window_width = $size[0]
    $Window_height = $size[1] + 40 ; include height of title bar up to 30 dots
    ; First hide the window
    $aClassList = StringSplit(_WinGetClassListEx($window_handle), @LF)
    $aM_Mask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', 0, 'long', 0)
    ; rectangle A - left side
    $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', $pos_x, 'long', $Window_height)
    DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    ; rectangle B - Top
    $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', $Window_width, 'long', $pos_y)
    DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    ; rectangle C - Right side
    $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', $pos_x + $Image_Width , 'long', 0 , 'long', $Window_width + 30, 'long', $Window_height)
    DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    ; rectangle D - Bottom
    $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0 , 'long', $pos_y + $Image_Height, 'long', $Window_width, 'long', $Window_height)
    DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    ; now unhide all regions as defined in array $PictArray
    For $i = 0 To (UBound($PictArray) - 1)
    $Block_value = StringSplit($PictArray[$i],',')
    $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', $pos_x + $Block_value[1] - 2 , 'long', $pos_y + $Block_value[2], 'long', $pos_x + $Block_value[3], 'long', $pos_y + $Block_value[4] -1)
    DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    Next
    DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $window_handle, 'long', $aM_Mask[0], 'int', 1)
    $PictArray='' ; empty array
    EndFunc ;==>_GuiImageHole
    #FUNCTION# ==============================================================
    Func _WinGetClassListEx($sTitle)
    Local $sClassList = WinGetClassList($sTitle)
    Local $aClassList = StringSplit($sClassList, @LF)
    Local $sRetClassList = '', $sHold_List = '|'
    Local $aiInHold, $iInHold
    For $i = 1 To UBound($aClassList) - 1
    If $aClassList[$i] = '' Then ContinueLoop
    If StringRegExp($sHold_List, '\|' & $aClassList[$i] & '~(\d+)\|') Then
    $aiInHold = StringRegExp($sHold_List, '.*\|' & $aClassList[$i] & '~(\d+)\|.*', 1)
    $iInHold = Number($aiInHold[UBound($aiInHold)-1])
    If $iInHold = 0 Then $iInHold += 1
    $aClassList[$i] &= '~' & $iInHold + 1
    $sHold_List &= $aClassList[$i] & '|'
    $sRetClassList &= $aClassList[$i] & @LF
    Else
    $aClassList[$i] &= '~1'
    $sHold_List &= $aClassList[$i] & '|'
    $sRetClassList &= $aClassList[$i] & @LF
    EndIf
    Next
    Return StringReplace(StringStripWS($sRetClassList, 3), '~', '')
    EndFunc ;==>_WinGetClassListEx
    #FUNCTION# ==============================================================
    #EndRegion Perforated Image

    [/autoit]

    Könnte man nen AutoIt Comic drauß machen xD

  • echt witig aber das ich sowas nicht progge liegt daran das ich zu fauel bin so viel zu schreiben für die paar sec fun^^

  • Genial!
    Noch etwas für meine Sparte: "Für was man AutoIt alles nutzen kann"!

    MfG. tobi_girst

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »tobi_girst« (Morgen, 25:63)