Jump to content

Search the Community

Showing results for tags 'matching'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 3 results

  1. I read various threads and theories regarding two string matching and convert matching value into Percentage. there are some algorithms to calculate similarity like Lowenstein, but sometimes you need more then that So, I written this code, and you will use it at your convenience script matches two strings with word by word OR character by character also match by case OR non case format you can also find difference with (100 – Result) If any suggestion then please write here #include <Array.au3> #include <File.au3> #include <Math.au3> #include <MsgBoxConstants.au3> #include <StringConstants.au3> $sStr01 = "My string Software v1.0" $sStr02 = "My String Software v1.1" ConsoleWrite("Standard: " & _StringMatchPercent($sStr01, $sStr02) & @CRLF) ; Return Standard: 95.65 ConsoleWrite("Case ON (Char lvl): " & _StringMatchPercent($sStr01, $sStr02, 1, 0) & @CRLF) ; Return "Case ON (Char lvl): 91.3" ConsoleWrite("Case ON (word lvl): " & _StringMatchPercent($sStr01, $sStr02, 1, 1) & @CRLF) ; Return "Case ON (word lvl): 50" ConsoleWrite("Case Off (Char lvl): " & _StringMatchPercent($sStr01, $sStr02, 0, 0) & @CRLF) ; Return "Case Off (Char lvl): 95.65" ConsoleWrite("Case Off (word lvl): " & _StringMatchPercent($sStr01, $sStr02, 0, 1) & @CRLF) ; Return "Case Off (word lvl): 75" Func _StringMatchPercent($FirstString = "", $SecondString = "", $iCaseSense = 0, $iMatchByWord = 0) ;~ ($iCaseSense : [0 = not case sensitive [, 1 = case sensitive]]) ;~ $iSplitByWord : [0 = Match Character by Character [, 1 = Match word by Word]] ;~ ### Check/Set function header parameters Local $sMatchBy = ($iMatchByWord = 0) ? "" : " " Local $inCaseSense = ($iCaseSense = 0) ? 0 : 1 If $FirstString = "" Or $SecondString = "" Then Return "0" Local $aFirstArray = StringSplit($FirstString, $sMatchBy, 2) _ArraySort($aFirstArray) ; Sort Array to Ascending Order ;~ _ArrayDisplay($aFirstArray,"Show First Array") Local $aSecondArray = StringSplit($SecondString, $sMatchBy, 2) _ArraySort($aSecondArray) ; Sort Array to Ascending Order ;~ _ArrayDisplay($aSecondArray,"Show Second Array") Local $inSL = 0 ;Second Level matching starting Point Local $iMatchCount = 0 Local $sMatchArg = 0 ; Now Matching Every First Array Element to Second Array Element For $iFL = 0 To UBound($aFirstArray) - 1 ; $iPL = Represent First Array Position For $iSL = $inSL To UBound($aSecondArray) - 1 ; $iSL = Second Array Position $inSL = Second Array Checking Start from If StringCompare($aFirstArray[$iFL], $aSecondArray[$iSL], $inCaseSense) = 0 Then ; If Both Element Matched $iMatchCount += 1 ; Match Count get +1 $inSL = $iSL + 1 ; Set New Starting Position for Second Array ExitLoop ; Exit Loop for checking next element EndIf Next Next Local $iMax = _Max(UBound($aFirstArray), UBound($aSecondArray)) ; Finding Large Array for Calculation Return Round((($iMatchCount <> 0) ? (($iMatchCount / $iMax) * 100) : 0), 2) EndFunc
  2. How to use the date and time in Microsoft Excel and use it find to find it in Windows explorer under date modified(date and time) if it matches then extract that picture and paste it in Microsoft Excel. I know have to use FileGetTime() but not sure how to do. Please help me. Thank you.
  3. hi , I have written a script to simulate keypresses and click on some windows The work is repetitive. Here I activate 'foobar' and click on a place in it then press few down arrow keys . Then some keypresses in 'reboot' window ... (1)It sometimes happen that am external window pops up taking focus away from action being performed by script . As a result ,say, 'reboot' window does not appear . How should I bring scipt to run from beginning (of while loop) again ? (2)I used window info tool to find coordinates of place to click . Is it possible that window info tool keeps updating mouse coordinate even when I do not drag its finder ? (3)I would also like to add functionality to do an action on window 'new IP' , if found , in the infinite while loop . Please give directions. Thanks. #include <AutoItConstants.au3> HotKeySet("{ESC}", "dummy") AutoItSetOption("WinTitleMatchMode",2); Local $hWnd, $x, $y, $pos, $reponse While 1 $hWnd = WinGetHandle("foobar") $pos = WinGetPos($hWnd) $x = 360 ; $y = 77 ; WinActivate($hWnd) MouseClick("left", $pos[0] + $x, $pos[1] + $y) Send("{DOWN}") WinWaitActive($hWnd) Send("{DOWN}") WinWaitActive($hWnd) Send("{DOWN}") WinWaitActive($hWnd) Send("{DOWN}") WinWaitActive($hWnd) Send("{DOWN}") Send("{DOWN}") WinWaitActive($hWnd) WinWaitActive($hWnd) Send("{ENTER}") $reboot_window = WinWait("Reboot") WinWaitActive($reboot_window) Send("{TAB}") WinWaitActive($reboot_window) Send("{SPACE}") WinWaitActive($reboot_window) Send("{TAB}") WinWaitActive($reboot_window) Send("{DOWN}") Send("{DOWN}") WinWaitActive($reboot_window) Send("{TAB}") WinWaitActive($reboot_window) Send("{DOWN}") WinWaitActive($reboot_window) Send("{TAB}") WinWaitActive($reboot_window) Send("{SPACE}") Sleep(1000) $response = WinGetHandle("Reboot") $pos = WinGetPos($response) $x = 168 ; 530-362 $y = 258 ; 376-118 WinActivate($response) MouseClick("left", $pos[0] + $x, $pos[1] + $y) Sleep(50000) WEnd Func dummy() EndFunc ;==>dummy
×
×
  • Create New...