Leaderboard
Popular Content
Showing content with the highest reputation on 10/21/2020 in all areas
-
Yeap .... was done one time and we abandon that due some (lets say) issues and only use the standard forum capabilities. Pretty sure there will be some sort of add-in that would be able to handle it for us but we have never bothered. ... and honestly, I do not see any issue here. We can now tell you that you are a dumb-ass when you post in some "long bearded" thread ... so let's not take that "pleasure" away for us.4 points
-
Limited access for some forums
argumentum reacted to Musashi for a topic
It is relatively common for help requests to be posted in an inappropriate forum, for example : "Developer General Discussion", "AutoIt Technical Discussion" or "AutoIt Example Scripts". Although the header of these forums contains the unambiguous statement : "Do not post general support questions here, instead use the "AutoIt Help and Support" forums." , this is often ignored or overlooked, especially by new members. Perhaps it would make sense to allow access to these forums only for 'Active Members' (20+ posts), similar to CHAT. That could probably save @Jos 90 percent of the effort to move these contributions. Just an idea .1 point -
Is there any way to accelerate PixelGetColor?
JockoDundee reacted to Nine for a topic
If changes happen really really fast, then there is no way to ensure that while you are clicking 3 that 4 should be clicked before. It is just a question of nano seconds, and then you are doom to fail. Ensuring a true solution will require more info and a decisive replicable environment.1 point -
I've had the time to do a little more research into what all is involved in file signing using CNG. A good summary of the information can be found in the following links: CNG: Key Storage & Retrieval CNG: Key Import & Export CNG: Key Storage Functions The older Microsoft CryptoAPI and the newer Microsoft CNG API store their keys in different places and using different data structures. If I were to implement CNG file signing correctly, I would need to be able to handle both the older and newer key store formats (and locations). To be honest, since I don't have a need for it, file signing just doesn't interest me enough to spend the time to implement it the way it needs to be done. If you or anyone else wants to write the missing pieces to implement file signing, I would be happy to review, standardize, optimize, and add it to the CryptoNG UDF with the appropriate acknowledgements. I'm not saying that I won't do it. However, for me to spend the time necessary to do it right, it would have to be of interest to me like if I somehow developed a need to sign files on an ongoing basis, it was a widely requested feature in the forum, I'm getting paid to do it, or I suddenly felt inspired to a bunch of coding and had no other coding ideas on my list. Of course I could always slap some single use case functionality into the UDF just to say that it was implemented, but that is not my style. If I'm going to do it, I'm going to do it right and to the best of my abilities. For anyone interested in adding file signing functionality to the UDF, at a high level, below are the steps required to do it. I have identified the functionality that already exists in the CryptoNG UDF. Some of the required Ncrypt functions or almost a complete copy & paste of existing Bcrypt functions like NCryptOpenStorageProvider, which is almost exactly the same as BCryptOpenAlgorithmProvider. Hash a file/data (already exists) Create or select a public/private key pair (partially exist) The ability to create ephemeral RSA key pairs already exists (Bcrypt). The ability to create persisted key/pairs (key pairs that are save to a key store) does not currently exist (Ncrypt). Note: The main difference between Bcrypt & NCrypt functions as it relate to key storage, is that Bcrypt functions work with ephemeral keys and Ncrypt works with persisted keys. Sign the hash with the private key, to create a signature. (does not exist) Provide the signature to a user in a usable format. (does not exist) Be able to verify a signature. (does not exist)1 point
-
Yea I know but compared to what we get around these forums for cleaning up shit and getting all kinds of death wishes, it is pretty OK-ish.1 point
-
Limited access for some forums
seadoggie01 reacted to JLogan3o13 for a topic
As to why we don't go through and close every thread that is old, the short answer is because the Moderation staff has lives they would like to lead in addition to their duties here.1 point -
This works for me: #include <Excel.au3> Global Const $xlToRight = -4161 ; To right $oExcel = _Excel_Open(True) If @error Then Exit Msgbox($MB_ICONERROR, "Error", "Error creating Excel object! @error = " & @error & ", @extended = " & @extended) $oWorkBook = _Excel_BookOpen($oExcel, @Scriptdir & "\test_lastCell.xlsx") If @error Then Exit Msgbox($MB_ICONERROR, "Error", "Error opening the workbook! @error = " & @error & ", @extended = " & @extended) $oLastCol = $oWorkbook.ActiveSheet.Range("A2").End($xlToRight) ConsoleWrite($oLastCol.Address & @CRLF) Details can be found here: https://analystcave.com/excel-vba-last-row-last-column-last-cell/1 point
-
maybe this is what you want : #include <Constants.au3> #include <Math.au3> #include <Excel.au3> $oExcel = _Excel_Open(True) If @error Then Exit Msgbox($MB_ICONERROR, "Error", "Error creating Excel object! @error = " & @error & ", @extended = " & @extended) $oWorkBook = _Excel_BookAttach("s2017.xls", "filename") If @error Then Exit Msgbox($MB_ICONERROR, "Error", "Error attaching to the workbook! @error = " & @error & ", @extended = " & @extended) ; get actual last col/row used $col = $oWorkbook.ActiveSheet.Range("A1").SpecialCells($xlCellTypeLastCell).column $row = $oWorkbook.ActiveSheet.Range("A1").SpecialCells($xlCellTypeLastCell).row ConsoleWrite ($col & "/" & $row & @CRLF) ; get specific range col/row With $oWorkbook.ActiveSheet.Range("A1:Z200") $lcol = .Columns(.Columns.Count).Column $lrow = .Rows(.Rows.Count).Row EndWith ConsoleWrite ($lcol & "/" & $lrow & @CRLF) ; show the last used col/row used in a specific range ConsoleWrite (_Min($col,$lcol) & "/" & _Min($row,$lrow) & @CRLF)1 point
-
The code I supplied returns a range object. ConsoleWrite only displays strings. That's why you do net get a visible result. Try: $oRange = $oWorkbook.ActiveSheet.Range("I2:AM2").SpecialCells($xlCellTypeLastCell) Consolewrite($oRange.Address & @CRLF)1 point
-
Try something like this (untested): $oRange = $oWorkbook.ActiveSheet.Range("I2:AM2").SpecialCells($xlCellTypeLastCell)1 point
-
Your matrix is rotating around the bottom right corner, set the matrix to rotate around the centre (half the image width, half the image height, line 42). You will also need to offset the drawn graphic by that much to compensate (line 66). Test label on line 63. You've also got a memory leak, but that's for you to track #include <GDIPlus.au3> #include <GuiConstantsEx.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> Global $hAttribute_Alpha Global $tColorMatrix Global $g_back Global $g_Needle Global $g_hImage_Background Global $g_hImage_Needle Global $g_hGfx_Background Global $g_hGfx_needle Global $hMatrix GUISetState() $g_hGUI = GUICreate("Test", 356, 356, -1, -1, $WS_POPUP, BitOR($WS_EX_LAYERED,$WS_EX_TOOLWINDOW)) _GDIPlus_Startup() $Needle = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\needle.png") $Background = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\back.png") Func _CreateGraphic() $hAttribute_Alpha = _GDIPlus_ImageAttributesCreate() $tColorMatrix = _GDIPlus_ColorMatrixCreateTranslate(0, 0, 0, 0) ;0 = opaque, -1 = transparent _GDIPlus_ImageAttributesSetColorMatrix($hAttribute_Alpha, 0, True, DllStructGetPtr($tColorMatrix)) $g_back = _GDIPlus_ImageGetDimension($Background) $g_Needle = _GDIPlus_ImageGetDimension($Needle) $g_hImage_Background = _GDIPlus_BitmapCreateFromScan0($g_back[0], $g_back[1]) ; Creeaza imaginea dupa dimensiunile pozei incarcate mai sus $g_hImage_Needle = _GDIPlus_BitmapCreateFromScan0($g_Needle[0], $g_Needle[1]) ; Adaugat $g_hGfx_Background = _GDIPlus_ImageGetGraphicsContext($g_hImage_Background) $g_hGfx_needle = _GDIPlus_ImageGetGraphicsContext($g_hImage_Needle) ; Adaugat _GDIPlus_GraphicsDrawImageRectRect($g_hGfx_Background, $Background, 0, 0, $g_back[0], $g_back[1], 0, 0, $g_back[0], $g_back[1], $hAttribute_Alpha) $hMatrix = _GDIPlus_MatrixCreate() _GDIPlus_MatrixTranslate($hMatrix, $g_Needle[0]/2, $g_Needle[1]/2) EndFunc ; Loop until user exits $Rotation = 0 ;Do While Not GUIGetMsg() = $GUI_EVENT_CLOSE If $Rotation=365 Then $Rotation=0 EndIf __Rotate($Rotation) $Rotation += 5; ConsoleWrite($Rotation & @CRLF) Sleep(1000) WEnd Func __Rotate($i) _CreateGraphic() _GDIPlus_GraphicsClear($g_hGfx_needle, 0xFF000000) _GDIPlus_GraphicsDrawImageRectRect($g_hGfx_Background, $Background, 0, 0, $g_back[0], $g_back[1], 0, 0, $g_back[0], $g_back[1], $hAttribute_Alpha) $g_hGfx_Background = _GDIPlus_ImageGetGraphicsContext($g_hImage_Background) _GDIPlus_GraphicsDrawString($g_hGfx_Background, "Test", $g_back[0]/2, 30) _GDIPlus_MatrixRotate($hMatrix, $i) _GDIPlus_GraphicsSetTransform($g_hGfx_Background, $hMatrix) _GDIPlus_GraphicsDrawImageRect($g_hGfx_Background, $Needle, -$g_Needle[0]/2, -$g_Needle[1]/2, $g_Needle[0], $g_Needle[1]) SetBitmap($g_hGUI, $g_hImage_Background, 255) GUISetState() EndFunc IF GUIGetMsg=$GUI_EVENT_CLOSE Then _GDIPlus_MatrixDispose($hMatrix) _GDIPlus_ImageAttributesDispose($hAttribute_Alpha) _GDIPlus_ImageDispose($Needle) _GDIPlus_ImageDispose($g_hImage_Background) _GDIPlus_ImageDispose($Background) _GDIPlus_GraphicsDispose($g_hGfx_Background) _GDIPlus_Shutdown() EndIf Func SetBitmap($hGUI, $hImage, $iOpacity) Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend $hScrDC = _WinAPI_GetDC(0) $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap) $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize) DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth($hImage)) DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage)) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha", $iOpacity) DllStructSetData($tBlend, "Format", 1) _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA) _WinAPI_ReleaseDC(0, $hScrDC) _WinAPI_SelectObject($hMemDC, $hOld) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteDC($hMemDC) EndFunc ;==>SetBitmap1 point
-
@mLipok I've got a bit of free time at the moment so I'll look into adding general use data signing and verification routines. I just finished adding a new function to enumerate registered key storage providers. It is just like the current functions that enumerate registered cryptography providers & algorithms. Next will be adding a function to enumerate registered signing algorithms and then I will do the signing and verification functions.1 point
-
Bring the window to the front of the screen
Earthshine reacted to Jos for a topic
Not going to happen my friend... give it a try and post questions with code in case things don;t work as expected. .. or else you can hire me for $200 an hour to do it for you.... paying upfront. Jos1 point -
Make a DLL that contains icons or other pictures
abberration reacted to Tlem for a topic
Also, you can take a look here : Resource Dll Generator I just release this 1st version (hope that it can help someone). The code can probably be optimized or simplified, but the idea is there. I know that it is easier to have the resources of a highly-rated and the code of the other one. It avoids the heaviness of resources files.1 point -
$GUI_EVENT_PRIMARYDOWN
pixelsearch reacted to Valik for a topic
A second event can not be fired while still within the callback function for the first event. So if your OnPrimaryDown callback is running a loop, you're right, your OnPrimaryUp callback will not be invoked. You can avoid this by setting a flag in OnPrimaryDown and un-setting that flag in OnPrimaryUp. Then in your While loop that keeps the script active, check the condition of the flag. If the flag is down, execute what you need to do while the mouse button is down and poll the flag until it's unset denoting the OnPrimaryUp event fired.1 point