Morthawt Posted September 26, 2013 Share Posted September 26, 2013 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: expandcollapse popup>>>> 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: expandcollapse popup>>>> 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? Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 26, 2013 Moderators Share Posted September 26, 2013 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 More sharing options...
guinness Posted September 26, 2013 Share Posted September 26, 2013 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 parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Solution Morthawt Posted September 26, 2013 Author Solution Share Posted September 26, 2013 (edited) 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 September 26, 2013 by Morthawt Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. 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