Cusem Posted January 18, 2008 Share Posted January 18, 2008 (edited) 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 withSend("{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:WindowTitle: Browse For FolderClass: #32770ControlClass: SysTreeView32Instance: 1ClassnameNN: SystreeView321ID: 100Text: Select a directory to defragVisible TextSelect a directory to defragSelect a directory to defrag&Make New FolderOKCancelHidden TextFolder:PostgreSQLto view any subfolders, click a plus sign above.I want to reproduce the text captured by the "Hidden Text" option in AutoIt v3 Window InfoI 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 defrag0Could anybody tell me how I can get the Hidden Text (Folder: PostgreSQL)?(or maybe a more efficient way to tackle this problem?) Edited January 18, 2008 by Cusem Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 18, 2008 Share Posted January 18, 2008 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 More sharing options...
Cusem Posted January 18, 2008 Author Share Posted January 18, 2008 Thanks for the reply, but I use Defraggler because it has the ability to defrag only one folder. So I'm looking for an answer how to get the hidden text. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted January 19, 2008 Share Posted January 19, 2008 Thanks for the reply, but I use Defraggler because it has the ability to defrag only one folder.So I'm looking for an answer how to get the hidden text.Windows defrag can defrag one folder as well. Atleast thats what I've read Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now