ChristopherTyler Posted January 31, 2015 Posted January 31, 2015 I have created a script to install ccleaner but when i compile it it will not run the last part to finish. #RequireAdmin #region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000409) --- #region --- Internal functions Au3Recorder Start --- Func _Au3RecordSetup() Opt('WinWaitDelay',100) Opt('WinDetectHiddenText',1) Opt('MouseCoordMode',0) Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '') If $aResult[1] <> '00000409' Then MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000409->' & $aResult[1] & ')') EndIf EndFunc Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc _AU3RecordSetup() #endregion --- Internal functions Au3Recorder End --- Run('C:Installccsetup502.exe') _WinWaitActivate("CCleaner v5.02 Setup","View license agreeme") MouseClick("left",433,361,1) _WinWaitActivate("CCleaner v5.02 Setup","Select any additiona") MouseClick("left",251,238,1) MouseClick("left",447,371,1) _WinWaitActivate("CCleaner v5.02 Setup ","Completing the CClea") MouseClick("left",189,176,1) MouseClick("left",191,199,1) MouseClick("left",443,364,1) #endregion --- Au3Recorder generated code End --- when running as script it will run the "Completing the cclea" section but after x86 compile it will not do this section
Moderators JLogan3o13 Posted January 31, 2015 Moderators Posted January 31, 2015 So how far does it get when compiled? Does it launch the first MsgBox? Does it run ccsetup502.exe? Does it do any of the mouseclicks? Instead of asking us to guess, please be very specific as to where it fails. Help us help you "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!
orbs Posted January 31, 2015 Posted January 31, 2015 hello ChristopherTyler, welcome to AutoIt and to the forum! you'll find the common conception among automation experts would be that simulating mouse clicks and key press is the last resort, for various reasons. this is strikingly true in your case, where: 1. CCleaner has command line parameters for setup 2. CCleaner is portable in nature - just copy the files over, and you're done. all this does not in any way contradict the comment made by JLogan3o13. Read his last 4 words very carefully. and finally, of course, >this. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff
TheSaint Posted January 31, 2015 Posted January 31, 2015 @ChristopherTyler - Welcome to the forum. Just for your interest, and others. You should post your code using the provided code tags (see the button to the left of the Quote button). It makes it easier for those trying to read and troubleshoot your code. In fact, some won't even bother to help, if the code tags haven't been used. Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)
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