Leaderboard
Popular Content
Showing content with the highest reputation on 05/06/2022 in all areas
-
I'm sure he meant my fine sirs. 😇3 points
-
Yeah, that's my dumb ass who did the typo. Thanks Guys! Finally got my first script to work!2 points
-
Not mine: it comes verbatim from the OP, I was aware but was distracted before posting and forgot to fix it.2 points
-
Hello guys. I recently saw some posts that Windows 10 provides OCR API. So I decided to create a UDF. What's UWPOCR? UWPOCR UDF is a simple library to use Universal Windows Platform Optical character recognition API. Features. Get Text From Image File. Get Text From GDI+ Bitmap. Easy to use. Usage: #include "..\UWPOCR.au3" _Example() Func _Example() Local $sOCRTextResult = _UWPOCR_GetText(FileOpenDialog("Select Image", @ScriptDir & "\", "Images (*.jpg;*.bmp;*.png;*.tif;*.gif)")) MsgBox(0,"",$sOCRTextResult) EndFunc Get Words Rect(Example): More examples here. Check UWPOCR UDF on GitHub. Saludos1 point
-
I used to be employed by the MFS .... Metropolitan Fire Service.1 point
-
I know what it means.. and it's perfect.1 point
-
I had to google that one, and it didnt turn out good, google says either... "M*therf*ckers" or "Middle Finger Salute", but maybe google is wrong. 😛 There seem to be much more meanings for mfs (MFS), see : https://acronyms.thefreedictionary.com/MFS or : https://www.abbreviations.com/MFS My favorites : Muppets From Space, Mighty Fine Shaft, Music For Schizophrenics, Microsoft Flight Simulator1 point
-
I had to google that one, and it didnt turn out good, google says either... "M*therf*ckers" or "Middle Finger Salute", but maybe google is wrong. 😛1 point
-
1 point
-
Find non-autoit handle from multi istance of the same program
Earthshine reacted to Danp2 for a topic
@marcoautoYour English is fine. Maybe I didn't properly explain the steps needed, so let's try again -- Get the PID of the desired instance. You already have this from your Run() command. Use this PID with _WinAPI_EnumProcessWindows() to obtain the handle of the desired window. Store the result into an array Locate the desired row with "TSetupForm" in the second column Grab the window handle from the first column Now that you have the correct window handle, use it in conjunction with ControlGetHandle to obtain the desired control handle. Your code would look something like this -- $pid = Run(@ComSpec & ' /c programmDelphi.exe', $sPercorsoEncoder, @SW_HIDE) $aWindows = _WinAPI_EnumProcessWindows($pid) $iIndex = _ArraySearch($aWindows, "TSetupForm", 0, 0, 0, 0, 1, 1) $hWnd = $aWindows[$iIndex][0] $hListBox = ControlGetHandle($hWnd, "", "[CLASS:TListBox; INSTANCE:1]") To be clear, the above code is untested, needs error handling, etc. 😉1 point -
By the way: A hotkey to terminate the script would be beneficial : HotKeySet('h', Hotkey1) ; no quote needed since functions are first-class citizens HotKeySet("{ESC}", _Terminate) Func Hotkey1() ConsoleWrite('The Hotkey was pressed' & @CRLF) MC() ; invoke this holly function EndFunc ;==>Hotkey1 While 1 Sleep(50) WEnd Func MC() Sleep(10) MouseClick("LEFT", 702, 953, 1, 1) EndFunc Func _Terminate() MsgBox(BitOR(4096, 64), "Message :", "Script terminated" & @CRLF) Exit EndFunc1 point
-
MouseClick("LEFT", 702. 953, 1, 1) Just a small typo by @jchd (dot instead of comma). @thatboy : You could have easily spotted this yourself if you took a look at the help or the error message in the console output . Use Func MC() Sleep(10) MouseClick("LEFT", 702, 953, 1, 1) EndFunc1 point
-
If you insist on invoking function MC, then you need to invoke it by yourself, like in: HotKeySet('h', Hotkey1) ; no quote needed since functions are first-class citizens Func Hotkey1() ConsoleWrite('The Hotkey was pressed' & @CRLF) MC() ; invoke this holly function EndFunc ;==>Hotkey1 While 1 Sleep(50) WEnd Func MC() Sleep(10) MouseClick("LEFT", 702, 953, 1, 1) ; typo fixed EndFunc1 point
-
Grab your original script and update the name of the function that should be called when you press the hotkey.1 point
-
Read that source again and try to understand when you will encounter the MouseClick() function.1 point
-
Did you try? If yes, does it work?1 point
-
Why should it? You don't ask for that. BTW do you realize that discussing automating games is forbidden here?1 point
-
Where in your code do you call function MC?1 point
-
mesale0077 asked me whether I could code some CSS loading animations from different web sites. These are the results using GDI+ (AutoIt v3.3.12.0+ required!): _GDIPlus_MonochromaticBlinker.au3 / _GDIPlus_RotatingBokeh.au3 _GDIPlus_SpinningCandy.au3 / _GDIPlus_SteamPunkLoading.au3 _GDIPlus_IncreasingBalls.au3 / _GDIPlus_PacmanProgressbar.au3 _GDIPlus_StripProgressbar.au3 / _GDIPlus_RingProgressbar.au3 _GDIPlus_LineProgressbar.au3 / _GDIPlus_SimpleLoadingAnim.au3 _GDIPlus_TextFillingWithWater.au3 / _GDIPlus_MultiColorLoader.au3 _GDIPlus_LoadingSpinner.au3 / _GDIPlus_SpinningAndPulsing.au3 _GDIPlus_TogglingSphere.au3 / _GDIPlus_CloudySpiral.au3 _GDIPlus_GlowingText.au3 (thanks to Eukalyptus) / _GDIPlus_HypnoticLoader.au3 _GDIPlus_RotatingRectangles.au3 / _GDIPlus_TRONSpinner.au3 _GDIPlus_RotatingBars.au3 / _GDIPlus_AnotherText.au3 (thanks to Eukalyptus) _GDIPlus_CogWheels.au3 (thanks to Eukalyptus) / _GDIPlus_DrawingText.au3 (thanks to Eukalyptus) _GDIPlus_GearsAnim.au3 / _GDIPlus_LEDAnim.au3 _GDIPlus_LoadingTextAnim.au3 / _GDIPlus_MovingRectangles.au3 _GDIPlus_SpinningAndGlowing.au3 (thanks to Eukalyptus) / _GDIPlus_YetAnotherLoadingAnim.au3 _GDIPlus_AnimatedTypeLoader.au3 / _GDIPlus_Carousel.au3 Each animation function has a built-in example how it can be used. AiO download: GDI+ Animated Wait Loading Screens.7z (previous downloads: 1757) Big thanks to Eukalyptus for providing several examples. Maybe useful for some of you Br, UEZ PS: I don't understand CSS - everything is made out of my mind, so it might be different from original CSS examples1 point
-
Farsi (Right to Left) language tag is "fa" and I give it a png file with Farsi text with normal font. It returns nothing. But English works perfect. Any idea to fix it?1 point
-
Robocopy
Vaiola reacted to JLogan3o13 for a topic
In-Place upgrade of Server OS - 🤮 Didn't realize anyone still did that1 point -
https://docs.microsoft.com/en-us/windows-server/upgrade/upgrade-2012-to-2016 Are you not able to do an in place upgrade? ( know this is a loaded question but there are a lot of cases where it will work, depending on which services you are running.) You are migrating hardware as well?1 point
-
WebDriver UDF - Help & Support (II)
SkysLastChance reacted to stamyuka for a topic
Thanks a lot for the suggestion. I tried below two solutions based on the suggestions, and #1 works for me 😁 1. Use the alternative port solution, I added functions to check if the port has been taken by any process at the beginning of my script. If it's taken, add 1 to the port number and keep trying until it finds an available port and then use that to launch chrome driver (start trying from 9515). Using this solution, chrome driver can be launched separately for each user in each remote session. I attached the updated code below and it's working for me, thanks everyone for your help! 2. Use one shared chromedriver instance for multiple user's chrome sessions (This is not working for me in RemoteApp scenario). I updated the UDF to the latest version, and tried to launch scripts multiple times in separated remote sessions. But the problem is, when 2nd user launches remote session, it detects chrome driver process already exists, and then the Chrome browser is launched in the 1st user's remote session. As a consequence, 1st user sees two chrome browser window while the 2nd user sees nothing. #include "wd_core.au3" #include "wd_helper.au3" #include <Array.au3> #include <ConnView.au3> #include <GuiComboBoxEx.au3> #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <WindowsConstants.au3> Local $sDesiredCapabilities, $sSession, $aArray, $_Port, $aHandles Local $iAltPort = 9515 While 1 $aArray = _CV_GetExtendedTcpTable() $_Port = _ArrayFindAll($aArray, $iAltPort, 0, 0, 0, 0, 2) If @error Then ExitLoop Else $iAltPort = $iAltPort + 1 EndIf WEnd SetupChrome($iAltPort) MsgBox($MB_OK, 'Message', 'Click OK to start Chrome Driver at local port: ' & $iAltPort) _WD_Startup() If @error <> $_WD_ERROR_Success Then Exit -1 EndIf $sSession = _WD_CreateSession($sDesiredCapabilities) _WD_Window($sSession, "maximize") Opt("WinTitleMatchMode", 2) Local $tabHash = ObjCreate('System.Collections.Hashtable') Local $firstTab = True While 1 $aHandles = _WD_Window($sSession, 'handles') For $sHandle In $aHandles If Not $tabHash.ContainsKey($sHandle) Then _WD_Window($sSession, 'Switch', '{"handle":"' & $sHandle & '"}') $tabHash.Add($sHandle, 1) MsgBox($MB_OK, 'New Tab Detected', 'Click OK to open webpage.') _WD_Navigate($sSession, "https://www.google.com") ExitLoop EndIf Next Sleep(1000) If Not WinExists("Google Chrome") Then ExitLoop EndIf WEnd _WD_DeleteSession($sSession) _WD_Shutdown() Func SetupChrome($iAltPort) _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', $iAltPort) _WD_Option('DriverParams', '--verbose --port=' & $iAltPort & ' --log-path="' & @ScriptDir & '\chrome.log"') _WD_Option('DriverClose', False) _WD_Option('DriverDetect', False) ;$sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true }}}}' $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true, "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false }}}}' EndFunc1 point -
Network Connections Viewer
SkysLastChance reacted to trancexx for a topic
There are situation when you know something is going off from or to your computer and you have no idea what that is or who's doing that. On the other hand, sometimes you are just curious to know (I know I am) what's cooking. Scrip below is analyzing every connection that your machine have. Either TCP or UDP. It'll give you port numbers, IP addresses, names of the processes issuing connections, their PIDs, locations on HD, user names, connection statuses, and hints on protocols for used ports (so that you know roughly what that connection is or could be). Also you will be given an ability to disable desired connection. Script: ConnView.au3 edit: new script1 point