Leaderboard
Popular Content
Showing content with the highest reputation on 07/25/2021 in all areas
-
(Poll) What features do you wish you had in AutoIt?
seadoggie01 reacted to Musashi for a topic
OT : https://www.lexico.com/definition/recurse1 point -
Made one. #include <GDIPlus.au3> #include <Crypt.au3> Example() Func Example() If Not WinExists("[CLASS:Notepad]") Then Run("Notepad") WinWait("[CLASS:Notepad]") EndIf Local $hWnd = WinGetHandle("[CLASS:Notepad]") Local $hTimer = TimerInit() Local $dPCS = _PixelCheckSum($hWnd, 10, 10, 200, 200) ConsoleWrite(TimerDiff($hTimer) & "/" & $dPCS & @CRLF) EndFunc ;==>Example Func _PixelCheckSum($hWnd, $iLeft, $iTop, $iRight, $iBottom, $bStart = True) Local $hDC_Capture = _WinAPI_GetDC($hWnd) Local $hMemDC = _WinAPI_CreateCompatibleDC($hDC_Capture) Local $hHBitmap = _WinAPI_CreateCompatibleBitmap($hDC_Capture, $iRight, $iBottom) Local $hObject = _WinAPI_SelectObject($hMemDC, $hHBitmap) _WinAPI_PrintWindow($hWnd, $hMemDC) If $bStart Then _GDIPlus_Startup() Local $hBMP = _GDIPlus_BitmapCreateFromHBITMAP($hHBitmap) Local $iWidth = $iRight - $iLeft, $iHeight = $iBottom - $iTop Local $tStruct = _GDIPlus_BitmapLockBits($hBMP, $iLeft, $iTop, $iWidth, $iHeight, $GDIP_ILMREAD, $GDIP_PXF32ARGB) Local $tPixel = DllStructCreate("byte arr[" & $iWidth * $iHeight * 4 & "]", $tStruct.Scan0) Local $dRet = _Crypt_HashData($tPixel.arr, $CALG_MD5) _GDIPlus_BitmapUnlockBits($hBMP, $tStruct) _GDIPlus_BitmapDispose($hBMP) If $bStart Then _GDIPlus_Shutdown() _WinAPI_SelectObject($hMemDC, $hObject) _WinAPI_DeleteDC($hMemDC) _WinAPI_ReleaseDC($hWnd, $hDC_Capture) _WinAPI_DeleteObject($hHBitmap) Return $dRet EndFunc ;==>_PixelCheckSum1 point
-
Using FF.au3 + MozRepl in 2021
Musashi reacted to noellarkin for a topic
Just tested it, FF.au3 works out-of-the-box with all the browsers I mentioned The only function that doesn't seem to work (for obvious reasons) is __FFStartProcess() but that's not an issue, I can use ComSpec to run the browser process. Thank you so much for this amazing UDF! Regarding the lurking, ah, well, the thing is, I'm just a hobbyist, I don't code full-time, and over the past year I've been learning AutoIT just because it saves me so much time in data-entry work. And every time I wanted to join the forum I would just get intimidated by all the pros and the high level at which you guys are developing libraries here. Finally decided to join today, now that I have something (albeit something very minor) to contribute :)1 point -
Using FF.au3 + MozRepl in 2021
noellarkin reacted to Danp2 for a topic
What's preventing you from using the FF UDF with one of these browsers? P.S. How does it feel to have graduated from "lurker" status? 😄1 point -
Modular Scripts. Is Execute REALLY needed? Can we really trust user input? Also the huge amount of DLL loading probably doesn't help with AV false positives1 point
-
I am not sure exactly why but it may work better if you use if $c == '×¥' in your expression. Double equals "==" is used for case sensitive comparisons and may be required here.1 point
-
(Poll) What features do you wish you had in AutoIt?
seadoggie01 reacted to TheDcoder for a topic
@seadoggie01 I see the appeal as a JS programmer myself, but objects in JavaScript are very different from object in Java if I am correct. According to my knowledge, Java is a statically typed language so you need to declare your objects and their type before you can use them, and the object inheritance is implemented using a class system. JavaScript on the other hand lets you do whatever you want with objects and inheritance is "prototypial", where an object can inherit properties form a parent object, which is just a normal object like any other, no special types etc., so it is very dynamic and duck typing is king So which kind of objects do you prefer? @Alecsis1 Hi, thanks for posting, your English is a lot better than some people who are native speakers but suck at writing, more than suitable for communication In the context of AutoIt it is agreeable, but personally my primary goal to make another language was so that I can use it anywhere. I switched to Linux a couple of years ago and I have been missing AutoIt ever since, I am still using it for work but all my personal projects have been effectively halted because I can't use it in Linux. There is some truth, but it is a very nice feature which easily out-weighs any disadvantages. So it is better to add them at the beginning instead of doing it after you already have a single-threaded codebase. I am sure many programmers would relate to the urge to start writing from scratch again instead of reworking a large part of some code... don't want to make that mistake with this project The other features are noteworthy, thanks for posting them. @jpm @JockoDundee That kind of syntax is the last thing I want to see in AutoIt!1 point -
IlanMS, Variables require a leading "$". M231 point
-
The new Windows and Internet Explorer
seadoggie01 reacted to water for a topic
But even if the IE UDF works with Windows 11 (as far as I understand it by using a special mode in Edge), it is time to deal with WebDriver. It takes some time to get used to it. So you are ready if IE finally disappears at some point.1 point -
I would use SDL. You'll setup an SDL environment. I'll help if you're interested. Then you'll be able to create a screen surface attached to a GUI. Then load image files to SDL_Surfaces and blit (draw) them to the screen surface or other surfaces. Once the images are loaded into a SDL_Surface just redrawn at different positions or even animated by drawing a different surface at position. The UDF by AdmiralAlkex! Click [ MapIt ] in my signature for quick example of complex script using SDL (with pictures) Idk if the scripts currently work, but I do know I can help you with something and get you started. Scroll a little bit and you'll find a short video. Idk man good luck!1 point
-
Actually, this is incorrect. See the help file entry for Winactive, then check the description of the Title parameter. Notice the part where it say "See title special definition"? Click that and it will take you to the Window Titles and Text (Advanced) entry. Read the section with the heading "Advanced Window Descriptions" for details on how to use things like window class to identify a window. Also, if you look at the example under the WinActive help file entry, it shows how to use Class with WinActive.1 point
-
That does what you want doesn't it? Otherwise I might have misunderstood what you want.1 point
-
No, I never said you couldn't run it in a loop. You have to "unset" a hotkey to prevent it from continuing to function I was suggesting that you create a function that would remove all previously defined hotkeys. That way you could call this function from anywhere in your script instead of adding more HotKeySet statements. In your original post, you referenced windows such as $Login, $Add, & $Calculator. Because you only included a portion of your code, I assumed that these were windows associated with external programs. Now that you've posted additional code, my initial assumption appears to be wrong. Because we have a language barrier, it is important that you provide enough details for others to understand what you are saying. For example, you said "Fix it, put hotkey on new gui but a bit much code, is there another way? " and I have no way of knowing which portion of the code is troubling you. Hope this helps. 🙂0 points