Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/06/2022 in all areas

  1. I'm sure he meant my fine sirs. 😇
    3 points
  2. Yeah, that's my dumb ass who did the typo. Thanks Guys! Finally got my first script to work!
    2 points
  3. Not mine: it comes verbatim from the OP, I was aware but was distracted before posting and forgot to fix it.
    2 points
  4. 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. Saludos
    1 point
  5. I used to be employed by the MFS .... Metropolitan Fire Service.
    1 point
  6. I know what it means.. and it's perfect.
    1 point
  7. 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 Simulator
    1 point
  8. 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
  9. @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
  10. 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 EndFunc
    1 point
  11. 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) EndFunc
    1 point
  12. 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 EndFunc
    1 point
  13. Grab your original script and update the name of the function that should be called when you press the hotkey.
    1 point
  14. Read that source again and try to understand when you will encounter the MouseClick() function.
    1 point
  15. Did you try? If yes, does it work?
    1 point
  16. Why should it? You don't ask for that. BTW do you realize that discussing automating games is forbidden here?
    1 point
  17. Where in your code do you call function MC?
    1 point
  18. 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 examples
    1 point
  19. I've installed Persian and tested it. The GetText throws an error 7 here: _UWPOCR_Log("FAIL __UWPOCR_GetText -> WaitForAsync IOcrResult") So the OCR engine does not seem to respond, that's where it lost me :), sorry, have no further clue. Here's a test sentence:
    1 point
  20. 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
  21. bobomb

    Robocopy

    Depends on how important shares and their share permissions actually are.. it is one way to keep them intact ~
    1 point
  22. JLogan3o13

    Robocopy

    In-Place upgrade of Server OS - 🤮 Didn't realize anyone still did that
    1 point
  23. bobomb

    Robocopy

    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
  24. 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 }}}}' EndFunc
    1 point
  25. 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 script
    1 point
×
×
  • Create New...