#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.12.1 Author: A GreenCan Script Function: Create a window with my perforated image #ce ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include $H_GUI = GuiCreate("Sphere", 380, 380) $OKbtn = GUICtrlCreateButton("Ok", 160, 360, 60, 20, $BS_DEFPUSHBUTTON ) # ==> Start Local $_Left_pos, $_Top_pos, $_GUI_NAME $_Left_pos = 4 ; Replace with correct position $_Top_pos = _WinAPI_GetSystemMetrics(4) +5 ; Just below the title bar (Must #include if using this function!!!) $_GUI_NAME = $H_GUI _GuiImageHole($_GUI_NAME, $_Left_pos, $_Top_pos, 376, 358) # <== End GUISetState() $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $OKbtn Exit Case $msg = -3 ; escape key pressed so quit Exit EndSelect WEnd GUIDelete ( $H_GUI ) Exit #comments-start The lines below will generate the perforated image (bewteen start and end) Move these lines into your GUI code, usually just before GUISetState() Don't forget to fill in the correct coordinates for $Left_pos, $Top_pos and enter the GUI Window Handle in the last line # ==> Start Local $_Left_pos, $_Top_pos, $_GUI_NAME $_Left_pos = 10 ; Replace with correct position $_Top_pos = _WinAPI_GetSystemMetrics(4) ; Just below the title bar (Must #include if using this function!!!) $_GUI_NAME = 'The name of your GUI window' _GuiImageHole($_GUI_NAME, $_Left_pos, $_Top_pos, 376, 358) # <== End #comments-end #FUNCTION# ============================================================== Func _GuiImageHole($window_handle, $pos_x, $pos_y,$Image_Width ,$Image_Height) Local $aClassList, $aM_Mask, $aMask #Region picture array Local $PictArray[892] $PictArray[0] = '1,1,376,1' $PictArray[1] = '1,2,376,2' $PictArray[2] = '1,3,376,3' $PictArray[3] = '1,4,376,4' $PictArray[4] = '1,5,376,5' $PictArray[5] = '1,6,376,6' $PictArray[6] = '1,7,376,7' $PictArray[7] = '1,8,376,8' $PictArray[8] = '1,9,376,9' $PictArray[9] = '1,10,376,10' $PictArray[10] = '1,11,376,11' $PictArray[11] = '1,12,376,12' $PictArray[12] = '1,13,376,13' $PictArray[13] = '1,14,376,14' $PictArray[14] = '1,15,376,15' $PictArray[15] = '1,16,376,16' $PictArray[16] = '1,17,376,17' $PictArray[17] = '1,18,376,18' $PictArray[18] = '1,19,376,19' $PictArray[19] = '1,20,376,20' $PictArray[20] = '1,21,376,21' $PictArray[21] = '1,22,376,22' $PictArray[22] = '1,23,376,23' $PictArray[23] = '1,24,376,24' $PictArray[24] = '1,25,376,25' $PictArray[25] = '1,26,376,26' $PictArray[26] = '1,27,376,27' $PictArray[27] = '1,28,376,28' $PictArray[28] = '1,29,376,29' $PictArray[29] = '1,30,376,30' $PictArray[30] = '1,31,376,31' $PictArray[31] = '1,32,376,32' $PictArray[32] = '1,33,376,33' $PictArray[33] = '1,34,376,34' $PictArray[34] = '1,35,376,35' $PictArray[35] = '1,36,376,36' $PictArray[36] = '1,37,376,37' $PictArray[37] = '1,38,376,38' $PictArray[38] = '1,39,376,39' $PictArray[39] = '1,40,376,40' $PictArray[40] = '1,41,376,41' $PictArray[41] = '1,42,376,42' $PictArray[42] = '1,43,376,43' $PictArray[43] = '1,44,376,44' $PictArray[44] = '1,45,170,45' $PictArray[45] = '203,45,376,45' $PictArray[46] = '1,46,170,46' $PictArray[47] = '172,46,201,46' $PictArray[48] = '203,46,376,46' $PictArray[49] = '1,47,160,47' $PictArray[50] = '171,47,202,47' $PictArray[51] = '213,47,376,47' $PictArray[52] = '1,48,160,48' $PictArray[53] = '162,48,211,48' $PictArray[54] = '213,48,376,48' $PictArray[55] = '1,49,152,49' $PictArray[56] = '161,49,212,49' $PictArray[57] = '221,49,376,49' $PictArray[58] = '1,50,152,50' $PictArray[59] = '154,50,219,50' $PictArray[60] = '221,50,376,50' $PictArray[61] = '1,51,146,51' $PictArray[62] = '153,51,220,51' $PictArray[63] = '225,51,376,51' $PictArray[64] = '1,52,146,52' $PictArray[65] = '148,52,217,52' $PictArray[66] = '219,52,223,52' $PictArray[67] = '225,52,376,52' $PictArray[68] = '1,53,140,53' $PictArray[69] = '147,53,224,53' $PictArray[70] = '231,53,376,53' $PictArray[71] = '1,54,140,54' $PictArray[72] = '142,54,229,54' $PictArray[73] = '231,54,376,54' $PictArray[74] = '1,55,136,55' $PictArray[75] = '141,55,230,55' $PictArray[76] = '235,55,376,55' $PictArray[77] = '1,56,136,56' $PictArray[78] = '138,56,233,56' $PictArray[79] = '235,56,376,56' $PictArray[80] = '1,57,130,57' $PictArray[81] = '137,57,234,57' $PictArray[82] = '241,57,376,57' $PictArray[83] = '1,58,130,58' $PictArray[84] = '132,58,239,58' $PictArray[85] = '241,58,376,58' $PictArray[86] = '1,59,128,59' $PictArray[87] = '131,59,240,59' $PictArray[88] = '243,59,376,59' $PictArray[89] = '1,60,128,60' $PictArray[90] = '130,60,241,60' $PictArray[91] = '243,60,376,60' $PictArray[92] = '1,61,124,61' $PictArray[93] = '129,61,242,61' $PictArray[94] = '247,61,376,61' $PictArray[95] = '1,62,124,62' $PictArray[96] = '126,62,245,62' $PictArray[97] = '247,62,376,62' $PictArray[98] = '1,63,120,63' $PictArray[99] = '125,63,246,63' $PictArray[100] = '251,63,376,63' $PictArray[101] = '1,64,120,64' $PictArray[102] = '122,64,249,64' $PictArray[103] = '251,64,376,64' $PictArray[104] = '1,65,116,65' $PictArray[105] = '121,65,250,65' $PictArray[106] = '255,65,376,65' $PictArray[107] = '1,66,116,66' $PictArray[108] = '118,66,253,66' $PictArray[109] = '255,66,376,66' $PictArray[110] = '1,67,114,67' $PictArray[111] = '117,67,254,67' $PictArray[112] = '257,67,376,67' $PictArray[113] = '1,68,114,68' $PictArray[114] = '116,68,255,68' $PictArray[115] = '257,68,376,68' $PictArray[116] = '1,69,110,69' $PictArray[117] = '115,69,256,69' $PictArray[118] = '261,69,376,69' $PictArray[119] = '1,70,110,70' $PictArray[120] = '112,70,259,70' $PictArray[121] = '261,70,376,70' $PictArray[122] = '1,71,108,71' $PictArray[123] = '111,71,260,71' $PictArray[124] = '263,71,376,71' $PictArray[125] = '1,72,108,72' $PictArray[126] = '110,72,261,72' $PictArray[127] = '263,72,376,72' $PictArray[128] = '1,73,106,73' $PictArray[129] = '109,73,262,73' $PictArray[130] = '265,73,376,73' $PictArray[131] = '1,74,105,74' $PictArray[132] = '108,74,263,74' $PictArray[133] = '265,74,376,74' $PictArray[134] = '1,75,104,75' $PictArray[135] = '107,75,264,75' $PictArray[136] = '269,75,376,75' $PictArray[137] = '1,76,104,76' $PictArray[138] = '106,76,267,76' $PictArray[139] = '269,76,376,76' $PictArray[140] = '1,77,100,77' $PictArray[141] = '105,77,268,77' $PictArray[142] = '271,77,376,77' $PictArray[143] = '1,78,100,78' $PictArray[144] = '102,78,269,78' $PictArray[145] = '271,78,376,78' $PictArray[146] = '1,79,98,79' $PictArray[147] = '101,79,270,79' $PictArray[148] = '273,79,376,79' $PictArray[149] = '1,80,98,80' $PictArray[150] = '100,80,271,80' $PictArray[151] = '273,80,376,80' $PictArray[152] = '1,81,96,81' $PictArray[153] = '99,81,272,81' $PictArray[154] = '275,81,376,81' $PictArray[155] = '1,82,96,82' $PictArray[156] = '98,82,273,82' $PictArray[157] = '275,82,376,82' $PictArray[158] = '1,83,94,83' $PictArray[159] = '97,83,274,83' $PictArray[160] = '277,83,376,83' $PictArray[161] = '1,84,94,84' $PictArray[162] = '96,84,275,84' $PictArray[163] = '277,84,376,84' $PictArray[164] = '1,85,92,85' $PictArray[165] = '95,85,276,85' $PictArray[166] = '279,85,376,85' $PictArray[167] = '1,86,92,86' $PictArray[168] = '94,86,277,86' $PictArray[169] = '279,86,376,86' $PictArray[170] = '1,87,90,87' $PictArray[171] = '93,87,278,87' $PictArray[172] = '281,87,376,87' $PictArray[173] = '1,88,90,88' $PictArray[174] = '92,88,279,88' $PictArray[175] = '281,88,376,88' $PictArray[176] = '1,89,88,89' $PictArray[177] = '91,89,280,89' $PictArray[178] = '283,89,376,89' $PictArray[179] = '1,90,88,90' $PictArray[180] = '90,90,281,90' $PictArray[181] = '283,90,376,90' $PictArray[182] = '1,91,86,91' $PictArray[183] = '89,91,282,91' $PictArray[184] = '285,91,376,91' $PictArray[185] = '1,92,86,92' $PictArray[186] = '88,92,283,92' $PictArray[187] = '285,92,376,92' $PictArray[188] = '1,93,84,93' $PictArray[189] = '87,93,284,93' $PictArray[190] = '287,93,376,93' $PictArray[191] = '1,94,84,94' $PictArray[192] = '86,94,285,94' $PictArray[193] = '287,94,376,94' $PictArray[194] = '1,95,84,95' $PictArray[195] = '86,95,285,95' $PictArray[196] = '287,95,376,95' $PictArray[197] = '1,96,84,96' $PictArray[198] = '86,96,285,96' $PictArray[199] = '287,96,376,96' $PictArray[200] = '1,97,82,97' $PictArray[201] = '85,97,286,97' $PictArray[202] = '289,97,376,97' $PictArray[203] = '1,98,81,98' $PictArray[204] = '84,98,287,98' $PictArray[205] = '289,98,376,98' $PictArray[206] = '1,99,80,99' $PictArray[207] = '83,99,288,99' $PictArray[208] = '291,99,376,99' $PictArray[209] = '1,100,80,100' $PictArray[210] = '82,100,289,100' $PictArray[211] = '291,100,376,100' $PictArray[212] = '1,101,78,101' $PictArray[213] = '81,101,290,101' $PictArray[214] = '293,101,376,101' $PictArray[215] = '1,102,78,102' $PictArray[216] = '80,102,291,102' $PictArray[217] = '293,102,376,102' $PictArray[218] = '1,103,78,103' $PictArray[219] = '80,103,292,103' $PictArray[220] = '295,103,376,103' $PictArray[221] = '1,104,78,104' $PictArray[222] = '80,104,293,104' $PictArray[223] = '295,104,376,104' $PictArray[224] = '1,105,76,105' $PictArray[225] = '79,105,293,105' $PictArray[226] = '295,105,376,105' $PictArray[227] = '1,106,76,106' $PictArray[228] = '78,106,293,106' $PictArray[229] = '295,106,376,106' $PictArray[230] = '1,107,74,107' $PictArray[231] = '77,107,294,107' $PictArray[232] = '297,107,376,107' $PictArray[233] = '1,108,74,108' $PictArray[234] = '76,108,295,108' $PictArray[235] = '297,108,376,108' $PictArray[236] = '1,109,74,109' $PictArray[237] = '76,109,296,109' $PictArray[238] = '299,109,376,109' $PictArray[239] = '1,110,74,110' $PictArray[240] = '76,110,297,110' $PictArray[241] = '299,110,376,110' $PictArray[242] = '1,111,72,111' $PictArray[243] = '75,111,297,111' $PictArray[244] = '299,111,376,111' $PictArray[245] = '1,112,72,112' $PictArray[246] = '74,112,297,112' $PictArray[247] = '299,112,376,112' $PictArray[248] = '1,113,70,113' $PictArray[249] = '73,113,298,113' $PictArray[250] = '301,113,376,113' $PictArray[251] = '1,114,70,114' $PictArray[252] = '72,114,299,114' $PictArray[253] = '301,114,376,114' $PictArray[254] = '1,115,70,115' $PictArray[255] = '72,115,299,115' $PictArray[256] = '301,115,376,115' $PictArray[257] = '1,116,70,116' $PictArray[258] = '72,116,299,116' $PictArray[259] = '301,116,376,116' $PictArray[260] = '1,117,68,117' $PictArray[261] = '71,117,300,117' $PictArray[262] = '303,117,376,117' $PictArray[263] = '1,118,68,118' $PictArray[264] = '70,118,301,118' $PictArray[265] = '303,118,376,118' $PictArray[266] = '1,119,68,119' $PictArray[267] = '70,119,301,119' $PictArray[268] = '303,119,376,119' $PictArray[269] = '1,120,68,120' $PictArray[270] = '70,120,301,120' $PictArray[271] = '303,120,376,120' $PictArray[272] = '1,121,66,121' $PictArray[273] = '69,121,302,121' $PictArray[274] = '305,121,376,121' $PictArray[275] = '1,122,66,122' $PictArray[276] = '68,122,303,122' $PictArray[277] = '305,122,376,122' $PictArray[278] = '1,123,66,123' $PictArray[279] = '68,123,304,123' $PictArray[280] = '307,123,376,123' $PictArray[281] = '1,124,66,124' $PictArray[282] = '68,124,305,124' $PictArray[283] = '307,124,376,124' $PictArray[284] = '1,125,64,125' $PictArray[285] = '67,125,305,125' $PictArray[286] = '307,125,376,125' $PictArray[287] = '1,126,64,126' $PictArray[288] = '66,126,305,126' $PictArray[289] = '307,126,376,126' $PictArray[290] = '1,127,64,127' $PictArray[291] = '66,127,67,127' $PictArray[292] = '69,127,306,127' $PictArray[293] = '309,127,376,127' $PictArray[294] = '1,128,64,128' $PictArray[295] = '66,128,307,128' $PictArray[296] = '309,128,376,128' $PictArray[297] = '1,129,62,129' $PictArray[298] = '65,129,307,129' $PictArray[299] = '309,129,376,129' $PictArray[300] = '1,130,62,130' $PictArray[301] = '64,130,307,130' $PictArray[302] = '309,130,376,130' $PictArray[303] = '1,131,62,131' $PictArray[304] = '64,131,307,131' $PictArray[305] = '309,131,376,131' $PictArray[306] = '1,132,62,132' $PictArray[307] = '64,132,307,132' $PictArray[308] = '309,132,376,132' $PictArray[309] = '1,133,60,133' $PictArray[310] = '63,133,308,133' $PictArray[311] = '311,133,376,133' $PictArray[312] = '1,134,60,134' $PictArray[313] = '62,134,309,134' $PictArray[314] = '311,134,376,134' $PictArray[315] = '1,135,60,135' $PictArray[316] = '62,135,309,135' $PictArray[317] = '311,135,376,135' $PictArray[318] = '1,136,60,136' $PictArray[319] = '62,136,309,136' $PictArray[320] = '311,136,376,136' $PictArray[321] = '1,137,60,137' $PictArray[322] = '62,137,310,137' $PictArray[323] = '313,137,376,137' $PictArray[324] = '1,138,60,138' $PictArray[325] = '62,138,311,138' $PictArray[326] = '313,138,376,138' $PictArray[327] = '1,139,58,139' $PictArray[328] = '61,139,311,139' $PictArray[329] = '313,139,376,139' $PictArray[330] = '1,140,58,140' $PictArray[331] = '60,140,311,140' $PictArray[332] = '313,140,376,140' $PictArray[333] = '1,141,58,141' $PictArray[334] = '60,141,311,141' $PictArray[335] = '313,141,376,141' $PictArray[336] = '1,142,58,142' $PictArray[337] = '60,142,311,142' $PictArray[338] = '313,142,376,142' $PictArray[339] = '1,143,58,143' $PictArray[340] = '60,143,312,143' $PictArray[341] = '315,143,376,143' $PictArray[342] = '1,144,58,144' $PictArray[343] = '60,144,313,144' $PictArray[344] = '315,144,376,144' $PictArray[345] = '1,145,56,145' $PictArray[346] = '59,145,313,145' $PictArray[347] = '315,145,376,145' $PictArray[348] = '1,146,56,146' $PictArray[349] = '58,146,313,146' $PictArray[350] = '315,146,376,146' $PictArray[351] = '1,147,56,147' $PictArray[352] = '58,147,313,147' $PictArray[353] = '315,147,376,147' $PictArray[354] = '1,148,56,148' $PictArray[355] = '58,148,313,148' $PictArray[356] = '315,148,376,148' $PictArray[357] = '1,149,56,149' $PictArray[358] = '58,149,313,149' $PictArray[359] = '315,149,376,149' $PictArray[360] = '1,150,56,150' $PictArray[361] = '58,150,313,150' $PictArray[362] = '315,150,376,150' $PictArray[363] = '1,151,56,151' $PictArray[364] = '58,151,314,151' $PictArray[365] = '317,151,376,151' $PictArray[366] = '1,152,56,152' $PictArray[367] = '58,152,315,152' $PictArray[368] = '317,152,376,152' $PictArray[369] = '1,153,54,153' $PictArray[370] = '57,153,315,153' $PictArray[371] = '317,153,376,153' $PictArray[372] = '1,154,54,154' $PictArray[373] = '56,154,315,154' $PictArray[374] = '317,154,376,154' $PictArray[375] = '1,155,54,155' $PictArray[376] = '56,155,315,155' $PictArray[377] = '317,155,376,155' $PictArray[378] = '1,156,54,156' $PictArray[379] = '56,156,315,156' $PictArray[380] = '317,156,376,156' $PictArray[381] = '1,157,54,157' $PictArray[382] = '56,157,315,157' $PictArray[383] = '317,157,376,157' $PictArray[384] = '1,158,54,158' $PictArray[385] = '56,158,315,158' $PictArray[386] = '317,158,376,158' $PictArray[387] = '1,159,54,159' $PictArray[388] = '56,159,315,159' $PictArray[389] = '317,159,376,159' $PictArray[390] = '1,160,54,160' $PictArray[391] = '56,160,315,160' $PictArray[392] = '317,160,376,160' $PictArray[393] = '1,161,54,161' $PictArray[394] = '56,161,316,161' $PictArray[395] = '319,161,376,161' $PictArray[396] = '1,162,54,162' $PictArray[397] = '56,162,317,162' $PictArray[398] = '319,162,376,162' $PictArray[399] = '1,163,54,163' $PictArray[400] = '56,163,317,163' $PictArray[401] = '319,163,376,163' $PictArray[402] = '1,164,54,164' $PictArray[403] = '56,164,317,164' $PictArray[404] = '319,164,376,164' $PictArray[405] = '1,165,52,165' $PictArray[406] = '55,165,317,165' $PictArray[407] = '319,165,376,165' $PictArray[408] = '1,166,52,166' $PictArray[409] = '54,166,317,166' $PictArray[410] = '319,166,376,166' $PictArray[411] = '1,167,52,167' $PictArray[412] = '54,167,317,167' $PictArray[413] = '319,167,376,167' $PictArray[414] = '1,168,52,168' $PictArray[415] = '54,168,317,168' $PictArray[416] = '319,168,376,168' $PictArray[417] = '1,169,52,169' $PictArray[418] = '54,169,317,169' $PictArray[419] = '319,169,376,169' $PictArray[420] = '1,170,52,170' $PictArray[421] = '54,170,317,170' $PictArray[422] = '319,170,376,170' $PictArray[423] = '1,171,52,171' $PictArray[424] = '54,171,317,171' $PictArray[425] = '319,171,376,171' $PictArray[426] = '1,172,52,172' $PictArray[427] = '54,172,317,172' $PictArray[428] = '319,172,376,172' $PictArray[429] = '1,173,52,173' $PictArray[430] = '54,173,317,173' $PictArray[431] = '319,173,376,173' $PictArray[432] = '1,174,52,174' $PictArray[433] = '54,174,317,174' $PictArray[434] = '319,174,376,174' $PictArray[435] = '1,175,52,175' $PictArray[436] = '54,175,317,175' $PictArray[437] = '319,175,376,175' $PictArray[438] = '1,176,52,176' $PictArray[439] = '54,176,317,176' $PictArray[440] = '319,176,376,176' $PictArray[441] = '1,177,52,177' $PictArray[442] = '54,177,317,177' $PictArray[443] = '319,177,376,177' $PictArray[444] = '1,178,52,178' $PictArray[445] = '54,178,317,178' $PictArray[446] = '319,178,376,178' $PictArray[447] = '1,179,52,179' $PictArray[448] = '54,179,317,179' $PictArray[449] = '319,179,376,179' $PictArray[450] = '1,180,52,180' $PictArray[451] = '54,180,317,180' $PictArray[452] = '319,180,376,180' $PictArray[453] = '1,181,52,181' $PictArray[454] = '54,181,317,181' $PictArray[455] = '319,181,376,181' $PictArray[456] = '1,182,52,182' $PictArray[457] = '54,182,317,182' $PictArray[458] = '319,182,376,182' $PictArray[459] = '1,183,52,183' $PictArray[460] = '54,183,317,183' $PictArray[461] = '319,183,376,183' $PictArray[462] = '1,184,52,184' $PictArray[463] = '54,184,317,184' $PictArray[464] = '319,184,376,184' $PictArray[465] = '1,185,52,185' $PictArray[466] = '54,185,317,185' $PictArray[467] = '319,185,376,185' $PictArray[468] = '1,186,52,186' $PictArray[469] = '54,186,317,186' $PictArray[470] = '319,186,376,186' $PictArray[471] = '1,187,52,187' $PictArray[472] = '54,187,317,187' $PictArray[473] = '319,187,376,187' $PictArray[474] = '1,188,52,188' $PictArray[475] = '54,188,317,188' $PictArray[476] = '319,188,376,188' $PictArray[477] = '1,189,52,189' $PictArray[478] = '54,189,317,189' $PictArray[479] = '319,189,376,189' $PictArray[480] = '1,190,52,190' $PictArray[481] = '55,190,317,190' $PictArray[482] = '319,190,376,190' $PictArray[483] = '1,191,54,191' $PictArray[484] = '56,191,317,191' $PictArray[485] = '319,191,376,191' $PictArray[486] = '1,192,54,192' $PictArray[487] = '56,192,317,192' $PictArray[488] = '319,192,376,192' $PictArray[489] = '1,193,54,193' $PictArray[490] = '56,193,317,193' $PictArray[491] = '319,193,376,193' $PictArray[492] = '1,194,54,194' $PictArray[493] = '56,194,316,194' $PictArray[494] = '319,194,376,194' $PictArray[495] = '1,195,54,195' $PictArray[496] = '56,195,315,195' $PictArray[497] = '317,195,376,195' $PictArray[498] = '1,196,54,196' $PictArray[499] = '56,196,315,196' $PictArray[500] = '317,196,376,196' $PictArray[501] = '1,197,54,197' $PictArray[502] = '56,197,315,197' $PictArray[503] = '317,197,376,197' $PictArray[504] = '1,198,54,198' $PictArray[505] = '56,198,315,198' $PictArray[506] = '317,198,376,198' $PictArray[507] = '1,199,54,199' $PictArray[508] = '56,199,315,199' $PictArray[509] = '317,199,376,199' $PictArray[510] = '1,200,54,200' $PictArray[511] = '56,200,315,200' $PictArray[512] = '317,200,376,200' $PictArray[513] = '1,201,54,201' $PictArray[514] = '56,201,315,201' $PictArray[515] = '317,201,376,201' $PictArray[516] = '1,202,54,202' $PictArray[517] = '57,202,315,202' $PictArray[518] = '317,202,376,202' $PictArray[519] = '1,203,56,203' $PictArray[520] = '58,203,315,203' $PictArray[521] = '317,203,376,203' $PictArray[522] = '1,204,56,204' $PictArray[523] = '58,204,314,204' $PictArray[524] = '317,204,376,204' $PictArray[525] = '1,205,56,205' $PictArray[526] = '58,205,313,205' $PictArray[527] = '315,205,376,205' $PictArray[528] = '1,206,56,206' $PictArray[529] = '58,206,313,206' $PictArray[530] = '315,206,376,206' $PictArray[531] = '1,207,56,207' $PictArray[532] = '58,207,313,207' $PictArray[533] = '315,207,376,207' $PictArray[534] = '1,208,56,208' $PictArray[535] = '58,208,313,208' $PictArray[536] = '315,208,376,208' $PictArray[537] = '1,209,56,209' $PictArray[538] = '58,209,313,209' $PictArray[539] = '315,209,376,209' $PictArray[540] = '1,210,56,210' $PictArray[541] = '59,210,313,210' $PictArray[542] = '315,210,376,210' $PictArray[543] = '1,211,58,211' $PictArray[544] = '60,211,313,211' $PictArray[545] = '315,211,376,211' $PictArray[546] = '1,212,58,212' $PictArray[547] = '60,212,312,212' $PictArray[548] = '315,212,376,212' $PictArray[549] = '1,213,58,213' $PictArray[550] = '60,213,311,213' $PictArray[551] = '313,213,376,213' $PictArray[552] = '1,214,58,214' $PictArray[553] = '60,214,311,214' $PictArray[554] = '313,214,376,214' $PictArray[555] = '1,215,58,215' $PictArray[556] = '60,215,311,215' $PictArray[557] = '313,215,376,215' $PictArray[558] = '1,216,58,216' $PictArray[559] = '61,216,311,216' $PictArray[560] = '313,216,376,216' $PictArray[561] = '1,217,60,217' $PictArray[562] = '62,217,311,217' $PictArray[563] = '313,217,376,217' $PictArray[564] = '1,218,60,218' $PictArray[565] = '62,218,310,218' $PictArray[566] = '313,218,376,218' $PictArray[567] = '1,219,60,219' $PictArray[568] = '62,219,309,219' $PictArray[569] = '311,219,376,219' $PictArray[570] = '1,220,60,220' $PictArray[571] = '62,220,309,220' $PictArray[572] = '311,220,376,220' $PictArray[573] = '1,221,60,221' $PictArray[574] = '62,221,309,221' $PictArray[575] = '311,221,376,221' $PictArray[576] = '1,222,60,222' $PictArray[577] = '63,222,308,222' $PictArray[578] = '311,222,376,222' $PictArray[579] = '1,223,62,223' $PictArray[580] = '64,223,307,223' $PictArray[581] = '309,223,376,223' $PictArray[582] = '1,224,62,224' $PictArray[583] = '64,224,307,224' $PictArray[584] = '309,224,376,224' $PictArray[585] = '1,225,62,225' $PictArray[586] = '64,225,307,225' $PictArray[587] = '309,225,376,225' $PictArray[588] = '1,226,62,226' $PictArray[589] = '65,226,307,226' $PictArray[590] = '309,226,376,226' $PictArray[591] = '1,227,64,227' $PictArray[592] = '66,227,307,227' $PictArray[593] = '309,227,376,227' $PictArray[594] = '1,228,64,228' $PictArray[595] = '66,228,306,228' $PictArray[596] = '309,228,376,228' $PictArray[597] = '1,229,64,229' $PictArray[598] = '66,229,305,229' $PictArray[599] = '307,229,376,229' $PictArray[600] = '1,230,64,230' $PictArray[601] = '67,230,305,230' $PictArray[602] = '307,230,376,230' $PictArray[603] = '1,231,66,231' $PictArray[604] = '68,231,305,231' $PictArray[605] = '307,231,376,231' $PictArray[606] = '1,232,66,232' $PictArray[607] = '68,232,304,232' $PictArray[608] = '307,232,376,232' $PictArray[609] = '1,233,66,233' $PictArray[610] = '68,233,303,233' $PictArray[611] = '305,233,376,233' $PictArray[612] = '1,234,66,234' $PictArray[613] = '69,234,302,234' $PictArray[614] = '305,234,376,234' $PictArray[615] = '1,235,68,235' $PictArray[616] = '70,235,301,235' $PictArray[617] = '303,235,376,235' $PictArray[618] = '1,236,68,236' $PictArray[619] = '70,236,301,236' $PictArray[620] = '303,236,376,236' $PictArray[621] = '1,237,68,237' $PictArray[622] = '70,237,301,237' $PictArray[623] = '303,237,376,237' $PictArray[624] = '1,238,68,238' $PictArray[625] = '71,238,300,238' $PictArray[626] = '303,238,376,238' $PictArray[627] = '1,239,70,239' $PictArray[628] = '72,239,299,239' $PictArray[629] = '301,239,376,239' $PictArray[630] = '1,240,70,240' $PictArray[631] = '72,240,299,240' $PictArray[632] = '301,240,376,240' $PictArray[633] = '1,241,70,241' $PictArray[634] = '72,241,299,241' $PictArray[635] = '301,241,376,241' $PictArray[636] = '1,242,70,242' $PictArray[637] = '73,242,298,242' $PictArray[638] = '301,242,376,242' $PictArray[639] = '1,243,72,243' $PictArray[640] = '74,243,297,243' $PictArray[641] = '299,243,376,243' $PictArray[642] = '1,244,72,244' $PictArray[643] = '75,244,297,244' $PictArray[644] = '299,244,376,244' $PictArray[645] = '1,245,74,245' $PictArray[646] = '76,245,297,245' $PictArray[647] = '299,245,376,245' $PictArray[648] = '1,246,74,246' $PictArray[649] = '76,246,296,246' $PictArray[650] = '299,246,376,246' $PictArray[651] = '1,247,74,247' $PictArray[652] = '76,247,295,247' $PictArray[653] = '297,247,376,247' $PictArray[654] = '1,248,74,248' $PictArray[655] = '77,248,294,248' $PictArray[656] = '297,248,376,248' $PictArray[657] = '1,249,76,249' $PictArray[658] = '78,249,293,249' $PictArray[659] = '295,249,376,249' $PictArray[660] = '1,250,76,250' $PictArray[661] = '79,250,292,250' $PictArray[662] = '295,250,376,250' $PictArray[663] = '1,251,78,251' $PictArray[664] = '80,251,291,251' $PictArray[665] = '293,251,376,251' $PictArray[666] = '1,252,78,252' $PictArray[667] = '80,252,291,252' $PictArray[668] = '293,252,376,252' $PictArray[669] = '1,253,78,253' $PictArray[670] = '80,253,291,253' $PictArray[671] = '293,253,376,253' $PictArray[672] = '1,254,78,254' $PictArray[673] = '81,254,290,254' $PictArray[674] = '293,254,376,254' $PictArray[675] = '1,255,80,255' $PictArray[676] = '82,255,289,255' $PictArray[677] = '291,255,376,255' $PictArray[678] = '1,256,80,256' $PictArray[679] = '83,256,288,256' $PictArray[680] = '291,256,376,256' $PictArray[681] = '1,257,82,257' $PictArray[682] = '84,257,287,257' $PictArray[683] = '289,257,376,257' $PictArray[684] = '1,258,82,258' $PictArray[685] = '84,258,286,258' $PictArray[686] = '289,258,376,258' $PictArray[687] = '1,259,82,259' $PictArray[688] = '84,259,285,259' $PictArray[689] = '287,259,376,259' $PictArray[690] = '1,260,82,260' $PictArray[691] = '85,260,285,260' $PictArray[692] = '287,260,376,260' $PictArray[693] = '1,261,84,261' $PictArray[694] = '86,261,285,261' $PictArray[695] = '287,261,376,261' $PictArray[696] = '1,262,84,262' $PictArray[697] = '86,262,284,262' $PictArray[698] = '287,262,376,262' $PictArray[699] = '1,263,84,263' $PictArray[700] = '86,263,283,263' $PictArray[701] = '285,263,376,263' $PictArray[702] = '1,264,84,264' $PictArray[703] = '87,264,282,264' $PictArray[704] = '285,264,376,264' $PictArray[705] = '1,265,86,265' $PictArray[706] = '88,265,281,265' $PictArray[707] = '283,265,376,265' $PictArray[708] = '1,266,86,266' $PictArray[709] = '89,266,280,266' $PictArray[710] = '283,266,376,266' $PictArray[711] = '1,267,88,267' $PictArray[712] = '90,267,279,267' $PictArray[713] = '281,267,376,267' $PictArray[714] = '1,268,88,268' $PictArray[715] = '91,268,279,268' $PictArray[716] = '281,268,376,268' $PictArray[717] = '1,269,90,269' $PictArray[718] = '92,269,279,269' $PictArray[719] = '281,269,376,269' $PictArray[720] = '1,270,90,270' $PictArray[721] = '93,270,278,270' $PictArray[722] = '281,270,376,270' $PictArray[723] = '1,271,92,271' $PictArray[724] = '94,271,277,271' $PictArray[725] = '279,271,376,271' $PictArray[726] = '1,272,92,272' $PictArray[727] = '95,272,276,272' $PictArray[728] = '279,272,376,272' $PictArray[729] = '1,273,94,273' $PictArray[730] = '96,273,275,273' $PictArray[731] = '277,273,376,273' $PictArray[732] = '1,274,94,274' $PictArray[733] = '99,274,274,274' $PictArray[734] = '277,274,376,274' $PictArray[735] = '1,275,98,275' $PictArray[736] = '100,275,273,275' $PictArray[737] = '275,275,376,275' $PictArray[738] = '1,276,98,276' $PictArray[739] = '101,276,270,276' $PictArray[740] = '275,276,376,276' $PictArray[741] = '1,277,100,277' $PictArray[742] = '102,277,269,277' $PictArray[743] = '271,277,376,277' $PictArray[744] = '1,278,98,278' $PictArray[745] = '100,278,100,278' $PictArray[746] = '103,278,268,278' $PictArray[747] = '271,278,376,278' $PictArray[748] = '1,279,102,279' $PictArray[749] = '104,279,267,279' $PictArray[750] = '269,279,376,279' $PictArray[751] = '1,280,102,280' $PictArray[752] = '105,280,266,280' $PictArray[753] = '269,280,376,280' $PictArray[754] = '1,281,104,281' $PictArray[755] = '106,281,265,281' $PictArray[756] = '267,281,376,281' $PictArray[757] = '1,282,104,282' $PictArray[758] = '107,282,264,282' $PictArray[759] = '267,282,376,282' $PictArray[760] = '1,283,106,283' $PictArray[761] = '108,283,263,283' $PictArray[762] = '265,283,376,283' $PictArray[763] = '1,284,106,284' $PictArray[764] = '111,284,260,284' $PictArray[765] = '265,284,376,284' $PictArray[766] = '1,285,110,285' $PictArray[767] = '112,285,259,285' $PictArray[768] = '261,285,376,285' $PictArray[769] = '1,286,110,286' $PictArray[770] = '113,286,258,286' $PictArray[771] = '261,286,376,286' $PictArray[772] = '1,287,112,287' $PictArray[773] = '114,287,257,287' $PictArray[774] = '259,287,376,287' $PictArray[775] = '1,288,112,288' $PictArray[776] = '117,288,256,288' $PictArray[777] = '259,288,376,288' $PictArray[778] = '1,289,116,289' $PictArray[779] = '118,289,255,289' $PictArray[780] = '257,289,376,289' $PictArray[781] = '1,290,116,290' $PictArray[782] = '121,290,252,290' $PictArray[783] = '257,290,376,290' $PictArray[784] = '1,291,120,291' $PictArray[785] = '122,291,251,291' $PictArray[786] = '253,291,376,291' $PictArray[787] = '1,292,120,292' $PictArray[788] = '125,292,248,292' $PictArray[789] = '253,292,376,292' $PictArray[790] = '1,293,124,293' $PictArray[791] = '126,293,241,293' $PictArray[792] = '243,293,247,293' $PictArray[793] = '249,293,376,293' $PictArray[794] = '1,294,124,294' $PictArray[795] = '129,294,244,294' $PictArray[796] = '249,294,376,294' $PictArray[797] = '1,295,128,295' $PictArray[798] = '130,295,243,295' $PictArray[799] = '245,295,376,295' $PictArray[800] = '1,296,128,296' $PictArray[801] = '133,296,238,296' $PictArray[802] = '245,296,376,296' $PictArray[803] = '1,297,132,297' $PictArray[804] = '134,297,237,297' $PictArray[805] = '239,297,376,297' $PictArray[806] = '1,298,132,298' $PictArray[807] = '137,298,234,298' $PictArray[808] = '239,298,376,298' $PictArray[809] = '1,299,136,299' $PictArray[810] = '138,299,233,299' $PictArray[811] = '235,299,376,299' $PictArray[812] = '1,300,136,300' $PictArray[813] = '141,300,230,300' $PictArray[814] = '235,300,376,300' $PictArray[815] = '1,301,140,301' $PictArray[816] = '142,301,229,301' $PictArray[817] = '231,301,376,301' $PictArray[818] = '1,302,140,302' $PictArray[819] = '147,302,224,302' $PictArray[820] = '231,302,376,302' $PictArray[821] = '1,303,146,303' $PictArray[822] = '148,303,223,303' $PictArray[823] = '225,303,376,303' $PictArray[824] = '1,304,146,304' $PictArray[825] = '153,304,218,304' $PictArray[826] = '225,304,376,304' $PictArray[827] = '1,305,152,305' $PictArray[828] = '154,305,217,305' $PictArray[829] = '219,305,376,305' $PictArray[830] = '1,306,152,306' $PictArray[831] = '161,306,210,306' $PictArray[832] = '219,306,376,306' $PictArray[833] = '1,307,160,307' $PictArray[834] = '162,307,209,307' $PictArray[835] = '211,307,376,307' $PictArray[836] = '1,308,160,308' $PictArray[837] = '171,308,200,308' $PictArray[838] = '211,308,376,308' $PictArray[839] = '1,309,170,309' $PictArray[840] = '172,309,199,309' $PictArray[841] = '201,309,376,309' $PictArray[842] = '1,310,170,310' $PictArray[843] = '201,310,376,310' $PictArray[844] = '1,311,376,311' $PictArray[845] = '1,312,376,312' $PictArray[846] = '1,313,376,313' $PictArray[847] = '1,314,376,314' $PictArray[848] = '1,315,376,315' $PictArray[849] = '1,316,376,316' $PictArray[850] = '1,317,376,317' $PictArray[851] = '1,318,376,318' $PictArray[852] = '1,319,376,319' $PictArray[853] = '1,320,376,320' $PictArray[854] = '1,321,376,321' $PictArray[855] = '1,322,376,322' $PictArray[856] = '1,323,376,323' $PictArray[857] = '1,324,376,324' $PictArray[858] = '1,325,376,325' $PictArray[859] = '1,326,376,326' $PictArray[860] = '1,327,376,327' $PictArray[861] = '1,328,376,328' $PictArray[862] = '1,329,376,329' $PictArray[863] = '1,330,376,330' $PictArray[864] = '1,331,376,331' $PictArray[865] = '1,332,376,332' $PictArray[866] = '1,333,376,333' $PictArray[867] = '1,334,376,334' $PictArray[868] = '1,335,376,335' $PictArray[869] = '1,336,376,336' $PictArray[870] = '1,337,376,337' $PictArray[871] = '1,338,376,338' $PictArray[872] = '1,339,376,339' $PictArray[873] = '1,340,376,340' $PictArray[874] = '1,341,376,341' $PictArray[875] = '1,342,376,342' $PictArray[876] = '1,343,376,343' $PictArray[877] = '1,344,376,344' $PictArray[878] = '1,345,376,345' $PictArray[879] = '1,346,376,346' $PictArray[880] = '1,347,376,347' $PictArray[881] = '1,348,376,348' $PictArray[882] = '1,349,376,349' $PictArray[883] = '1,350,376,350' $PictArray[884] = '1,351,376,351' $PictArray[885] = '1,352,376,352' $PictArray[886] = '1,353,376,353' $PictArray[887] = '1,354,376,354' $PictArray[888] = '1,355,376,355' $PictArray[889] = '1,356,376,356' $PictArray[890] = '1,357,376,357' $PictArray[891] = '1,358,376,358' #EndRegion picture array ; 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] - 1 , '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# ==============================================================