Leaderboard
Popular Content
Showing content with the highest reputation on 04/15/2021 in all areas
-
perhaps I will integrate it but for the time being I am on the final approach of the Virtual listview (LarsJ proposal) I think you wil like it just test it I think it is fully compatible with the current releases . array range fixed. Cheers ArrayDisplayInternals2.7z3 points
-
Is there a specific reason to use your _MouseLeftClick function instead of ControlClick($hWnd, "", "", "left", 1, $X, $Y), which works fine ?2 points
-
; Script opens SciTE pop-up menu and selects "Select All" item #include <GuiMenu.au3> #include <SendMessage.au3> #include <WinAPISysWin.au3> #include <WindowsConstants.au3> $sText = "Select All" ; menu item text Sleep(3333) ; lock desktop manually during this time (Win+L) ControlClick("[Class:SciTEWindow]", "", "Scintilla1", "right") $hWnd = WinWait("[class:#32768]") $hMenu = _SendMessage($hWnd, 0x01E1) ; MN_GETHMENU $iItem = _GUICtrlMenu_FindItem($hMenu, $sText) $aRect = _GUICtrlMenu_GetItemRect($hWnd, $hMenu, $iItem) _MouseLeftClick($hWnd, $aRect[0] + 3, $aRect[1] + 3) Func _MouseLeftClick($hWnd, $X, $Y, $Sleep = 10) Local Const $MK_LBUTTON = 0x0001 _WinAPI_PostMessage($hWnd, $WM_SETCURSOR, $hWnd, _WinAPI_MakeLong($HTCLIENT, $WM_LBUTTONDOWN)) _WinAPI_PostMessage($hWnd, $WM_LBUTTONDOWN, $MK_LBUTTON, _WinAPI_MakeLong($X, $Y)) Sleep($Sleep) _WinAPI_PostMessage($hWnd, $WM_SETCURSOR, $hWnd, _WinAPI_MakeLong($HTCLIENT, $WM_LBUTTONUP)) _WinAPI_PostMessage($hWnd, $WM_LBUTTONUP, 0, _WinAPI_MakeLong($X, $Y)) EndFunc2 points
-
Retrieve file list based on file modified time
Musashi and one other reacted to seadoggie01 for a topic
Bad wording there, I meant more like, "I'll stop being funny now, [...]" and less that it was a grave matter. Correct, OP didn't mention editing the files, but I like to look beyond the stated requirements to help avoid potential issues down the road. Squash any potential issues before they arise (provided they're simple enough). I'm saying, similar to us suggesting ControlClick instead of MouseClick, use the file name instead of modified date. Lastly, the comment might not apply to OP, but might apply to anyone reading this later I can't speak to the specifics of my hatred of last modified date anymore as it stems from a project from 5+ years ago, but a general feeling of distrust still lingers2 points -
Improving _ArrayDisplay speed
argumentum and one other reacted to pixelsearch for a topic
@jpm Yesterday afternoon, Nine was kind enough to spend some time doing a neutral test, which confirms what follows : After he created an Array of 30000 rows and 10 columns, he started a timer to calculate exactly how many seconds it took to populate a listview in ArrayDisplay, then how many seconds it took to sort a column. He did it twice, with 2 different versions of ArrayDisplayInternals . Here are the results, on Nine's computer : * With the actual version of ArrayDisplayInternals.au3 (AutoIt 3.3.14.5) : Populating LV : 38s Sort a column : 28s * When he used my last reworked version of ArrayDisplayInternals.au3 (I name it Beta 3.3.15.3-d) : Populating LV : 10.5s Sort a column : 9.5s Which means a gain of 350% (3.5 times faster) for populating, then 300% (3 times faster) for sorting. So Nine's test confirm the speed gain that I already noticed (the results are similar on my computer) and I guess it's same on your computer (Jpm). This is probably the reason why you were interested in the reworked script. I'm joining below this last reworked version in case anyone is interested. I won't rework it anymore as I have nothing to add in it and it's time for me to move over. In case a bug is detected, then we'll try to fix it here. Many thanks Nine & jpm for the time you spent on this ArrayDisplayInternals (beta 3.3.15.3-d).au32 points -
Changing trayIcon with internal autoIT ressources - (Moved)
OhBobSaget and one other reacted to Melba23 for a topic
OhBobSaget, For one of my apps I add the icons to the executable like this: #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Play_0.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Play_1.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Play_2.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Play_3.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Play_4.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Play_5.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Play_6.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Play_7.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Pause_0.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Pause_1.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Pause_2.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Pause_3.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Pause_4.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Pause_5.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Pause_6.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Pause_7.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_Index.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_File.ico #AutoIt3Wrapper_Res_Icon_Add=M:\Program\Au3 Scripts\BMP\Icons\BMP_List.ico And then assign their indices like this: Global Const $iPlay_Icon = -5, $iPause_Icon = -13, $iIndex_Icon = -21, $iFile_Icon = -22, $iList_Icon = -23 Which allows me use lines like this within the code: TraySetIcon(@ScriptFullPath, $iPause_Icon - $iIcon_Progress) TraySetIcon(@ScriptFullPath, $iIndex_Icon) TraySetIcon(@ScriptFullPath, $iFile_Icon) I hope that helps. M23 Edit: Sorry, the syntax for the directive has changed since I wrote and compiled that. The current version reads: #AutoIt3Wrapper_Res_Icon_Add= ; Filename[,ResNumber[,LanguageCode]] of ICO to be added. ; Add extra ICO files to the resources ; Use full path of the ico files to be added ; ResNumber is a numeric value used to access the icon: TraySetIcon(@ScriptFullPath, ResNumber) ; If no ResNumber is specified, the added icons are numbered from 201 up So you will need to adjust the assignment statements to match.2 points -
@pixelsearch & @Tick #include <GuiMenu.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> Example() MsgBox(0, "", 'the end') Func Example() WinWait("[CLASS:Notepad]", "", 10) If Not WinExists("[CLASS:Notepad]") Then Return Local $hWnd = WinGetHandle("[CLASS:Notepad]") ControlFocus($hWnd, "", "Edit1") Send("{APPSKEY}") Local $0_PopUPhwnd = WinGetHandle("[CLASS:#32768]") Local $0_PopUPMenu = _SendMessage($0_PopUPhwnd, 0x01E1) Local $0_FindItem = _GUICtrlMenu_FindItem($0_PopUPMenu, 'Paste') _WinAPI_PostMessage( $hWnd, $WM_COMMAND, _GUICtrlMenu_GetItemID($0_PopUPMenu, $0_FindItem), 0 ) ;_WinAPI_PostMessage($0_PopUPhwnd, $WM_LBUTTONDBLCLK, 0, _WinAPI_MakeLong($x, $Y)) ;~ same as controlclick EndFunc ;==>Example1 point
-
closing a MSgBox
seadoggie01 reacted to Nine for a topic
You can use the Run command with the parameter /AutoIt3ExecuteLine (see help file there is an exact example of what you could do). You can then close it whenever you want to since it is another process that you have launched. ps. cat beat me, where is @seadoggie01 when we need him1 point -
_MouseLeftClick is an extended ControlClick for left mouse button. Some windows need WM_SETCURSOR message. But if ControlClick works fine, use it.1 point
-
This is the GDI version to flip an image using _WinAPI_PlgBlt() #include <GDIPlus.au3> #include <winapi.au3> #include <windowsconstants.au3> Opt("GuiOnEventMode", 1) If Not FileExists(@ScriptDir&"\smiley.png") Then InetGet("http://msp5.photobucket.com/albums/y196/dannydude182/smiley-300x300.png", @ScriptDir&"\smiley.png") _GDIPlus_Startup() $image = _GDIPlus_ImageLoadFromFile(@ScriptDir&"\smiley.png") $w = _GDIPlus_ImageGetWidth($image) $h = _GDIPlus_ImageGetHeight($image) $hwnd = GUICreate("Test", $w, $h) Guisetbkcolor(0) GUISetState() GUISetOnEvent(-3, "close") $t = TimerInit() $hDC = _WinAPI_GetDC($hWnd) $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC) $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($image) $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap) ;p1----p2 ;p3----| ;flip on horizotal axis Local $aPoint[3][2] ; 2 - A 180-degree rotation without flipping (No rotation, a horizontal flip followed by a vertical flip) ;~ $aPoint[0][0] = $w ;p1x ;~ $aPoint[0][1] = $h ;p1y ;~ $aPoint[1][0] = 0 ;p2x ;~ $aPoint[1][1] = $h ;p2y ;~ $aPoint[2][0] = $w ;p3x ;~ $aPoint[2][1] = 0 ;p3y ;6 - A 180-degree rotation followed by a horizontal flip (No rotation and a vertical flip) $aPoint[0][0] = 0 $aPoint[0][1] = $h $aPoint[1][0] = $w $aPoint[1][1] = $h $aPoint[2][0] = 0 $aPoint[2][1] = 0 _WinAPI_PlgBlt($hDC, $aPoint, $hDC_backbuffer, 0, 0, $w, $H) ConsoleWrite(TimerDiff($t) & @CRLF) While 1 Sleep(20) WEnd Func close() _WinAPI_SelectObject($hDC_backbuffer, $DC_obj) _WinAPI_DeleteDC($hDC_backbuffer) _WinAPI_DeleteObject($hHBitmap) _WinAPI_ReleaseDC($hwnd, $hDC) _GDIPlus_ImageDispose($image) _GDIPlus_Shutdown() Exit EndFunc ;==>close It should be faster than the GDIPlus version.1 point
-
CryptoNG UDF - Cryptography API: Next Gen
argumentum reacted to TheXman for a topic
What's New in Version v1.9.0 v1.9.0 (2021-04-15) Added wrappers for 2 new Win32 API cryptography helper functions. The new helper functions allow you to convert binary data to several text-based string formats and also allows you to convert those text-based string formats back into their binary form. For example, you can save binary public key blob files to a BASE64 format for readability or for transmission over the Internet. You can also read the BASE64 string and convert it to its binary format for use in one of the CryptoNG encryption/decryption functions. _CryptoNG_CryptBinaryToString _CryptoNG_CryptStringToBinary Updated the help file to reflect the new helper functions and their associated constants. Added examples of how to use the new helper functions to the CryptoNG_Examples.au3 file. Output examples of the new helper functions (_CryptoNG_CryptBinaryToString & _CryptoNG_CryptStringToBinary): (The output comes from the examples in the CryptoNG_Examples.au3 file.) _CryptoNG_CryptBinaryToString Examples $CNG_CRYPT_STRING_HEXRAW 525341310008000003000000000100000000000000000000010001f05cd1e7cd66ad767f408c6f3741e79f3018e521c6862fadbb2881998614836cdb8e62eb226c627c3bb4a820315f66e30f311c57fe27d01e7bbb7b1557444c53d75778761770da9c610d4b7048256a1ed55c39ca03cd8b9b8e35e735ef70fb16760375b6a5740e4f884fa549534a129a4acdfd1d43fab04717a7ece2a005353fe1f6d7a58d1ae7a2c4a544eceac76cb9e501ecacda4ba5eed1c1463f506c4629d93145b37400511a416c9976086c166684ea67bf782afbd30df0a514e15022b2378bf200391ff7ce082b337abac9b90c2d4e233c15d4d4e5637079ba449ef7adee75c6951fb2f1cc12be1dc942cbc633186ab80dc2f413b6865d89aa66b6f711 $CNG_CRYPT_STRING_HEX 52 53 41 31 00 08 00 00 03 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 01 00 01 f0 5c d1 e7 cd 66 ad 76 7f 40 8c 6f 37 41 e7 9f 30 18 e5 21 c6 86 2f ad bb 28 81 99 86 14 83 6c db 8e 62 eb 22 6c 62 7c 3b b4 a8 20 31 5f 66 e3 0f 31 1c 57 fe 27 d0 1e 7b bb 7b 15 57 44 4c 53 d7 57 78 76 17 70 da 9c 61 0d 4b 70 48 25 6a 1e d5 5c 39 ca 03 cd 8b 9b 8e 35 e7 35 ef 70 fb 16 76 03 75 b6 a5 74 0e 4f 88 4f a5 49 53 4a 12 9a 4a cd fd 1d 43 fa b0 47 17 a7 ec e2 a0 05 35 3f e1 f6 d7 a5 8d 1a e7 a2 c4 a5 44 ec ea c7 6c b9 e5 01 ec ac da 4b a5 ee d1 c1 46 3f 50 6c 46 29 d9 31 45 b3 74 00 51 1a 41 6c 99 76 08 6c 16 66 84 ea 67 bf 78 2a fb d3 0d f0 a5 14 e1 50 22 b2 37 8b f2 00 39 1f f7 ce 08 2b 33 7a ba c9 b9 0c 2d 4e 23 3c 15 d4 d4 e5 63 70 79 ba 44 9e f7 ad ee 75 c6 95 1f b2 f1 cc 12 be 1d c9 42 cb c6 33 18 6a b8 0d c2 f4 13 b6 86 5d 89 aa 66 b6 f7 11 $CNG_CRYPT_STRING_HEXASCII 52 53 41 31 00 08 00 00 03 00 00 00 00 01 00 00 RSA1............ 00 00 00 00 00 00 00 00 01 00 01 f0 5c d1 e7 cd ............\... 66 ad 76 7f 40 8c 6f 37 41 e7 9f 30 18 e5 21 c6 f.v.@.o7A..0..!. 86 2f ad bb 28 81 99 86 14 83 6c db 8e 62 eb 22 ./..(.....l..b." 6c 62 7c 3b b4 a8 20 31 5f 66 e3 0f 31 1c 57 fe lb|;.. 1_f..1.W. 27 d0 1e 7b bb 7b 15 57 44 4c 53 d7 57 78 76 17 '..{.{.WDLS.Wxv. 70 da 9c 61 0d 4b 70 48 25 6a 1e d5 5c 39 ca 03 p..a.KpH%j..\9.. cd 8b 9b 8e 35 e7 35 ef 70 fb 16 76 03 75 b6 a5 ....5.5.p..v.u.. 74 0e 4f 88 4f a5 49 53 4a 12 9a 4a cd fd 1d 43 t.O.O.ISJ..J...C fa b0 47 17 a7 ec e2 a0 05 35 3f e1 f6 d7 a5 8d ..G......5?..... 1a e7 a2 c4 a5 44 ec ea c7 6c b9 e5 01 ec ac da .....D...l...... 4b a5 ee d1 c1 46 3f 50 6c 46 29 d9 31 45 b3 74 K....F?PlF).1E.t 00 51 1a 41 6c 99 76 08 6c 16 66 84 ea 67 bf 78 .Q.Al.v.l.f..g.x 2a fb d3 0d f0 a5 14 e1 50 22 b2 37 8b f2 00 39 *.......P".7...9 1f f7 ce 08 2b 33 7a ba c9 b9 0c 2d 4e 23 3c 15 ....+3z....-N#<. d4 d4 e5 63 70 79 ba 44 9e f7 ad ee 75 c6 95 1f ...cpy.D....u... b2 f1 cc 12 be 1d c9 42 cb c6 33 18 6a b8 0d c2 .......B..3.j... f4 13 b6 86 5d 89 aa 66 b6 f7 11 ....]..f... $CNG_CRYPT_STRING_HEXASCIIADDR 0000 52 53 41 31 00 08 00 00 03 00 00 00 00 01 00 00 RSA1............ 0010 00 00 00 00 00 00 00 00 01 00 01 f0 5c d1 e7 cd ............\... 0020 66 ad 76 7f 40 8c 6f 37 41 e7 9f 30 18 e5 21 c6 f.v.@.o7A..0..!. 0030 86 2f ad bb 28 81 99 86 14 83 6c db 8e 62 eb 22 ./..(.....l..b." 0040 6c 62 7c 3b b4 a8 20 31 5f 66 e3 0f 31 1c 57 fe lb|;.. 1_f..1.W. 0050 27 d0 1e 7b bb 7b 15 57 44 4c 53 d7 57 78 76 17 '..{.{.WDLS.Wxv. 0060 70 da 9c 61 0d 4b 70 48 25 6a 1e d5 5c 39 ca 03 p..a.KpH%j..\9.. 0070 cd 8b 9b 8e 35 e7 35 ef 70 fb 16 76 03 75 b6 a5 ....5.5.p..v.u.. 0080 74 0e 4f 88 4f a5 49 53 4a 12 9a 4a cd fd 1d 43 t.O.O.ISJ..J...C 0090 fa b0 47 17 a7 ec e2 a0 05 35 3f e1 f6 d7 a5 8d ..G......5?..... 00a0 1a e7 a2 c4 a5 44 ec ea c7 6c b9 e5 01 ec ac da .....D...l...... 00b0 4b a5 ee d1 c1 46 3f 50 6c 46 29 d9 31 45 b3 74 K....F?PlF).1E.t 00c0 00 51 1a 41 6c 99 76 08 6c 16 66 84 ea 67 bf 78 .Q.Al.v.l.f..g.x 00d0 2a fb d3 0d f0 a5 14 e1 50 22 b2 37 8b f2 00 39 *.......P".7...9 00e0 1f f7 ce 08 2b 33 7a ba c9 b9 0c 2d 4e 23 3c 15 ....+3z....-N#<. 00f0 d4 d4 e5 63 70 79 ba 44 9e f7 ad ee 75 c6 95 1f ...cpy.D....u... 0100 b2 f1 cc 12 be 1d c9 42 cb c6 33 18 6a b8 0d c2 .......B..3.j... 0110 f4 13 b6 86 5d 89 aa 66 b6 f7 11 ....]..f... $CNG_CRYPT_STRING_BASE64 UlNBMQAIAAADAAAAAAEAAAAAAAAAAAAAAQAB8FzR581mrXZ/QIxvN0HnnzAY5SHG hi+tuyiBmYYUg2zbjmLrImxifDu0qCAxX2bjDzEcV/4n0B57u3sVV0RMU9dXeHYX cNqcYQ1LcEglah7VXDnKA82Lm4415zXvcPsWdgN1tqV0Dk+IT6VJU0oSmkrN/R1D +rBHF6fs4qAFNT/h9teljRrnosSlROzqx2y55QHsrNpLpe7RwUY/UGxGKdkxRbN0 AFEaQWyZdghsFmaE6me/eCr70w3wpRThUCKyN4vyADkf984IKzN6usm5DC1OIzwV 1NTlY3B5ukSe963udcaVH7LxzBK+HclCy8YzGGq4DcL0E7aGXYmqZrb3EQ== $CNG_CRYPT_STRING_BASE64 + $CNG_CRYPT_STRING_NOCRLF UlNBMQAIAAADAAAAAAEAAAAAAAAAAAAAAQAB8FzR581mrXZ/QIxvN0HnnzAY5SHGhi+tuyiBmYYUg2zbjmLrImxifDu0qCAxX2bjDzEcV/4n0B57u3sVV0RMU9dXeHYXcNqcYQ1LcEglah7VXDnKA82Lm4415zXvcPsWdgN1tqV0Dk+IT6VJU0oSmkrN/R1D+rBHF6fs4qAFNT/h9teljRrnosSlROzqx2y55QHsrNpLpe7RwUY/UGxGKdkxRbN0AFEaQWyZdghsFmaE6me/eCr70w3wpRThUCKyN4vyADkf984IKzN6usm5DC1OIzwV1NTlY3B5ukSe963udcaVH7LxzBK+HclCy8YzGGq4DcL0E7aGXYmqZrb3EQ== $CNG_CRYPT_STRING_BASE64HEADER -----BEGIN CERTIFICATE----- UlNBMQAIAAADAAAAAAEAAAAAAAAAAAAAAQAB8FzR581mrXZ/QIxvN0HnnzAY5SHG hi+tuyiBmYYUg2zbjmLrImxifDu0qCAxX2bjDzEcV/4n0B57u3sVV0RMU9dXeHYX cNqcYQ1LcEglah7VXDnKA82Lm4415zXvcPsWdgN1tqV0Dk+IT6VJU0oSmkrN/R1D +rBHF6fs4qAFNT/h9teljRrnosSlROzqx2y55QHsrNpLpe7RwUY/UGxGKdkxRbN0 AFEaQWyZdghsFmaE6me/eCr70w3wpRThUCKyN4vyADkf984IKzN6usm5DC1OIzwV 1NTlY3B5ukSe963udcaVH7LxzBK+HclCy8YzGGq4DcL0E7aGXYmqZrb3EQ== -----END CERTIFICATE----- ====================================================================== _CryptoNG_CryptStringToBinary Examples $CNG_CRYPT_STRING_HEXRAW String: 525341310008000003000000000100000000000000000000010001F05CD1E7CD66AD767F408C6F3741E79F3018E521C6862FADBB2881998614836CDB8E62EB226C627C3BB4A820315F66E30F311C57FE27D01E7BBB7B1557444C53D75778761770DA9C610D4B7048256A1ED55C39CA03CD8B9B8E35E735EF70FB16760375B6A5740E4F884FA549534A129A4ACDFD1D43FAB04717A7ECE2A005353FE1F6D7A58D1AE7A2C4A544ECEAC76CB9E501ECACDA4BA5EED1C1463F506C4629D93145B37400511A416C9976086C166684EA67BF782AFBD30DF0A514E15022B2378BF200391FF7CE082B337ABAC9B90C2D4E233C15D4D4E5637079BA449EF7ADEE75C6951FB2F1CC12BE1DC942CBC633186AB80DC2F413B6865D89AA66B6F711 Binary: 0x525341310008000003000000000100000000000000000000010001F05CD1E7CD66AD767F408C6F3741E79F3018E521C6862FADBB2881998614836CDB8E62EB226C627C3BB4A820315F66E30F311C57FE27D01E7BBB7B1557444C53D75778761770DA9C610D4B7048256A1ED55C39CA03CD8B9B8E35E735EF70FB16760375B6A5740E4F884FA549534A129A4ACDFD1D43FAB04717A7ECE2A005353FE1F6D7A58D1AE7A2C4A544ECEAC76CB9E501ECACDA4BA5EED1C1463F506C4629D93145B37400511A416C9976086C166684EA67BF782AFBD30DF0A514E15022B2378BF200391FF7CE082B337ABAC9B90C2D4E233C15D4D4E5637079BA449EF7ADEE75C6951FB2F1CC12BE1DC942CBC633186AB80DC2F413B6865D89AA66B6F711 $CNG_CRYPT_STRING_BASE64 UlNBMQAIAAADAAAAAAEAAAAAAAAAAAAAAQAB8FzR581mrXZ/QIxvN0HnnzAY5SHG hi+tuyiBmYYUg2zbjmLrImxifDu0qCAxX2bjDzEcV/4n0B57u3sVV0RMU9dXeHYX cNqcYQ1LcEglah7VXDnKA82Lm4415zXvcPsWdgN1tqV0Dk+IT6VJU0oSmkrN/R1D +rBHF6fs4qAFNT/h9teljRrnosSlROzqx2y55QHsrNpLpe7RwUY/UGxGKdkxRbN0 AFEaQWyZdghsFmaE6me/eCr70w3wpRThUCKyN4vyADkf984IKzN6usm5DC1OIzwV 1NTlY3B5ukSe963udcaVH7LxzBK+HclCy8YzGGq4DcL0E7aGXYmqZrb3EQ== Binary: 0x525341310008000003000000000100000000000000000000010001F05CD1E7CD66AD767F408C6F3741E79F3018E521C6862FADBB2881998614836CDB8E62EB226C627C3BB4A820315F66E30F311C57FE27D01E7BBB7B1557444C53D75778761770DA9C610D4B7048256A1ED55C39CA03CD8B9B8E35E735EF70FB16760375B6A5740E4F884FA549534A129A4ACDFD1D43FAB04717A7ECE2A005353FE1F6D7A58D1AE7A2C4A544ECEAC76CB9E501ECACDA4BA5EED1C1463F506C4629D93145B37400511A416C9976086C166684EA67BF782AFBD30DF0A514E15022B2378BF200391FF7CE082B337ABAC9B90C2D4E233C15D4D4E5637079BA449EF7ADEE75C6951FB2F1CC12BE1DC942CBC633186AB80DC2F413B6865D89AA66B6F7111 point -
How to select (click) the pop-up menu item, when the screen is locked?
Tick reacted to pixelsearch for a topic
Well done InnI So we can't use MouseClick() as in your simpler 2017 script because of locked screen, right ? Edit: I'm actually reworking a bit your function from 2017. It will allow me to automate a direct mouseclick on a desired context menu item, instead of these "key down + key enter" I got in a couple of scripts. Thanks for your original function, nicely scripted.1 point -
_WD_Capabilities_Add() will be able to do so, provided we take all cases into account. It certainly won't happen right away, but we can start with the simplest and supplement it over time.1 point
-
To those who messaged me about the modified variant. I will release the Modified SocketIO UDF under the name SocketIOEx on Github and this forum. The framework around SocketIoEx will simply be called _netcode UDF. It will not be so soon, as i need to address certain issues and thoughts. I want to make the SocketIOEx more redundant, more DDOS proof and faster overall. For that i, for example, need to recode certain Autoit Functions like TCPSend() and TCPRecv(), as those come with known issues. _netcode UDF will be a plug and play UDF, it manages the whole network stuff and also reacts to certain bugs that may appear and so on. It will be really easy to use, someone could call the Send function with hundreds of MB of data and the _netcode would manage that. Also, whats not done yet, i plan to add a feature where a Client could get parts of the same data set from different providers to maxout the download speed. Similiar to torrent. But currently im working on Support for Tor, its already working, but the Tor app comes with a couple of issues.1 point
-
Because there is no GPO/GPP to set the printing margins to the minimum size in Internet Explorer, I was searching a way to achieve it with a script. Well, not easy... An easy way to set the margins to there minimum size is to set margin values to 0 from the Page setup window in Internet Explorer. When you re-open the Page setup window, the margins are set to there minimum sizes. It's because the minimum margins are based on the default printer's capabilities. When we set the margins values in the Page setup window, Internet Explorer checks if each value can me supported by the default printer, else it uses the minimum size from the printer capabilities. We could think that we have just to set the registry margins values to 0 but no, the Page setup window keeps 0 for each margin, so it doesn't work. Here is the code I made to define the margins, without using the Page setup from Internet Explorer : #Include <WinAPI.au3> #include <WinAPISys.au3> Global Const $PHYSICALOFFSETX = 112 Global Const $PHYSICALOFFSETY = 113 Global Const $LOGPIXELSX = 88 Global Const $LOGPIXELSY = 90 Global Const $PHYSICALWIDTH = 110 Global Const $PHYSICALHEIGHT = 111 Global Const $HORZRES = 8 Global Const $VERTRES = 10 Global $aRes = DllCall("GDI32.dll", "hwnd", "CreateDC", "str", "winspool", "str", _WinAPI_GetDefaultPrinter(), "long", 0, "long", 0) If @error Then Exit Global $hPrintDc = $aRes[0] Global $iLOGPIXELSX = _WinAPI_GetDeviceCaps($hPrintDc, $LOGPIXELSX) Global $iLOGPIXELSY = _WinAPI_GetDeviceCaps($hPrintDc, $LOGPIXELSY) Global $iPHYSICALWIDTH = _WinAPI_GetDeviceCaps($hPrintDc, $PHYSICALWIDTH) Global $iPHYSICALHEIGHT = _WinAPI_GetDeviceCaps($hPrintDc, $PHYSICALHEIGHT) Global $iHORZRES = _WinAPI_GetDeviceCaps($hPrintDc, $HORZRES) Global $iVERTRES = _WinAPI_GetDeviceCaps($hPrintDc, $VERTRES) Global $iPHYSICALOFFSETX = _WinAPI_GetDeviceCaps($hPrintDc, $PHYSICALOFFSETX) Global $iPHYSICALOFFSETY = _WinAPI_GetDeviceCaps($hPrintDc, $PHYSICALOFFSETY) Global $iMarginsLeft = $iPHYSICALOFFSETX / $iLOGPIXELSX Global $iMarginsTop = $iPHYSICALOFFSETY / $iLOGPIXELSY Global $iMarginsBottom = (($iPHYSICALHEIGHT - $iVERTRES) / $iLOGPIXELSY) - ($iPHYSICALOFFSETY / $iLOGPIXELSY) Global $iMarginsRight = (($iPHYSICALWIDTH - $iHORZRES) / $iLOGPIXELSX) - ($iPHYSICALOFFSETX / $iLOGPIXELSX) RegWrite("HKCU\Software\Microsoft\Internet Explorer\PageSetup", "margin_bottom", "REG_SZ", $iMarginsBottom) RegWrite("HKCU\Software\Microsoft\Internet Explorer\PageSetup", "margin_left", "REG_SZ", $iMarginsLeft) RegWrite("HKCU\Software\Microsoft\Internet Explorer\PageSetup", "margin_right", "REG_SZ", $iMarginsRight) RegWrite("HKCU\Software\Microsoft\Internet Explorer\PageSetup", "margin_top", "REG_SZ", $iMarginsTop) The code was adapted from here : http://www.swissdelphicenter.ch/en/printcode.php?id=1039 I hope it will be useful for someone1 point
-
Changing trayIcon with internal autoIT ressources - (Moved)
OhBobSaget reacted to Jos for a topic
It is already moved as the standard message indicates.1 point -
Praise to @Melba23! I can't tell you how grateful I am for the GUIListViewEx Guide! I definitely needed it, and it's well written too! Wonderful1 point
-
One possible way: you can put all the Send() and Sleep() sequence into a single string by separating them with the + sign and then use Execute () to execute that string of commands; something like this for example: HotKeySet("{Esc}", "Bye") HotKeySet("{PAUSE}", "captureMyKey") Global $Cata = 'Send("{2 down}") + Send("{5 down}") + sleep(100) + Send("{2 up}") + Send("{5 up}") + sleep(2500)' While Not GUIGetMsg() WEnd Func captureMyKey() Execute($Cata) EndFunc ;==>captureMyKey Func Bye() Exit EndFunc ;==>Bye1 point
-
Hi @vernalex a way to go could be to: 1) run the notifications as a standalone server program 2) from your programs (clients) send notifications to the notifications server Here a very simple example (I've simply modified a bit and adapted the examples from this wonderful post by @bogQ 1) run notifications as a standalone server. Compile and run this script first #include <Notifications.au3> #include <Array.au3> Opt("GUIOnEventMode", 1) _Notifications_Startup() TCPStartup() Dim $Socket_Data[1] $Socket_Data[0] = 0 $Listen = TCPListen(@IPAddress1, 1018, 500) If @error Then ConsoleWrite('!--> TCPListen error number ( ' & @error & ' ), look in the help file (on MSDN link) on func TCPListen to get more info about this error.' & @CRLF) Exit EndIf While 1 For $x = $Socket_Data[0] To 1 Step -1 $Recv = TCPRecv($Socket_Data[$x], 1000000) If $Recv Then _Notifications_Create('Client Number ' & $x & ' socket id: ' & $Socket_Data[$x], $Recv) EndIf Next _Accept() WEnd Func _Accept() Local $Accept = TCPAccept($Listen) If $Accept <> -1 Then _ArrayAdd($Socket_Data, $Accept) $Socket_Data[0] += 1 EndIf EndFunc ;==>_Accept 2) use a way like this from your clients to send notifications. Compile and run more instances of this script to send notifications to the server from more clients. TCPStartup() ; connect to the Notifications server $Socket = TCPConnect(@IPAddress1, 1018) If @error Then ; check for connection error ConsoleWrite('!--> TCPConnect error number ( ' & @error & ' ), look in the help file (on MSDN link) on func TCPConnect to get more info about this error.' & @CRLF) Exit EndIf While 1 $Message = InputBox("Notification", "Type Data to send (type bye to end") If $Message = "bye" Then Exit ; to send and popup a notification use the following command: TCPSend($Socket, $Message) WEnd1 point
-
How do I click on a popup?
pixelsearch reacted to InnI for a topic
@masCh Try this function for click popup menu item by index #include <GuiMenu.au3> WinWait("[class:#32768]") _ClickPopupItem(0) Func _ClickPopupItem($iIndex) Local $hWnd = WinGetHandle("[class:#32768]") If Not $hWnd Then Return SetError(1, 0, 0) Local $hPopup = _SendMessage($hWnd, 0x01E1) ; MN_GETHMENU If $iIndex < 0 Or $iIndex >= _GUICtrlMenu_GetItemCount($hPopup) Then Return SetError(2, 0, 0) Local $aRect = _GUICtrlMenu_GetItemRect($hWnd, $hPopup, $iIndex) If Not IsArray($aRect) Then Return SetError(3, 0, 0) Local $iOpt = Opt("MouseCoordMode", 1) MouseClick("left", $aRect[0], $aRect[1], 1, 0) Opt("MouseCoordMode", $iOpt) Return 1 EndFunc1 point -
Ah, found the execWB for it: #include <GuiConstantsEx.au3> #include <IE.au3> $oIE = _IECreateEmbedded() $hGUI = GUICreate("Test", 600, 600) $idObj = GUICtrlCreateObj($oIE, 10, 10, 580, 530) $idButton = GUICtrlCreateButton("PrintPreview", 250, 550, 100, 30) _IENavigate($oIE, "http://www.autoitscript.com") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $idButton $oIE.execWB(7, 2) EndSwitch WEnd For reference: execWB method OLECMDID values OLECMDEXECOPT values1 point
-
@LOULOU Maybe this is a good start. Opt("GUIOnEventMode", True) HotKeySet("`", "_LoadPicture") HotKeySet("=", "_Zoom") HotKeySet("-", "_Zoom") $oPreview = ObjCreate("Preview.Preview.1") GUICreate("Preview Test") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $GUI_OBJ = GUICtrlCreateObj($oPreview, 10, 10, 380, 380) GUISetState() _LoadPicture() While 1 Sleep(100) WEnd Func _LoadPicture() $sFile = FileOpenDialog("Open Image", @MyDocumentsDir & "\My Pictures", "Image files (*.bmp;*.jpg;*.jpeg)", 1) If @error Then Return $oPreview.ShowFile ($sFile, 1) EndFunc ;==>_LoadPicture Func _Zoom() Switch @HotKeyPressed Case "-" $oPreview.Zoom (-1) Case "=" $oPreview.Zoom (1) EndSwitch EndFunc ;==>_Zoom Func _Exit() Exit EndFunc ;==>_Exit regards ptrex1 point