Jump to content

AU3Recorder "Run" command does not trigger program execution?


Recommended Posts

Dear Group,

Very much a newbie to AutoIT but otherwise fairly experienced sysadmin so maybe my assumptions are not valid in this context :-(

I want to use AutoIT and AU3Recorder to automate the installation of an executable.   I have loaded the full version of SciTE to gain access to the AU3Recorder functionality.   Environment Windows 7 32 bit in a Windows Active Directory environment.

I create an .au3 file and open the Tools, AU3Recorder dialog.

I then select Generate Internal Functions, Record Window Text and Record Mouse tick boxes

I enter the name and path of the program to be installed (the installer)

For example Run('c:localmyprog.exe') and click the icon to begin recording.

I would expect the program "myprog.exe" to be launched, so that I could provide the necessary mouse clicks and keystrokes to complete the installation.

But I see nothing on screen, other than the recorder icon.

I must be doing something wrong??

After waiting a reasonable amount of time for things to happen (but they don't!) I then click to stop the recording process.   I see the script (.au3) file gets populated with several lines that appear to make sense, such as the Run command, but never any evidence of mouse clicks or key strokes because the program "myprog" appears never to have been launched.

<quote>

Run('C:mydirmyprog.exe')

_WinWaitActivate("C:mydirscriptname.au3 - SciTE","Match $whole word on")

<unquote>

Do I need to do something extra to make the installer (c:mydirmyprog.exe) launch and do its thing?

Kind regards in advance,

Denis

P.S. in the meantime doing my searching of your forum!

 

Link to comment
Share on other sites

Actually I solved this by avoiding the use of the macro recorder capability!

Re-read a few examples notably the Notepad examples and they provided me with the foundation for success.  In essence I just wrote my script from scratch.

While it would be good to understand how to effectively use the recorder, one day, it is not a big issue for me now.

Kind regards,

Denis

Link to comment
Share on other sites

 

Actually I solved this by avoiding the use of the macro recorder capability!

That's probably the best thing you did to start out.

 

Re-read a few examples notably the Notepad examples and they provided me with the foundation for success.  In essence I just wrote my script from scratch.

That's probably the second best thing.

 

While it would be good to understand how to effectively use the recorder, one day, it is not a big issue for me now.

 

Kind regards,

Denis

 Actually, I don't believe there's an effective way to use it. It's a great tool for when you're starting out with the language. But you'll find that the scripts it creates are extremely basic automation scripts. You'll probably create much better scripts than it can. I'm sure that a lot of work was put into making the recorder, but using Send and MouseClick is prone to errors in the long run.

Edited by BrewManNH

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

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...