Sign in to follow this  
Followers 0
vfsmoe

Going Crazy

13 posts in this topic

I am now at my wits end. This is what's happening. I am trying to create a script which uninstalls an app then starts the install of another app. For some reason the script stops. Just stops and will not contiue. I have looked at the syntax and the codeing and can not for the life of me,I can't figure it out.

I wrote some scripts 2 weeks ago and those work just fine. So I loaded the script that worked and changed the paths. Of course it stops at the same place it did before.

Does anyone know of any workstation settings that could prevent the script from running?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You will have to do better than this to be able to answer your question.

Show a scriptlet of the portion that "stops" or when it "hangs"you can add a statement at the top of the script to show you what line it is hanging:

Opt("TrayIconDebug", 1)
Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Run ("\\tek01\Applications\Final Draft\Update (must uninstall 8 first)\Final Draft.exe")

sleep(200)

WinWaitActive ("Open File - Security Warning")

ControlClick ( "Open File - Security Warning" , "Cancel", "Button1")

sleep(500)

WinWaitActive ("Welcome to the Final Draft Installation Wizard")

ControlClick ("Final Draft Setup", "Cancel", "Button1")

sleep(200)

ControlClick ( "Celtx Setup" , "Cancel", "Button2")

sleep(200)

WinWaitActive ( "Celtx Setup" , "Setup Type")

ControlClick ( "Celtx Setup" , "Cancel", "Button2")

sleep(200)

WinWaitActive ( "Celtx Setup" , "Summary")

ControlClick ( "Celtx Setup" , "Cancel", "Button2")

sleep(200)

WinWaitActive ( "Celtx Setup" , "Completing the Celtx Setup Wizard")

ControlClick ( "Celtx Setup" , "Cancel", "Button4")

ControlClick ( "Celtx Setup" , "Cancel", "Button2")

I am installing Final Draft and half way thru you will see celtx setup. Ignore that. The sript hangs on line7, Amazingly I have this script that points to a different file that worked. I tried to load that one but it is now compiled as an exe.

Share this post


Link to post
Share on other sites

Are you sure the args for line 7 correct. Look at the return value and @error to see what is going on. You can can also put WinAcitive("Final Draft Setup") at line 7 and check it returns 1.


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

Are you sure the args for line 7 correct. Look at the return value and @error to see what is going on. You can can also put WinAcitive("Final Draft Setup") at line 7 and check it returns 1.

OK Thanks for that.

Time to go home, but I will try this in the morning

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

You also don't need the sleep functions if you are using winwaitactive.

Edit: I don't think "Button1" is a control ID. Search for "Controls" in the autoit help file (without the quotes of course) and use that format. See if that works.

Edited by dantay9

[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

Are you sure the args for line 7 correct. Look at the return value and @error to see what is going on. You can can also put WinAcitive("Final Draft Setup") at line 7 and check it returns 1.

Now you're going to have me up all night looking for the proper syntax to use with WinAcitive()

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

#8 ·  Posted (edited)

Now you're going to have me up all night looking for the proper syntax to use with WinAcitive()

eh?

Edit: WinActivate ( "title" [, "text"] ). First arg matches the ContorlClick, second arg is optional. Returns 1 if successful, returns 0 if it could not be found or activated. If WinAcitive("Final Draft Setup") = 0 then ControlClick ("Final Draft Setup", "Cancel", "Button1") will not work.

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

You also don't need the sleep functions if you are using winwaitactive.

Edit: I don't think "Button1" is a control ID. Search for "Controls" in the autoit help file (without the quotes of course) and use that format. See if that works.

Button1 would be the same as "[CLASS:Button; INSTANCE:1]"

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

eh?

Edit: WinActivate ( "title" [, "text"] ). First arg matches the ContorlClick, second arg is optional. Returns 1 if successful, returns 0 if it could not be found or activated. If WinAcitive("Final Draft Setup") = 0 then ControlClick ("Final Draft Setup", "Cancel", "Button1") will not work.

You did it again. There is no "i" between the c and the t. :)

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

You did it again. There is no "i" between the c and the t. :)

Ok, going from post #7 I assume you think WinActive() should be WinAcitive()? - (same for WinActivate, I meant to write WinActive in my last reply).

I copied the syntax from the help file (version v3.3.0.0) which has "WinActivate" and "WinActive".

Could not find "WinAcitive" in the help file or anywhere that does have a "i" between the c and the t in Active or Activate (like Canadian spelling).

Now if I'm going down the wrong track please let me know, else I don't know what you are referring too.


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

#12 ·  Posted (edited)

Now if I'm going down the wrong track please let me know, else I don't know what you are referring too.

Look at the parameters you used!

Edit: I mean the function you used. It was YOU who said there was a function called WinAcitive(). Post 4 and 8.

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

Look at the parameters you used!

Edit: I mean the function you used. It was YOU who said there was a function called WinAcitive(). Post 4 and 8.

You know whenever i talk to a Dev or a MVP no matter how right I think I am just about everytime its going to be a learning experience. Sometimes I can't read what I have written. :) Thanks for pointing it out AdmiralAlkex.

@GEOSoft - when you said I did it again, I thought you where referring to the first time I mentioned WinActivate, didn't even look at the second which is why I couldn't figure what you where saying. Your right i'm wrong, i'm sorry and feel stupid ;)B)

Another find example why code says more then words can.


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

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