Jump to content

Get Hidden Text


Cusem
 Share

Recommended Posts

I'm trying to automate a defragmentation job (defragmenting just the PostgresSQL folder) using Defraggler.

When I get to the "Browse For File" window (where you select which folder you want to defrag) I automated this very simple with

Send("{DOWN 2}") (Go to the C-Drive)

Send("{RIGHT}") (Enter C-Drive)

Send("p") (Go to the first folder beginning with "p")

Send("{DOWN 12}") (PostgresSQL folder is the 12th folder beginning with a "p")

This is very amateuristic, but I don't know how to do it more efficient.

Thing is, If I would install a new program in a folder that starts with "PA", the Send("{DOWN 12}") has to be Send("{DOWN 13}")

To check this, I want to use ControlGetText to check if the selected folder actually is PostgresSQL.

If I Use AutoITWindowInfo it says for the "Browse For Folder" window:

Window

Title: Browse For Folder

Class: #32770

Control

Class: SysTreeView32

Instance: 1

ClassnameNN: SystreeView321

ID: 100

Text: Select a directory to defrag

Visible Text

Select a directory to defrag

Select a directory to defrag

&Make New Folder

OK

Cancel

Hidden Text

Folder:

PostgreSQL

to view any subfolders, click a plus sign above.

I want to reproduce the text captured by the "Hidden Text" option in AutoIt v3 Window Info

I tried:

OPT("WinDetectHiddenText", 1)

$controltext = ControlGetText("Browse For Folder", "", 100)

$wintext = WinGetText("Broswe For Folder", "")

MsgBox(0, "test", $controltext&@LF&$wintext)

Which returns:

Select a directory to defrag

0

Could anybody tell me how I can get the Hidden Text (Folder: PostgreSQL)?

(or maybe a more efficient way to tackle this problem?)

Edited by Cusem
Link to comment
Share on other sites

I'm trying to automate a defragmentation job (defragmenting just the PostgresSQL folder) using Defraggler.

When I get to the "Browse For File" window (where you select which folder you want to defrag) I automated this very simple with

Send("{DOWN 2}") (Go to the C-Drive)

Send("{RIGHT}") (Enter C-Drive)

Send("p") (Go to the first folder beginning with "p")

Send("{DOWN 12}") (PostgresSQL folder is the 12th folder beginning with a "p")

This is very amateuristic, but I don't know how to do it more efficient.

Thing is, If I would install a new program in a folder that starts with "PA", the Send("{DOWN 12}") has to be Send("{DOWN 13}")

To check this, I want to use ControlGetText to check if the selected folder actually is PostgresSQL.

If I Use AutoITWindowInfo it says for the "Browse For Folder" window:

Window

Title: Browse For Folder

Class: #32770

Control

Class: SysTreeView32

Instance: 1

ClassnameNN: SystreeView321

ID: 100

Text: Select a directory to defrag

Visible Text

Select a directory to defrag

Select a directory to defrag

&Make New Folder

OK

Cancel

Hidden Text

Folder:

PostgreSQL

to view any subfolders, click a plus sign above.

I want to reproduce the text captured by the "Hidden Text" option in AutoIt v3 Window Info

I tried:

OPT("WinDetectHiddenText", 1)

$controltext = ControlGetText("Browse For Folder", "", 100)

$wintext = WinGetText("Broswe For Folder", "")

MsgBox(0, "test", $controltext&@LF&$wintext)

Which returns:

Select a directory to defrag

0

Could anybody tell me how I can get the Hidden Text (Folder: PostgreSQL)?

(or maybe a more efficient way to tackle this problem?)

$Drive = InputBox("Drive?",'What drive woudl you like to defrag?' &@CRLF& 'Example: C:\')
RunWait('defrag.exe ' & $Drive)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...