Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/08/2019 in all areas

  1. this is a UDF to make image search on inactive window, but not minimized. using it, you can seach for coords of an image so that you can use ControlClick to click on it in Background while you are watching a movie or doing something else on the screen. i am not who made this UDF . i only fixed some bugs on it : it wasn't able to run on 64 bit : so i added #AutoIt3Wrapper_UseX64=NO it looked for the top left of the image : so i made it find the height \ 2 and the width \ 2 of the image and add them to the Coords so the Coords will be at the middle of the image ... here is the UDF : imageSearchEX.au3 BmpSearch.au3 here is an example : #AutoIt3Wrapper_UseX64=NO ;because ImageSearchEX doesn't run on 64 bit #include <imageSearchEX.au3> $imageSearchEX = imageSearchEX ; this is to make it easy to write the name of the func ^_^ $Win = "..." ;the name or class of requested window $Image = "..." ;the path to the image you want to look for > it must be 24-bit Bitmap....and remember the more the image is small the faster you find it $_$.... ;you can use snipping tool .exe to capture it and use paint .exe to save it as 24-bit Bitmap $p= $imageSearchEX($Win,$Image) if $p=0 Then ; what to do if image was not exists MsgBox(0,"","Image Doesn't exist") EndIf _ArrayDisplay($p) ; you can delete this line >> as it only shows you the Coords of the image on the window ControlClick($Win,"leave it blank","the control you want to click","primary ...or the button you want to click","Number of clicks",$p[0],$p[1]) #cs ;If you want to test it on the screen using MouseClick or Mouse move ...etc $WinSize= WinGetPos("(Frozen) AutoIt v3 Window Info") MouseMove($p[0] + $WinSize[0],$p[1] + $WinSize[1],1) #ce and here are some functions to make it easy to use this UDF : #AutoIt3Wrapper_UseX64=NO #include <imageSearchEX.au3> Global $imageSearchEX = imageSearchEX Global $FAC = FindAndClick Global $WUA = WaitUntilAppear Global $WUATC = WaitUntilAppearThenClick Func FindAndClick($Window,$Image,$Control) ;~ This function is to find an image that is surely on the window when this function is called $coords = $imageSearchEX($Window,$Image) ControlClick($Window,"",$Control,"primary",1,$coords[0],$coords[1]) EndFunc Func WaitUntilAppear($Window,$Image,$Control) ;~ This function is to pause the script until an image is found on the window While 1 $coords = $imageSearchEX($Window,$Image) If Not $coords = 0 Then ExitLoop Sleep(50) WEnd EndFunc Func WaitUntilAppearThenClick($Window,$Image,$Control) ;~ This function is to pause the script until an image is found on the window then click on that image While 1 $coords = $imageSearchEX($Window,$Image) If Not $coords = 0 Then ControlClick($Window,"",$Control,"primary",1,$coords[0],$coords[1]) ExitLoop EndIf Sleep(50) WEnd EndFunc GAMERS - Asking for help with ANY kind of game automation is against the forum rules. DON'T DO IT. Sorry for bad English
    1 point
  2. You can in any browser type javascript in addressbar Javascript:<your jscode>;void,(0); So either do 1.alert(document.body.innertext) or 2. more complex scripting like adding textbox and copy pasting from that textbox. Or 3. make use of adding websocket thru addressbar and make use of tcpip commands autoit So as soon as regular functions cannot help you you can run any javascript thru addressbar. Sometimes only small chunks as number of characters is limited in addressbar. Be aware javascript and html is very case sensitive.
    1 point
  3. Subz

    New Scite Version

    https://www.autoitscript.com/site/autoit/downloads/ https://www.autoitscript.com/site/autoit-script-editor/downloads/
    1 point
  4. Yea right... you need an autoclicker lying around in case you need one. I will do a single click now and lets not continue this conversation. *click* Jos
    1 point
  5. You can parametrize the number of elements in output: Local $aArray = [11, 22, 33, 44, 55, 66, 77] Local $aRes _ArrayPermutePartial($aArray, $aRes, 3, ", ") _ArrayDisplay($aRes, "My result") Func _ArrayPermutePartial(ByRef $aIn, ByRef $aOut, $iCount, $sDelim) $aOut = _ArrayPermute($aIn, ", ") _ArrayDelete($aOut, 0) Local $sPattern = "(" & _StringRepeat(", [^,]+", UBound($aIn) - $iCount) & ")$" For $i = 0 To UBound($aOut) - 1 $aOut[$i] = "(" & StringRegExpReplace($aOut[$i], $sPattern, ")") Next $aOut = _ArrayUnique($aOut) _ArrayDelete($aOut, 0) EndFunc It's also possible and more efficient to merge the permutations of combinations, as I once showed in reply to a somehow similar request. See
    1 point
  6. nilesde

    Simple SQL Query Tool

    Its not my script, its the script that OP made at the top of this forum post. It runs and I can successfully connect to my database, but when I try out a query it closes with the error I mentioned. "The requested action with this object has failed" For ease of scrolling though here's the script again simpleQueryTool.txt
    1 point
  7. Another way: use array alternatives (object) like i.e. System.Collections.ArrayList or Scripting.Dictionary. So you can increase/decrease your array object without ReDim. Here an example: $ObjList = ObjCreate("System.Collections.ArrayList") ; create $ObjList.Add($VALUE) ; add value $VALUE = $ObjList.Item($Index) ; get value $ObjList.Remove($VALUE) ; delete by name $ObjList.RemoveAt($Index) ; delete by index $Array = $ObjList.ToArray ; list to array ; and more... $oDICT = ObjCreate('Scripting.Dictionary') $oDICT.Add($KEY, $VALUE) ; add pair (key/value) $VALUE = $oDICT.Item($KEY) ; get value $oDICT.Item($KEY) = $VALUE ; set value $oDICT.Remove($KEY) ; delete key $oDICT.RemoveAll ; delete all keys ; and more...
    1 point
×
×
  • Create New...