Sign in to follow this  
Followers 0
Chromed

Repeat checking last line

2 posts in this topic

If I wanted to repeatedly check only the last line from the results of a WinGetText to trigger a word match via StringRegExp what would be the code/pattern for that? 

Share this post


Link to post
Share on other sites



You might use something like this

$lastline = StringRegExpReplace($my_text, '(?ms).*^(\N+)\s*', "$1")

and then make the search in $lastline
But this expression could also be slightly modified to include the search and bring the result directly

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • Sn3akyP3t3
      Breevy minimized to task bar tray determine status enabled or disabled
      By Sn3akyP3t3
      Breevy is a text expander tool that is a handy productivity tool. However, it can interfere with Send commands to some windows if it is enabled and has the Typo AutoCorrections library imported and the utility is enabled. I seek to determine programmatically what the status of Breevy is either Enabled or Disabled.

      Via the GUI the utility presents the status as "Enabled" or "Disabled".

      This was my script to test with:
      ;With Breevy running and minimized
      If WinExists('Breevy') Then
      Opt('WinDetectHiddenText', 1)
      $hBreevy = WinGetHandle('Breevy')
      MsgBox(0,"",WinGetText($
      hBreevy))
      EndIf

      Results:
      Breevy.exe

      Summary of AutoIt v3 Window Info tool:
      >>>> Window <<<<
      Title: Breevy (Portable Mode)
      Class: gdkWindowToplevel
      Position: -8, -8
      Size: 1296, 1010
      Style: 0x17CF0000
      ExStyle: 0x00000110
      Handle: 0x00000000001309DE

      >>>> Control <<<<
      Class:
      Instance:
      ClassnameNN:
      Name:
      Advanced (Class):
      ID:
      Text:
      Position:
      Size:
      ControlClick Coords:
      Style:
      ExStyle:
      Handle:

      >>>> Mouse <<<<
      Position: 592, 10
      Cursor ID: 0
      Color: 0xC7D5E3

      >>>> StatusBar <<<<

      >>>> ToolsBar <<<<

      >>>> Visible Text <<<<
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe
      Breevy.exe


      >>>> Hidden Text <<<<
      Breevy.exe

      Any tips or suggestions will be appreciated. Also, is what I'm seeking to achieve feasible via viewing text of the window when minimized to the task bar in the tray?
    • trandatnh
      How to write a function like WinGetText in C/C++
      By trandatnh
      hi all,

      I found that the funtion WinGetText can get "visible text". But I wonder if we can write the same function in C...

      thanks