Leaderboard
Popular Content
Showing content with the highest reputation on 02/11/2021 in all areas
-
If @error
Marcel2304 and one other reacted to Nine for a topic
Switch @error Case 0 ;do something here Case 230 ;do something else EndSwitch2 points -
Scripting example based on code by ChimpWebView2-4.au3: #AutoIt3Wrapper_Au3Check_Parameters=-d -w- 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #AutoIt3Wrapper_UseX64=y Opt( "MustDeclareVars", 1 ) #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPICom.au3> #include <WinAPI.au3> Global $hGui ; Project includes #include "..\Includes\WV2Interfaces.au3" WebView2() Func WebView2() ; Create WebView2 GUI $hGui = GUICreate( "WebView2 Sample", 600, 300, -1, -1, $WS_OVERLAPPEDWINDOW ) ; Create Button Local $idButton = GUICtrlCreateButton( "ExecuteScript", 10, 250, 170, 40 ) ; Initialize COM _WinAPI_CoInitialize( $COINIT_APARTMENTTHREADED ) ; Create callback interface and functions CoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerCreate( True ) ; Forces CoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Invoke() below to be executed ; Create callback interface and functions CoreWebView2CreateCoreWebView2ControllerCompletedHandlerCreate( True ) ; Create callback interface and functions CoreWebView2ExecuteScriptCompletedHandlerCreate( True ) ; DllCall CreateCoreWebView2EnvironmentWithOptions Local $hWebView2Loader = DllOpen( @AutoItX64 ? "WebView2Loader-x64.dll" : "WebView2Loader-x86.dll" ) Local $aRet = DllCall( $hWebView2Loader, "long", "CreateCoreWebView2EnvironmentWithOptions", "wstr", "", "wstr", "", _ "ptr", Null, "ptr", $pCoreWebView2CreateCoreWebView2EnvironmentCompletedHandler ) If @error Or $aRet[0] Then Return ConsoleWrite( "CreateCoreWebView2EnvironmentWithOptions ERR" & @CRLF ) ConsoleWrite( "CreateCoreWebView2EnvironmentWithOptions OK" & @CRLF & @CRLF ) ; Show WebView2 GUI GUISetState( @SW_SHOW ) ; Loop While 1 Switch GUIGetMsg() Case $GUI_EVENT_MAXIMIZE, $GUI_EVENT_RESIZED, $GUI_EVENT_RESTORE Local $tRect = _WinAPI_GetClientRect( $hGui ) $oCoreWebView2Controller.put_Bounds( $tRect ) Case $idButton $oCoreWebView2.ExecuteScript( "alert( 'Hello' );", $pCoreWebView2ExecuteScriptCompletedHandler ) ; Forces CoreWebView2ExecuteScriptCompletedHandler_Invoke() below to be executed Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd ; Cleanup CoreWebView2CreateCoreWebView2ControllerCompletedHandlerDelete() CoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerDelete() CoreWebView2ExecuteScriptCompletedHandlerDelete() DllClose( $hWebView2Loader ) EndFunc ; Copied from WV2Interfaces.au3 ; Executed automatically when the callback interface is created Func CoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Invoke( $pSelf, $long, $ptr ) ; Ret: long Par: long;ptr* ConsoleWrite( "CoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Invoke" & @CRLF ) ; Create CoreWebView2Environment object $oCoreWebView2Environment = ObjCreateInterface( $ptr, $sIID_ICoreWebView2Environment, $dtag_ICoreWebView2Environment ) ConsoleWrite( "IsObj( $oCoreWebView2Environment ) = " & IsObj( $oCoreWebView2Environment ) & @CRLF & @CRLF ) ; Set $pCoreWebView2CreateCoreWebView2ControllerCompletedHandler callback pointer for the WebView2 GUI $oCoreWebView2Environment.CreateCoreWebView2Controller( $hGui, $pCoreWebView2CreateCoreWebView2ControllerCompletedHandler ) ; Forces CoreWebView2CreateCoreWebView2ControllerCompletedHandler_Invoke() below to be executed Return 0 ; S_OK = 0x00000000 #forceref $pSelf, $long EndFunc ; Copied from WV2Interfaces.au3 ; Executed as a consequence of $oCoreWebView2Environment.CreateCoreWebView2Controller() above Func CoreWebView2CreateCoreWebView2ControllerCompletedHandler_Invoke( $pSelf, $long, $ptr ) ; Ret: long Par: long;ptr* ConsoleWrite( "CoreWebView2CreateCoreWebView2ControllerCompletedHandler_Invoke" & @CRLF ) ; Create CoreWebView2Controller object $oCoreWebView2Controller = ObjCreateInterface( $ptr, $sIID_ICoreWebView2Controller, $dtag_ICoreWebView2Controller ) ConsoleWrite( "IsObj( $oCoreWebView2Controller ) = " & IsObj( $oCoreWebView2Controller ) & @CRLF ) $oCoreWebView2Controller.AddRef() ; Prevent the object from being deleted when the function ends ; Set bounds for the CoreWebView2 object Local $tRect = _WinAPI_GetClientRect( $hGui ) $oCoreWebView2Controller.put_Bounds( $tRect ) ; Create CoreWebView2 object $oCoreWebView2Controller.get_CoreWebView2( $pCoreWebView2 ) $oCoreWebView2 = ObjCreateInterface( $pCoreWebView2, $sIID_ICoreWebView2, $dtag_ICoreWebView2 ) ConsoleWrite( "IsObj( $oCoreWebView2 ) = " & IsObj( $oCoreWebView2 ) & @CRLF & @CRLF ) ; Navigate to web page $oCoreWebView2.NavigateToString( _GetPage() ) Return 0 ; S_OK = 0x00000000 #forceref $pSelf, $long EndFunc ; Copied from WV2Interfaces.au3 ; Executed as a consequence of $oCoreWebView2.ExecuteScript() above Func CoreWebView2ExecuteScriptCompletedHandler_Invoke( $pSelf, $long, $wstr ) ; Ret: long Par: long;wstr ConsoleWrite( "CoreWebView2ExecuteScriptCompletedHandler_Invoke()" & @CRLF ) ConsoleWrite( "$long = " & $long & @TAB & "$wstr = " & $wstr & @CRLF & @CRLF ) Return 0 ; S_OK = 0x00000000 #forceref $pSelf EndFunc Func _GetPage() Local $sPageSource = "" $sPageSource &= "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">" & @CRLF $sPageSource &= "<HTML><HEAD><TITLE>L E D Panel Script</TITLE>" & @CRLF $sPageSource &= "<META http-equiv=Content-Type content=""text/html; charset=windows-1252"">" & @CRLF $sPageSource &= "<STYLE type=text/css>" & @CRLF $sPageSource &= "" & @CRLF $sPageSource &= "body{" & @CRLF $sPageSource &= "background-color:black;" & @CRLF $sPageSource &= "}" & @CRLF $sPageSource &= "</STYLE>" & @CRLF $sPageSource &= "" & @CRLF $sPageSource &= "</HEAD>" & @CRLF $sPageSource &= "<BODY onload=""LEDinit()"">" & @CRLF $sPageSource &= "<img src=""https://www.autoitscript.com/forum/cdn/images/logo_autoit_210x72.svg"" width=""100"" height=""35"" style=""position: absolute; top: 5px; left: 200px;"">" & @CRLF $sPageSource &= "<SCRIPT language=JavaScript>" & @CRLF $sPageSource &= "" & @CRLF $sPageSource &= "//""L.E.D. Panel"" Script by Richard Maloney © 2002" & @CRLF $sPageSource &= "//For Custom effects, email Richard ( ottawo@rogers.com )" & @CRLF $sPageSource &= "" & @CRLF $sPageSource &= "//____________________CONFIGURATION AREA_____________________" & @CRLF $sPageSource &= "" & @CRLF $sPageSource &= "// THIS LED SCRIPT TAKES UP 200 pixels HORIZONTAL and 28 pixels VERTICAL -Have Fun :- )" & @CRLF $sPageSource &= "// YOUR MESSAGE GOES ON NEXT 4 LINES DOWN." & @CRLF $sPageSource &= "// ALLOWABLE CHARACTERS ARE: A-Z, Period, space, comma, numerals, question mark and 'message codes'." & @CRLF $sPageSource &= "// THE 4 MESSAGE CODES:" & @CRLF $sPageSource &= "// @=PAUSE FOR 3 SECONDS, #=FLASH FOR 3 SECONDS, ^=SCROLL UP EFFECT, _=SUN EFFECT, $=SPLIT EFFECT" & @CRLF $sPageSource &= "" & @CRLF $sPageSource &= "//EXAMPLE: var message=""_ Dynamic^^ Drive! # For the best dhtml scripts... www.dynamic.drive.com "";" & @CRLF $sPageSource &= "" & @CRLF $sPageSource &= "var message=""HI EVERYONE@ LARSJ HAS DONE A VERY GOOD JOB# WEBVIEW2^^ A POWERFUL TOOL !!!@$@ A NEW SUN HAS RISEN@_ "";" & @CRLF $sPageSource &= "var LEDonColor='Red'; //color of the LEDs when they are on" & @CRLF $sPageSource &= "var LEDoffColor='#7D0605'; //color of the LEDs when they are off" & @CRLF $sPageSource &= "startXPos=10; //start of horizontal position eg. startXPos=20; places the leds 20 pixels from left" & @CRLF $sPageSource &= "startYPos=10; //start of vertical position" & @CRLF $sPageSource &= "//____________________END CONFIGURATION AREA__________________" & @CRLF $sPageSource &= "" & @CRLF $sPageSource &= "var IE=( document.all ) ? true:false; var NS=( document.layers ) ? true:false; var W3C=( ( document.getElementById ) && ( !IE ) ) ? true:false;" & @CRLF $sPageSource &= "var d=document; if ( window.offscreenBuffering ) window.offscreenBuffering = true;" & @CRLF $sPageSource &= "function getCSS( id ) {" & @CRLF $sPageSource &= " if ( IE ) return d.all[id] //IE" & @CRLF $sPageSource &= " else if ( NS ) return d.layers[id] //NS4" & @CRLF $sPageSource &= " else return d.getElementById( id )//W3C" & @CRLF $sPageSource &= "}" & @CRLF $sPageSource &= "var alphabet=new Array( 44 );" & @CRLF $sPageSource &= "alphabet[0]=new Array( ""0111111"",""1001000"",""1001000"",""1001000"",""0111111"" ); alphabet[1]=new Array( ""1111111"",""1001001"",""1001001"",""1001001"",""0110110"" );//B" & @CRLF $sPageSource &= "alphabet[2]=new Array( ""0111110"",""1000001"",""1000001"",""1000001"",""0100010"" ); alphabet[3]=new Array( ""1111111"",""1000001"",""1000001"",""1000001"",""0111110"" );//D" & @CRLF $sPageSource &= "alphabet[4]=new Array( ""1111111"",""1001001"",""1001001"",""1001001"" ); alphabet[5]=new Array( ""1111111"",""1001000"",""1001000"",""1001000"" );//F" & @CRLF $sPageSource &= "alphabet[6]=new Array( ""0111110"",""1000001"",""1000001"",""1001001"",""0101110"" ); alphabet[7]=new Array( ""1111111"",""0001000"",""0001000"",""0001000"",""1111111"" );//H" & @CRLF $sPageSource &= "alphabet[8]=new Array( ""1000001"",""1111111"",""1000001"" ); alphabet[9]=new Array( ""0000110"",""0000001"",""0000001"",""0000001"",""1111110"" );//J" & @CRLF $sPageSource &= "alphabet[10]=new Array( ""1111111"",""0001000"",""0010100"",""0100010"",""1000001"" ); alphabet[11]=new Array( ""1111111"",""0000001"",""0000001"",""0000001"" );//L" & @CRLF $sPageSource &= "alphabet[12]=new Array( ""1111111"",""0010000"",""0001000"",""0010000"",""1111111"" ); alphabet[13]=new Array( ""1111111"",""0010000"",""0001000"",""0000100"",""1111111"" );//N" & @CRLF $sPageSource &= "alphabet[14]=new Array( ""0111110"",""1000001"",""1000001"",""1000001"",""0111110"" ); alphabet[15]=new Array( ""1111111"",""1001000"",""1001000"",""1001000"",""0110000"" );//P" & @CRLF $sPageSource &= "alphabet[16]=new Array( ""0111110"",""1000001"",""1000001"",""1000011"",""0111111"" ); alphabet[17]=new Array( ""1111111"",""1001000"",""1001100"",""1001010"",""0110001"" );//R" & @CRLF $sPageSource &= "alphabet[18]=new Array( ""0110010"",""1001001"",""1001001"",""1001001"",""0100110"" ); alphabet[19]=new Array( ""1000000"",""1000000"",""1111111"",""1000000"",""1000000"" );//T" & @CRLF $sPageSource &= "alphabet[20]=new Array( ""1111110"",""0000001"",""0000001"",""0000001"",""1111110"" ); alphabet[21]=new Array( ""1110000"",""0001100"",""0000011"",""0001100"",""1110000"" );//V" & @CRLF $sPageSource &= "alphabet[22]=new Array( ""1111110"",""0000001"",""0000010"",""0001100"",""0000010"",""0000001"",""1111110"" ); alphabet[23]=new Array( ""1100011"",""0010100"",""0001000"",""0010100"",""1100011"" );//X" & @CRLF $sPageSource &= "alphabet[24]=new Array( ""1100000"",""0010000"",""0001111"",""0010000"",""1100000"" ); alphabet[25]=new Array( ""1000011"",""1000101"",""1001001"",""1010001"",""1100001"" );//Z" & @CRLF $sPageSource &= "alphabet[26]=new Array( ""0000000"",""0000000"",""0000000"",""0000000"" ); alphabet[27]=new Array( ""0000000"",""0000001"",""0000000"",""0000000"",""0000000"" );//PERIOD" & @CRLF $sPageSource &= "alphabet[28]=new Array( ""0000000"",""0000000"",""1111101"",""0000000"",""0000000"" );//!" & @CRLF $sPageSource &= "alphabet[29]=new Array( ""0100001"",""1111111"",""0000001"" ); alphabet[30]=new Array( ""0100011"",""1000101"",""1001001"",""1001001"",""0110001"" );//2" & @CRLF $sPageSource &= "alphabet[31]=new Array( ""0100010"",""1001001"",""1001001"",""1001001"",""0110110"" ); alphabet[32]=new Array( ""0001000"",""0011000"",""0101000"",""1111111"",""0001000"" );//4" & @CRLF $sPageSource &= "alphabet[33]=new Array( ""1111001"",""1001001"",""1001001"",""1001001"",""1000110"" ); alphabet[34]=new Array( ""0111110"",""1001001"",""1001001"",""1001001"",""0100110"" );//6" & @CRLF $sPageSource &= "alphabet[35]=new Array( ""1000011"",""1000100"",""1001000"",""1110000"" ); alphabet[36]=new Array( ""0110110"",""1001001"",""1001001"",""1001001"",""0110110"" );//8" & @CRLF $sPageSource &= "alphabet[37]=new Array( ""0110010"",""1001001"",""1001001"",""1001001"",""0111110"" ); alphabet[38]=new Array( ""0000001"",""0000010"",""0000000"" );//COMMA" & @CRLF $sPageSource &= "alphabet[39]=new Array( ""XXXXXXX"" );//PAUSE ( @ )" & @CRLF $sPageSource &= "alphabet[40]=new Array( ""YYYYYYY"" );//FLASH ( # )" & @CRLF $sPageSource &= "alphabet[41]=new Array( ""DDDDDDD"" );//SCROLL UP EFFECT ( ^ )" & @CRLF $sPageSource &= "alphabet[42]=new Array( ""SSSSSSS"" );//SUN EFFECT ( _ )" & @CRLF $sPageSource &= "alphabet[43]=new Array( ""0100000"",""1000000"",""1001101"",""1001000"",""0110000"" );//?" & @CRLF $sPageSource &= "alphabet[44]=new Array( ""QQQQQQQ"" );//SPLIT EFFECT ( $ )" & @CRLF $sPageSource &= "" & @CRLF $sPageSource &= "message=message.toUpperCase(); //make message uppercase" & @CRLF $sPageSource &= "var messageArray=new Array(); //make messageArray-an array of the letters in the message" & @CRLF $sPageSource &= "var columnCount=0; //variable to count columns in messageArray.length" & @CRLF $sPageSource &= "for ( i=0; i<message.length; i++ ){ //iterate through the characters in the message" & @CRLF $sPageSource &= " letterNum=message.charCodeAt( i ); //assign proper letter code ( alphabet array )" & @CRLF $sPageSource &= " if ( ( letterNum>=65 ) && ( letterNum<=90 ) ) temp=letterNum-65; //letters" & @CRLF $sPageSource &= " else if ( letterNum==46 ) temp=27; //." & @CRLF $sPageSource &= " else if ( letterNum==32 ) temp=26; //space" & @CRLF $sPageSource &= " else if ( letterNum==33 ) temp=28; //!" & @CRLF $sPageSource &= " else if ( ( letterNum>=49 ) && ( letterNum<=57 ) ) temp=letterNum-20; //[1-9]" & @CRLF $sPageSource &= " else if ( letterNum==48 ) temp=14; //zero" & @CRLF $sPageSource &= " else if ( letterNum==63 ) temp=43; //?" & @CRLF $sPageSource &= " else if ( letterNum==44 ) temp=38; //," & @CRLF $sPageSource &= " else if ( letterNum==64 ) temp=39; //pause" & @CRLF $sPageSource &= " else if ( letterNum==35 ) temp=40; //flash effect" & @CRLF $sPageSource &= " else if ( letterNum==94 ) temp=41; //scroll up effect" & @CRLF $sPageSource &= " else if ( letterNum==95 ) temp=42; //sunrise effect" & @CRLF $sPageSource &= " else if ( letterNum==36 ) temp=44; //split effect" & @CRLF $sPageSource &= " else continue;" & @CRLF $sPageSource &= " for ( ii=0; ii<alphabet[temp].length;ii++ ){ messageArray[columnCount]=alphabet[temp][ii];columnCount++;}" & @CRLF $sPageSource &= " if ( ( temp!=39 ) && ( temp!=40 ) && ( temp!=41 ) ) {messageArray[columnCount]=""0000000"";columnCount++;}" & @CRLF $sPageSource &= "}" & @CRLF $sPageSource &= "//make 'led screen' with block 0-49 on row 1, block 50-99 on row 2, block 100-149 on row 3, etc.." & @CRLF $sPageSource &= "var b='';" & @CRLF $sPageSource &= "for ( var i=0; i<350; i++ ){//columns 50 columns x 7 rows" & @CRLF $sPageSource &= " rowPos=0+3*( i>49 )+3*( i>99 )+3*( i>149 )+3*( i>199 )+3*( i>249 )+3*( i>299 );" & @CRLF $sPageSource &= " colPos=0+150*( i>49 )+150*( i>99 )+150*( i>149 )+150*( i>199 )+150*( i>249 )+150*( i>299 );" & @CRLF $sPageSource &= " b+= ( NS ) ? '<LAYER NAME=""block' + i + '"" LEFT=""' + ( startXPos+i*3-colPos ) + '"" TOP=""' + ( startYPos+rowPos ) + '"" VISIBILITY=""show"" WIDTH=""2"" HEIGHT=""2"" BGCOLOR=""' + LEDoffColor + '""></LAYER>' : '<div id=""block' + i + '"" style=""position:absolute; left:' + ( startXPos+i*3-colPos ) + 'px; top:' + ( startYPos+rowPos ) + 'px; background-color:' + LEDoffColor +'; height: 2px; width: 2px;font-size:2px;""></div>';" & @CRLF $sPageSource &= "}" & @CRLF $sPageSource &= "document.write( b );" & @CRLF $sPageSource &= "var columnCounter=0; //keep track of postion of messageArray" & @CRLF $sPageSource &= "var bb=new Array(); //store particular LED's dom element here" & @CRLF $sPageSource &= " if ( NS ) { for ( var i=0; i<350; i++ ) { bb[i]=getCSS( ""block""+i )}}" & @CRLF $sPageSource &= " else {for ( var i=0; i<350; i++ ){ bb[i]=getCSS( ""block""+i ).style;}}" & @CRLF $sPageSource &= "var isOn=new Array();for ( var i=0; i<350; i++ ){ isOn[i]=0;} //keep track on on/off status of particular LED" & @CRLF $sPageSource &= "onArray=new Array(); var onCount=0; //array size counter" & @CRLF $sPageSource &= "function scroll(){" & @CRLF $sPageSource &= " onCount=0;" & @CRLF $sPageSource &= " if ( NS ) { for ( var i=0; i<301; i+=50 ){ if ( isOn[i]==1 ) { bb[i].bgColor=LEDoffColor; isOn[i]=0;} for ( var ii=1; ii<50; ii+=7 ){" & @CRLF $sPageSource &= " temp=i+ii;temp1=temp+1;temp2=temp+2;temp3=temp+3;temp4=temp+4;temp5=temp+5;temp6=temp+6;" & @CRLF $sPageSource &= " if ( isOn[temp]==1 ) {bb[temp].bgColor=LEDoffColor; isOn[temp]=0; bb[temp-1].bgColor=LEDonColor; isOn[temp-1]=1;}" & @CRLF $sPageSource &= " if ( isOn[temp1]==1 ) {bb[temp1].bgColor=LEDoffColor; isOn[temp1]=0; bb[temp].bgColor=LEDonColor; isOn[temp]=1;}" & @CRLF $sPageSource &= " if ( isOn[temp2]==1 ) {bb[temp2].bgColor=LEDoffColor; isOn[temp2]=0; bb[temp+1].bgColor=LEDonColor; isOn[temp+1]=1;}" & @CRLF $sPageSource &= " if ( isOn[temp3]==1 ) {bb[temp3].bgColor=LEDoffColor; isOn[temp3]=0; bb[temp2].bgColor=LEDonColor; isOn[temp2]=1;}" & @CRLF $sPageSource &= " if ( isOn[temp4]==1 ) {bb[temp4].bgColor=LEDoffColor; isOn[temp4]=0; bb[temp3].bgColor=LEDonColor; isOn[temp3]=1;}" & @CRLF $sPageSource &= " if ( isOn[temp5]==1 ) {bb[temp5].bgColor=LEDoffColor; isOn[temp5]=0; bb[temp4].bgColor=LEDonColor; isOn[temp4]=1;}" & @CRLF $sPageSource &= " if ( isOn[temp6]==1 ) {bb[temp6].bgColor=LEDoffColor; isOn[temp6]=0; bb[temp5].bgColor=LEDonColor; isOn[temp5]=1;}" & @CRLF $sPageSource &= " }}}" & @CRLF $sPageSource &= " else { for ( var i=0; i<301; i+=50 ){ if ( isOn[i]==1 ) { bb[i].backgroundColor=LEDoffColor; isOn[i]=0;} for ( var ii=1; ii<50; ii+=7 ){" & @CRLF $sPageSource &= " temp=i+ii;temp1=temp+1;temp2=temp+2;temp3=temp+3;temp4=temp+4;temp5=temp+5;temp6=temp+6;" & @CRLF $sPageSource &= " if ( isOn[temp]==1 ) {bb[temp].backgroundColor=LEDoffColor; isOn[temp]=0; bb[temp-1].backgroundColor=LEDonColor; isOn[temp-1]=1;}" & @CRLF $sPageSource &= " if ( isOn[temp1]==1 ) {bb[temp1].backgroundColor=LEDoffColor; isOn[temp1]=0; bb[temp].backgroundColor=LEDonColor; isOn[temp]=1;}" & @CRLF $sPageSource &= " if ( isOn[temp2]==1 ) {bb[temp2].backgroundColor=LEDoffColor; isOn[temp2]=0; bb[temp+1].backgroundColor=LEDonColor; isOn[temp+1]=1;}" & @CRLF $sPageSource &= " if ( isOn[temp3]==1 ) {bb[temp3].backgroundColor=LEDoffColor; isOn[temp3]=0; bb[temp2].backgroundColor=LEDonColor; isOn[temp2]=1;}" & @CRLF $sPageSource &= " if ( isOn[temp4]==1 ) {bb[temp4].backgroundColor=LEDoffColor; isOn[temp4]=0; bb[temp3].backgroundColor=LEDonColor; isOn[temp3]=1;}" & @CRLF $sPageSource &= " if ( isOn[temp5]==1 ) {bb[temp5].backgroundColor=LEDoffColor; isOn[temp5]=0; bb[temp4].backgroundColor=LEDonColor; isOn[temp4]=1;}" & @CRLF $sPageSource &= " if ( isOn[temp6]==1 ) {bb[temp6].backgroundColor=LEDoffColor; isOn[temp6]=0; bb[temp5].backgroundColor=LEDonColor; isOn[temp5]=1;}" & @CRLF $sPageSource &= " }}}" & @CRLF $sPageSource &= " temp=messageArray[columnCounter]; flag=temp.charAt( 0 );//GET NEW COLUMN" & @CRLF $sPageSource &= " if ( temp.charAt( 1 )==""1"" ) {isOn[99]=1;} if ( temp.charAt( 2 )==""1"" ) {isOn[149]=1} if ( temp.charAt( 3 )==""1"" ) {isOn[199]=1}" & @CRLF $sPageSource &= " if ( temp.charAt( 4 )==""1"" ) {isOn[249]=1} if ( temp.charAt( 5 )==""1"" ) {isOn[299]=1} if ( temp.charAt( 6 )==""1"" ) {isOn[349]=1}" & @CRLF $sPageSource &= " if ( flag==""0"" ) {} else if ( flag==""1"" ) {isOn[49]=1;} else if ( flag==""X"" ) {pauseScroll();} else if ( flag==""Y"" ) {flashScroll();}" & @CRLF $sPageSource &= " else if ( flag==""D"" ) {dropEffect();} else if ( flag==""S"" ) {sunRiseEffect();} else if ( flag==""Q"" ) {splitEffect();}" & @CRLF $sPageSource &= " columnCounter++; if( columnCounter==columnCount ) columnCounter=0;" & @CRLF $sPageSource &= "}" & @CRLF $sPageSource &= "//______________pause effect________________" & @CRLF $sPageSource &= "function pauseScroll(){ clearInterval( loop ); setTimeout( ""LEDinit()"",3000 );}" & @CRLF $sPageSource &= "//______________onArray Section_____________" & @CRLF $sPageSource &= "onArray=new Array(); var onCount=0; //array size counter" & @CRLF $sPageSource &= "function makeOnArray(){ clearInterval( loop ); onCount=0; for ( var i=0; i<700; i++ ){if ( isOn[i]==1 ) {onArray[onCount]=i; onCount++;};}//make onArray of 'on' LEDS" & @CRLF $sPageSource &= "}//_________________________________" & @CRLF $sPageSource &= "//_______________flash effect_______________" & @CRLF $sPageSource &= "var flashCount=0;" & @CRLF $sPageSource &= "function flashScroll(){ makeOnArray(); flashCount=0; if ( NS ) {setTimeout( ""flashItNS()"",250 );} else {setTimeout( ""flashIt()"",250 );}}" & @CRLF $sPageSource &= "function flashItNS(){ flashCount++;" & @CRLF $sPageSource &= " if ( flashCount<14 ) {" & @CRLF $sPageSource &= " if ( flashCount % 2 == 0 ){ for ( var i=0; i<onCount; i++ ){ isOn[onArray[i]]=0;bb[onArray[i]].bgColor=LEDoffColor;}}" & @CRLF $sPageSource &= " else {for ( var i=0; i<onCount; i++ ){isOn[onArray[i]]=1;bb[onArray[i]].bgColor=LEDonColor;}}" & @CRLF $sPageSource &= " setTimeout( ""flashItNS()"",250 );" & @CRLF $sPageSource &= " }" & @CRLF $sPageSource &= " else {flashCount=0; setTimeout( ""LEDinit()"",250 );}" & @CRLF $sPageSource &= "}" & @CRLF $sPageSource &= "function flashIt(){ flashCount++;" & @CRLF $sPageSource &= " if ( flashCount<14 ) {" & @CRLF $sPageSource &= " if ( flashCount % 2 == 0 ){ for ( var i=0; i<onCount; i++ ){ isOn[onArray[i]]=0;bb[onArray[i]].backgroundColor=LEDoffColor;}}" & @CRLF $sPageSource &= " else {for ( var i=0; i<onCount; i++ ){isOn[onArray[i]]=1;bb[onArray[i]].backgroundColor=LEDonColor;}}" & @CRLF $sPageSource &= " setTimeout( ""flashIt()"",250 );" & @CRLF $sPageSource &= " }" & @CRLF $sPageSource &= " else {flashCount=0; setTimeout( ""LEDinit()"",250 );}" & @CRLF $sPageSource &= "}//_________________________________" & @CRLF $sPageSource &= "//____________scroll up effect______________" & @CRLF $sPageSource &= "dropArray=new Array();" & @CRLF $sPageSource &= "function dropEffect(){makeOnArray(); for ( var i=0; i<onCount; i++ ){ dropArray[i]=onArray[i]; } if ( NS ) {dropItNS();} else {dropIt();}}" & @CRLF $sPageSource &= "var dropCount=0;" & @CRLF $sPageSource &= "function dropItNS(){" & @CRLF $sPageSource &= " if ( dropCount<7 ){for ( var i=0; i<onCount; i++ ){ bb[dropArray[i]].bgColor=LEDoffColor; }" & @CRLF $sPageSource &= " for ( var i=0; i<onCount; i++ ){ temp=dropArray[i]; temp-=50;if ( temp<0 ) temp+=350;bb[temp].bgColor=LEDonColor; dropArray[i]=temp;}" & @CRLF $sPageSource &= " dropCount++; setTimeout( ""dropItNS()"",100 );" & @CRLF $sPageSource &= " } else {dropCount=0;setTimeout( ""LEDinit()"",100 );}" & @CRLF $sPageSource &= "}//_________________________________" & @CRLF $sPageSource &= "function dropIt(){" & @CRLF $sPageSource &= " if ( dropCount<7 ){ for ( var i=0; i<onCount; i++ ){ bb[dropArray[i]].backgroundColor=LEDoffColor; }" & @CRLF $sPageSource &= " for ( var i=0; i<onCount; i++ ){ temp=dropArray[i]; temp-=50; if ( temp<0 ) temp+=350; bb[temp].backgroundColor=LEDonColor; dropArray[i]=temp;}" & @CRLF $sPageSource &= " dropCount++; setTimeout( ""dropIt()"",100 );" & @CRLF $sPageSource &= " } else {dropCount=0;setTimeout( ""LEDinit()"",100 );}" & @CRLF $sPageSource &= "}//_________________________________" & @CRLF $sPageSource &= "//____________sunrise effect________________" & @CRLF $sPageSource &= "sunRiseCounter=0;sunRiseArray=new Array();" & @CRLF $sPageSource &= "sunRiseArray[0]=new Array( 50,101,102,103,154,155,156,207,208,259,260,261,212,163,164,115,116,117,168,169,170,221,222,223,274,275,276,227,228,179,180,131,132,83,134,135,186,187,238,239,240,241,292,293,344,295,296,247,198 );//Hills" & @CRLF $sPageSource &= "sunRiseArray[1]=new Array( 224,225,226 ); sunRiseArray[2]=new Array( 174,175,176,177 ); sunRiseArray[3]=new Array( 173,124,125,126,127,128,178 ); sunRiseArray[4]=new Array( 172,123,74,75,76,77,129 ); sunRiseArray[5]=new Array( 171,122,73,24,25,26,27,78,79,130 );" & @CRLF $sPageSource &= "function sunRiseEffect() { makeOnArray(); for ( var i=0; i<onCount; i++ ){ isOn[onArray[i]]=0; if ( !NS ) {bb[onArray[i]].backgroundColor=LEDoffColor;} else {bb[onArray[i]].bgColor=LEDoffColor;}}" & @CRLF $sPageSource &= " setTimeout( ""riseEffectUp()"",1000 );}" & @CRLF $sPageSource &= "function riseEffectUp() {" & @CRLF $sPageSource &= " if ( !NS ) { for ( var ii=0; ii<sunRiseArray[sunRiseCounter].length; ii++ ) {isOn[sunRiseArray[sunRiseCounter][ii]]=1;bb[sunRiseArray[sunRiseCounter][ii]].backgroundColor=LEDonColor;}}" & @CRLF $sPageSource &= " else {for ( var ii=0; ii<sunRiseArray[sunRiseCounter].length; ii++ ) {isOn[sunRiseArray[sunRiseCounter][ii]]=1;bb[sunRiseArray[sunRiseCounter][ii]].bgColor=LEDonColor;}}" & @CRLF $sPageSource &= " sunRiseCounter++; if ( sunRiseCounter>5 ) {sunRiseCounter=5;setTimeout( ""riseEffectDown()"",2000 );} else {setTimeout( ""riseEffectUp()"",250 );}}" & @CRLF $sPageSource &= "function riseEffectDown() {" & @CRLF $sPageSource &= " if ( !NS ) {for ( var ii=0; ii<sunRiseArray[sunRiseCounter].length; ii++ ) {isOn[sunRiseArray[sunRiseCounter][ii]]=0;bb[sunRiseArray[sunRiseCounter][ii]].backgroundColor=LEDoffColor;}}" & @CRLF $sPageSource &= " else {for ( var ii=0; ii<sunRiseArray[sunRiseCounter].length; ii++ ) {isOn[sunRiseArray[sunRiseCounter][ii]]=0;bb[sunRiseArray[sunRiseCounter][ii]].bgColor=LEDoffColor;}}" & @CRLF $sPageSource &= " sunRiseCounter--; if ( sunRiseCounter<1 ) {sunRiseCounter=0;setTimeout( ""LEDinit()"",1500 );}" & @CRLF $sPageSource &= " else {setTimeout( ""riseEffectDown()"",250 );}" & @CRLF $sPageSource &= "}//____________________________________" & @CRLF $sPageSource &= "//____________split scroll effect___________" & @CRLF $sPageSource &= "var splitCount=0;" & @CRLF $sPageSource &= "function splitEffect() { makeOnArray(); for ( var i=0; i<onCount; i++ ) { dropArray[i]=onArray[i]; }" & @CRLF $sPageSource &= " if ( NS ) {setTimeout( ""splitNS()"",55 );} else if ( IE ) {setTimeout( ""splitIt()"",55 );} else {setTimeout( ""splitIt()"",100 );}" & @CRLF $sPageSource &= "}" & @CRLF $sPageSource &= "function splitIt(){ for ( i=0;i<onCount;i++ ){ temp=dropArray[i];" & @CRLF $sPageSource &= " if ( temp<150 ) { if ( temp==100 ) {bb[temp].backgroundColor=LEDoffColor; temp=149; bb[temp-1].backgroundColor=LEDonColor;}" & @CRLF $sPageSource &= " else if ( temp==50 ) {bb[temp].backgroundColor=LEDoffColor; temp=99; bb[temp-1].backgroundColor=LEDonColor;}" & @CRLF $sPageSource &= " else if ( temp==0 ) {bb[temp].backgroundColor=LEDoffColor; temp=49; bb[temp-1].backgroundColor=LEDonColor;}" & @CRLF $sPageSource &= " else {bb[temp].backgroundColor=LEDoffColor; bb[temp-1].backgroundColor=LEDonColor;}" & @CRLF $sPageSource &= " dropArray[i]=temp-1; }" & @CRLF $sPageSource &= " else { if ( temp==199 ) {bb[temp].backgroundColor=LEDoffColor; temp=200; bb[temp+1].backgroundColor=LEDonColor;}" & @CRLF $sPageSource &= " else if ( temp==349 ) {bb[temp].backgroundColor=LEDoffColor; temp=300; bb[temp+1].backgroundColor=LEDonColor;}" & @CRLF $sPageSource &= " else if ( temp==299 ) {bb[temp].backgroundColor=LEDoffColor; temp=250; bb[temp+1].backgroundColor=LEDonColor;}" & @CRLF $sPageSource &= " else if ( temp==249 ) {bb[temp].backgroundColor=LEDoffColor; temp=200; bb[temp+1].backgroundColor=LEDonColor;}" & @CRLF $sPageSource &= " else {bb[temp].backgroundColor=LEDoffColor; bb[temp+1].backgroundColor=LEDonColor;}" & @CRLF $sPageSource &= " dropArray[i]=temp+1; }" & @CRLF $sPageSource &= " } splitCount++; if ( splitCount<49 ) {if ( IE ) {setTimeout( ""splitIt()"",55 );} else {setTimeout( ""splitIt()"",100 );} } else {splitCount=0; LEDinit();}" & @CRLF $sPageSource &= "}" & @CRLF $sPageSource &= "function splitNS(){" & @CRLF $sPageSource &= " for ( i=0;i<onCount;i++ ){ temp=dropArray[i];" & @CRLF $sPageSource &= " if ( temp<150 ) { if ( temp==100 ) {bb[temp].bgColor=LEDoffColor; temp=149; bb[temp-1].bgColor=LEDonColor;}" & @CRLF $sPageSource &= " else if ( temp==50 ) {bb[temp].bgColor=LEDoffColor; temp=99; bb[temp-1].bgColor=LEDonColor;}" & @CRLF $sPageSource &= " else if ( temp==0 ) {bb[temp].bgColor=LEDoffColor; temp=49; bb[temp-1].bgColor=LEDonColor;}" & @CRLF $sPageSource &= " else {bb[temp].bgColor=LEDoffColor; bb[temp-1].bgColor=LEDonColor;}" & @CRLF $sPageSource &= " dropArray[i]=temp-1; }" & @CRLF $sPageSource &= " else { if ( temp==199 ) {bb[temp].bgColor=LEDoffColor; temp=200; bb[temp+1].bgColor=LEDonColor;}" & @CRLF $sPageSource &= " else if ( temp==349 ) {bb[temp].bgColor=LEDoffColor; temp=300; bb[temp+1].bgColor=LEDonColor;}" & @CRLF $sPageSource &= " else if ( temp==299 ) {bb[temp].bgColor=LEDoffColor; temp=250; bb[temp+1].bgColor=LEDonColor;}" & @CRLF $sPageSource &= " else if ( temp==249 ) {bb[temp].bgColor=LEDoffColor; temp=200; bb[temp+1].bgColor=LEDonColor;}" & @CRLF $sPageSource &= " else {bb[temp].bgColor=LEDoffColor; bb[temp+1].bgColor=LEDonColor;}" & @CRLF $sPageSource &= " dropArray[i]=temp+1; }" & @CRLF $sPageSource &= " } splitCount++; if ( splitCount<49 ) {setTimeout( ""splitNS()"",55 );} else {splitCount=0; LEDinit();}" & @CRLF $sPageSource &= "}//___________________________________" & @CRLF $sPageSource &= "function LEDinit(){if ( NS ) {loop=setInterval( ""scroll()"",55 );} else if ( IE ){loop=setInterval( ""scroll()"",55 );} else {loop=setInterval( ""scroll()"",100 );}}" & @CRLF $sPageSource &= "</SCRIPT>" & @CRLF $sPageSource &= "</BODY></HTML>" & @CRLF Return $sPageSource EndFunc The code is translated to AutoIt from the C++ code in ICoreWebView2.ExecuteScript() and from this example by Chimp. Compared to the original script by Chimp the ICoreWebView2ExecuteScriptCompletedHandler callback interface is added to the code. WebView2-4.au3 is included in the 7z-file at bottom of this post. If the code here is to be a replacement for IE.au3, then I think we'll have to translate all C/C++ code in WebView2.h to AutoIt code in WV2Interfaces.au3. I'll create a new post to document the implementation of callback interfaces.2 points
-
Control Viewer - AutoIt Window Info Tool
mythicalzxc reacted to Yashied for a topic
LAST VERSION - 1.1 18-May-12 Control Viewer (CV) is a replacement of AutoIt Window Info with a number of advantages. I tried to stick to the interface of the last, so you almost do not have to be retrained. During testing, I never managed to find any controls that could not be identified by CV (on the contrary, shows a lot of hidden controls, especially for the system windows). The all program settings are stored in the following registry key: HKEY_CURRENT_USERSoftwareY'sControl Viewer The main differences CV from AWI Shows the complete list of all existing controls for the window that are interested (visible, hidden and deleted controls are displayed with different colors that can be changed to any other).Dynamically changing information during search for the windows and their controls.Ability to quickly switch between controls in the list.Ability to show/hide any controls from the list (useful for the overlaping controls).Information for the Style and ExStyle parameters shown in the form of hexadecimal values, and as its flags.Added the PID and Path parameters in the Window tab and ability to quickly open a folder that containing the process file.Added the coordinate system relative to the selected control.Shows a color of the selected pixel in RGB and BGR formats.Shows an example fill of the selected color.Ability to select the text encoding (affects the Text parameter in the Control tab).The complete change the appearance of pop-up frame for the selected controls.Simple and convenient tool to get a screenshot of the part screen of interest for publication on the forum (Capture tab).Create a report in the clipboard or a text file for subsequent publication on the forum.Search all running AutoIt scripts and their windows in the system (AutoIt tab).User-friendly interface. Used shortcuts Ctrl+Alt+T - Enable/Disable "Always On Top" mode (also available from the menu). Ctrl+Alt+H - Enable/Disable highlight selected controls (also available from the menu). Ctrl+A - Select all text (works in any input field). Ctrl - Hold down when moving the mouse to scroll the screenshot (Capture tab). Shift - Hold down when stretching/compression of the contour frame for an equilateral resizing screenshots (Capture tab). DoubleClick (on the screenshot) - Save the image to a file (Capture tab). DoubleClick (on any list item) - Open a folder with the file of the process or AutoIt script (AutoIt tab). Del (on any list item) - Close process (AutoIt tab). F5 - Updating the list (AutoIt tab). If anyone have any questions or comments about CV, please post it in this thread. I will be glad to any feedback and suggestions. Files to download Binary (x86 and x64) Redirection to CV_bin.zip, 1.14 MB CV_bin.html Source Redirection to CV_source.zip, 691 KB CV_source.html1 point -
Yes, we have those here and there (including my Container UDF), but i didn't find one that able to pass arrays or other types to be reliable enough. Differences from other analogs: Stability (reliability) Array support (2D ATM) Ability to get the return data from the interaction process Easy both ways interaction Notes: Examples (run both)... Downloads: AppInteract_v0.5.zip AppInteract_v0.4.zip AppInteract_v0.3.zip AppInteract_v0.2.zip AppInteract_v0.1.zip1 point
-
EasyCodeIt - cross-platform AutoIt implementation
TheDcoder reacted to JockoDundee for a topic
CPU’s work for Programmers - if they’re idling, they’re slacking Me too. OTOH, I’m not sure it’s as much the Ryzen as the SSD. Which has definitely been a game changer in terms of overall performance. Remember when the annual MHz of CPU’s was like 1,2,3,4, and then 4,4,4,4,5. And then the whole industry pivoted to multi-core arch, meh... Even for Java?1 point -
EasyCodeIt - cross-platform AutoIt implementation
E1M1 reacted to JockoDundee for a topic
It’s not totally Software’s fault. Over half a century ago, Software and Hardware made a secret pact to extract the maximum $$ possible from the lowly End-Losers. Software said, I promise to continually enhance, extend, and otherwise adopt any and all features, capabilities, protocols, file formats, api’s that are almost available into one monolithic, indistinguishable, all-in-one .exe file. A product that would generally not be fit for running on anything less than the next years SOA hardware. Hardware said, And I promise to likewise to provide such hardware, replete with ever increasing MHz and GHz and GB and TB, and of course a full assortment of inscrutable buzzwords to describe the endless, if banal variations on the NP junction that has served us for so long. Taken together, our actions will insure that no one will ever be fully satisfied with their current system, no matter how powerful, but will feel that they are on the cusp of obtaining such a setup, if only with their next purchase. And for those who gamely fight us by holding on to their ancient programs and obsolete hardware, they will face in the inexorable onslaught of the dual indignities of discontinued hardware and End-Of-Life software support. Alas, Hardware lets us all down, as I type this from a 12 year-old Intel i7 that is still widely available today. So...:)1 point -
Why does this sound so familiar? 🤔... oh right, it's my email client I prefer calling them bloated frameworks1 point
-
Technically you could just build compiler that packs wine and autoit exe both is single executable Of course hello world would be 200MB download and 10 sec startup time but thanks to modern frameworks everyone are already used to it that simple apps are large and slow1 point
-
1 point
-
First post and unable to read... sad.1 point
-
[Solved] Menu Pause Script
pixelsearch reacted to argumentum for a topic
I did it ! But it does not behave reliably on every style in my testing ( the code is hidden so no-one can see it ) ...but it was a good idea I did not think of Edit: MNS_NOCHECK would not remove the style ( recreating the checkmark area )1 point -
Windows 10 and ProcessSetPriority
argumentum reacted to photonblaster for a topic
Thanks muchly, I will check these out.1 point -
Great! I'm starting to like this stuff a lot. Thanks @LarsJ A quick and dirty little example of how this ExecuteScript method is very powerful, for example to manipulate the web page content on the fly: replace the simple command "alert ('Hello');" from within the ExecuteScript in the listing $oCoreWebView2.ExecuteScript( "alert( 'Hello' );", $pCoreWebView2ExecuteScriptCompletedHandler ) with this other $oCoreWebView2.ExecuteScript("document.getElementsByTagName(""img"").item(0).insertAdjacentHTML('beforebegin', '<iframe width=""210"" height=""173"" style=""position: absolute; top: 50px; left: 10px;"" src=""https://www.youtube.com/embed/tgbNymZ7vqY?autoplay=1""></iframe>');", $pCoreWebView2ExecuteScriptCompletedHandler ) and we will add a YouTube movie on the page. (do not press the button multiple times or more overlapping videos will be added) see you later...1 point
-
[Solved] Menu Pause Script
argumentum reacted to LarsJ for a topic
Study the example of _GUICtrlMenu_CreateMenu().1 point -
This code look like this on my Win10 system: #include <GUIConstants.au3> #include <WinAPI.au3> #include <WinAPIGdi.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> If _WinAPI_DwmIsCompositionEnabled() Then $iHasDWM=1 $iWidth=314 $iHeight=140 #Region ### START Koda GUI section ### Form= $hGUI = GUICreate("Test", $iWidth, $iHeight) GUISetFont(10, 600, 0, "Arial", $hGUI) $Button1 = GUICtrlCreateButton("=", 232, 104, 75, 25, -1) $Button2 = GUICtrlCreateButton("+", 232, 80, 75, 25) $Button3 = GUICtrlCreateButton("-", 232, 56, 75, 25) $Button4 = GUICtrlCreateButton("*", 232, 32, 75, 25) $Button5 = GUICtrlCreateButton("/", 232, 8, 75, 25) $Button6 = GUICtrlCreateButton(",", 152, 104, 75, 25) $Button7 = GUICtrlCreateButton("0", 80, 104, 75, 25) $Button8 = GUICtrlCreateButton("+/-", 8, 104, 75, 25) $Button9 = GUICtrlCreateButton("1", 8, 80, 75, 25) $Button10 = GUICtrlCreateButton("2", 80, 80, 75, 25) $Button11 = GUICtrlCreateButton("3", 152, 80, 75, 25) $Button12 = GUICtrlCreateButton("6", 152, 56, 75, 25) $Button13 = GUICtrlCreateButton("5", 80, 56, 75, 25) $Button14 = GUICtrlCreateButton("4", 8, 56, 75, 25) $Button15 = GUICtrlCreateButton("7", 8, 32, 75, 25) $Button16 = GUICtrlCreateButton("8", 80, 32, 75, 25) $Button17 = GUICtrlCreateButton("9", 152, 32, 75, 25) $Input1 = GUICtrlCreateInput("Input / Output", 8, 8, 218, 21) GUISetBkColor(0x808080) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### If $iHasDWM Then _WinAPI_DwmEnableBlurBehindWindow($hGUI) _WinAPI_DwmEnableBlurBehindWindow10($hGUI) EndIf While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd ; #FUNCTION# ==================================================================================================================== ; Name ..........: _WinAPI_DwmEnableBlurBehindWindow10 ; Description ...: Enables Aero-like blurred background in Windows 10. ; Syntax ........: _WinAPI_DwmEnableBlurBehindWindow10($hWnd[, $iMode = $ACCENT_ENABLE_BLURBEHIND]) ; Parameters ....: $hWnd - Window handle. ; $bEnable - [optional] Enable or disable the blur effect. ; Return values .: 1 on success, 0 otherwise. Call _WinAPI_GetLastError on failure for more information. ; Author ........: scintilla4evr ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: http://vhanla.codigobit.info/2015/07/enable-windows-10-aero-glass-aka-blur.html and http://undoc.airesoft.co.uk/user32.dll/SetWindowCompositionAttribute.php ; Example .......: Yes ; =============================================================================================================================== Func _WinAPI_DwmEnableBlurBehindWindow10($hWnd, $bEnable = True) Local $tAccentPolicy = DllStructCreate("int AccentState; int AccentFlags; int GradientColor; int AnimationId") Local $tAttrData = DllStructCreate("dword Attribute; ptr DataBuffer; ulong Size") $tAccentPolicy.AccentState = $bEnable ? 3 : 0 $tAttrData.Attribute = 19 ; WCA_ACCENT_POLICY $tAttrData.DataBuffer = DllStructGetPtr($tAccentPolicy) $tAttrData.Size = DllStructGetSize($tAccentPolicy) Local $aResult = DllCall("user32.dll", "bool", "SetWindowCompositionAttribute", "hwnd", $hWnd, "struct*", $tAttrData) If @error Then Return SetError(@error, @extended, 0) Return $aResult[0] EndFunc1 point
-
EasyCodeIt - cross-platform AutoIt implementation
TheDcoder reacted to Earthshine for a topic
Once you give programmers better hardware and more to work with they will soon eat it all and ask for more Dude I don’t know things have never been this good my computer boots up in less than six seconds and he’s logged in and ready to work and it’s super quick and it’s just a Ryzen 3500H Bloat doesn’t really matter Unless you have a real piece of shit machine I love writing software in c#. I ain’t ever giving it up0 points