Sign in to follow this  
Followers 0
Badal

auto it install problem

5 posts in this topic

i want to make autoit script for adobedreamweaver cs3.. all scriting r complete for installation but when installation complete i want to lunch adobe dreamweaver cs3.exe from programfile.

so which control i want to use? run() or controlclick().

thnks. script is here for install abobedreamweaver cs3.

#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.0.0

Author: myName

Script Function:

Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#region --- ScriptWriter generated code Start ---

Opt("WinWaitDelay",100)

Opt("WinTitleMatchMode",4)

Opt("WinDetectHiddenText",1)

Opt("MouseCoordMode",0)

Run('Setup.exe')

WinWait("Adobe Dreamweaver CS3 Installer: License Agreement","")

If Not WinActive("Adobe Dreamweaver CS3 Installer: License Agreement","") Then WinActivate("Adobe Dreamweaver CS3 Installer: License Agreement","")

WinWaitActive("Adobe Dreamweaver CS3 Installer: License Agreement","")

MouseMove(318,294)

MouseDown("left")

MouseUp("left")

Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}")

WinWait("Adobe Dreamweaver CS3 Installer: Installation Location","")

If Not WinActive("Adobe Dreamweaver CS3 Installer: Installation Location","") Then WinActivate("Adobe Dreamweaver CS3 Installer: Installation Location","")

WinWaitActive("Adobe Dreamweaver CS3 Installer: Installation Location","")

Send("{TAB}{TAB}{TAB}{ENTER}")

WinWait("Adobe Dreamweaver CS3 Installer: Summary","")

If Not WinActive("Adobe Dreamweaver CS3 Installer: Summary","") Then WinActivate("Adobe Dreamweaver CS3 Installer: Summary","")

WinWaitActive("Adobe Dreamweaver CS3 Installer: Summary","")

Send("{TAB}{TAB}{TAB}{ENTER}")

WinWait("Adobe Dreamweaver CS3 Installer: Install","")

If Not WinActive("Adobe Dreamweaver CS3 Installer: Install","") Then WinActivate("Adobe Dreamweaver CS3 Installer: Install","")

WinWaitActive("Adobe Dreamweaver CS3 Installer: Install","")

Send("{TAB}")

WinWait("Adobe Dreamweaver CS3 Installer: Done","")

If Not WinActive("Adobe Dreamweaver CS3 Installer: Done","") Then WinActivate("Adobe Dreamweaver CS3 Installer: Done","")

WinWaitActive("Adobe Dreamweaver CS3 Installer: Done","")

MouseMove(521,519)

MouseDown("left")

MouseUp("left")

this script is for installing dreamweaver cs3. but after this complete i want to add code for lunch dreamweaver cs3 from programmefile so which coding i want to use for lunch dreamweaver cs3 from programmefile.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I would you use Run, if not you could use ShellExecute(). Also have a look at WinWait active if you want to do something after the program has loaded.

I recommend playing with just run before you put it at the bottom of your script to save time.

Lastly, please post code using the autoit code tags :(

If you have any issues just ask :)

#cs ----------------------------------------------------------------------------
    
    AutoIt Version: 3.3.0.0
    Author: myName
    
    Script Function:
    Template AutoIt script.
    
#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#Region --- ScriptWriter generated code Start ---
Opt("WinWaitDelay", 100)
Opt("WinTitleMatchMode", 4)
Opt("WinDetectHiddenText", 1)
Opt("MouseCoordMode", 0)
Run('Setup.exe')
WinWait("Adobe Dreamweaver CS3 Installer: License Agreement", "")
If Not WinActive("Adobe Dreamweaver CS3 Installer: License Agreement", "") Then WinActivate("Adobe Dreamweaver CS3 Installer: License Agreement", "")
WinWaitActive("Adobe Dreamweaver CS3 Installer: License Agreement", "")
MouseMove(318, 294)
MouseDown("left")
MouseUp("left")
Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}")
WinWait("Adobe Dreamweaver CS3 Installer: Installation Location", "")
If Not WinActive("Adobe Dreamweaver CS3 Installer: Installation Location", "") Then WinActivate("Adobe Dreamweaver CS3 Installer: Installation Location", "")
WinWaitActive("Adobe Dreamweaver CS3 Installer: Installation Location", "")
Send("{TAB}{TAB}{TAB}{ENTER}")
WinWait("Adobe Dreamweaver CS3 Installer: Summary", "")
If Not WinActive("Adobe Dreamweaver CS3 Installer: Summary", "") Then WinActivate("Adobe Dreamweaver CS3 Installer: Summary", "")
WinWaitActive("Adobe Dreamweaver CS3 Installer: Summary", "")
Send("{TAB}{TAB}{TAB}{ENTER}")
WinWait("Adobe Dreamweaver CS3 Installer: Install", "")
If Not WinActive("Adobe Dreamweaver CS3 Installer: Install", "") Then WinActivate("Adobe Dreamweaver CS3 Installer: Install", "")
WinWaitActive("Adobe Dreamweaver CS3 Installer: Install", "")
Send("{TAB}")
WinWait("Adobe Dreamweaver CS3 Installer: Done", "")
If Not WinActive("Adobe Dreamweaver CS3 Installer: Done", "") Then WinActivate("Adobe Dreamweaver CS3 Installer: Done", "")
WinWaitActive("Adobe Dreamweaver CS3 Installer: Done", "")
MouseMove(521, 519)
MouseDown("left")
MouseUp("left")

Run('"C:\Program Files\Adobe\Dreamweaver\Dreamweaver\dreamweaver.exe"') ; you will have to fix up the path. You will need the extra quotes
Edited by bo8ster

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites

If I remeber correctly, Dreamweaver write a key in the registry for it's path. Just locate the key (I don't remember it) and use RegRead and Shellexecute.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

If I remeber correctly, Dreamweaver write a key in the registry for it's path. Just locate the key (I don't remember it) and use RegRead and Shellexecute.

do u know how to find the reg. key from reg.?

Share this post


Link to post
Share on other sites

i want to make autoit script for adobedreamweaver cs3.. to use? run() or controlclick().

#region --- ScriptWriter generated code Start ---

MouseMove(318,294)

MouseDown("left")

MouseUp("left")

Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}")

Ahhh, good ole ScriptWriter!! It seems like yesterday when I didn't know what the world I was doing and thought ScriptWriter was the greatest thing EVER!!! Its was a great learning tool ... for the first week. But reading/searching the Help file and playing around with the example scripts is really the next step.

Badal, look up these commands and compare them to what ScriptWriter did for you. The 4 lines quoted above work perfectly I'm sure. But isn't this a cleaner and easier way to do the same thing?

MouseClick("left", 318,294)
Send("{TAB 13}{ENTER}")

Oh and to your question of Run() verses ControlClick(), they can both be used to "run/launch" something but they aren't really for the same purpose. In your studies, look at the other functions/commands that start with "Control" and you'll come to love that. One huge advantage of the Control*() functions is that what you're scripting can be hidden or in the background!!

Cheers!!

Share this post


Link to post
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
Sign in to follow this  
Followers 0