Jump to content

Controls that are difficult to make use of (example) any idea?


Morthawt
 Share

Go to solution Solved by Morthawt,

Recommended Posts

There are are controls on the truecrypt install I am trying to controlclick without having to resort to mouse movements or tabbing. The issue is I do not know how to actually get a controlclick to click the individual controls because the details I normally use like class and instance are all the same.

First button:

>>>> Window <<<<
Title:  TrueCrypt Setup 7.1a
Class:  CustomDlg
Position:   248, 119
Size:   567, 403
Style:  0x94CA0A4C
ExStyle:    0x00010100
Handle: 0x00000000000501FC

>>>> Control <<<<
Class:  #32770
Instance:   1
ClassnameNN:    #327701
Name:   
Advanced (Class):   [CLASS:#32770; INSTANCE:1]
ID: 1027
Text:   < &Back
Position:   314, 343
Size:   75, 23
ControlClick Coords:    35, 15
Style:  0x50010000
ExStyle:    0x00000004
Handle: 0x000000000008017C

>>>> Mouse <<<<
Position:   352, 383
Cursor ID:  0
Color:  0xF0F0F0

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
&Help
< &Back
&Next >
Cancel
Wizard Mode
TrueCrypt Installer
Select one of the modes. If you are not sure which to select, use the default mode.
TrueCrypt Setup Wizard
&Install
&Extract
If you select this option, all files will be extracted from this package but nothing will be installed on the system. Do not select it if you intend to encrypt the system partition or system drive. Selecting this option can be useful, for example, if you want to run TrueCrypt in so-called portable mode. TrueCrypt does not have to be installed on the operating system under which it is run. After all files are extracted, you can directly run the extracted file 'TrueCrypt.exe' (then TrueCrypt will run in portable mode).
Select this option if you want to install TrueCrypt on this system.


>>>> Hidden Text <<<<

Second button:

>>>> Window <<<<
Title:  TrueCrypt Setup 7.1a
Class:  CustomDlg
Position:   248, 119
Size:   567, 403
Style:  0x94CA0A4C
ExStyle:    0x00010100
Handle: 0x00000000000501FC

>>>> Control <<<<
Class:  #32770
Instance:   1
ClassnameNN:    #327701
Name:   
Advanced (Class):   [CLASS:#32770; INSTANCE:1]
ID: 1026
Text:   &Next >
Position:   389, 343
Size:   75, 23
ControlClick Coords:    52, 16
Style:  0x50010000
ExStyle:    0x00000004
Handle: 0x0000000000090170

>>>> Mouse <<<<
Position:   444, 384
Cursor ID:  0
Color:  0xF0F0F0

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
&Help
< &Back
&Next >
Cancel
Wizard Mode
TrueCrypt Installer
Select one of the modes. If you are not sure which to select, use the default mode.
TrueCrypt Setup Wizard
&Install
&Extract
If you select this option, all files will be extracted from this package but nothing will be installed on the system. Do not select it if you intend to encrypt the system partition or system drive. Selecting this option can be useful, for example, if you want to run TrueCrypt in so-called portable mode. TrueCrypt does not have to be installed on the operating system under which it is run. After all files are extracted, you can directly run the extracted file 'TrueCrypt.exe' (then TrueCrypt will run in portable mode).
Select this option if you want to install TrueCrypt on this system.


>>>> Hidden Text <<<<

Handle and ID are different for each button but I do not know how to get controlclick to work with this example. Do you know how I can do this?

Link to comment
Share on other sites

  • Moderators

According to the WPKG site, it is a pretty easy process to create a customized installer. Have you thought of using this instead of trying to automate the install GUI?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

TrueCrypt can be automated, you just need to remove the control on top of all the other controls. Use ControlHide.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

  • Solution

According to the WPKG site, it is a pretty easy process to create a customized installer. Have you thought of using this instead of trying to automate the install GUI?

I am on the autoit forum because I like using autoit not other tools (if I can help it).

 

TrueCrypt can be automated, you just need to remove the control on top of all the other controls. Use ControlHide.

 

Relating to this I have found that spy++ mode on the info tool very bothersome. If you disable it you get access to what is there under that control.

I actually just managed to figure out what the problem was. For some reason it requires admin mode to be able to interact for some reason. Perhaps it is a windows thing, but it would not click any control unless the script was running with admin rights. So now I can actually just use the id number to identify the control and it works perfectly. Very odd with it needing admin mode.

Thanks for the replies.

Edit:

Here is a little test script I have written to show someone a demonstration of automating an installer without having to move the mouse all over the place as they previously thought was the only way:

#RequireAdmin
$sTitle = 'TrueCrypt Setup 7.1a'
WinWait($sTitle, 'You must accept these license terms before you can use, extract, or install TrueCrypt')

ControlClick($sTitle, '', 1022, 'primary', 1)
ControlClick($sTitle, '', 1026, 'primary', 1)
ControlClick($sTitle, '', 1026, 'primary', 1)
ControlClick($sTitle, '', 1026, 'primary', 1)
WinWait('TrueCrypt Setup', 'TrueCrypt has been successfully installed.')
$sTitle = 'TrueCrypt Setup'
ControlClick($sTitle, '', 2, 'primary', 1)
$sTitle = 'TrueCrypt Setup 7.1a'
ControlClick($sTitle, '', 1026, 'primary', 1)
$sTitle = 'TrueCrypt Setup'
WinWait($sTitle, 'Do you want to view the tutorial')
ControlClick($sTitle, '', 7, 'primary', 1)

It is extremely fast, would be even quicker if I took the create system restore option off. Do you see any issues with doing it this way?

Edited by Morthawt
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...