prpldodge Posted July 9, 2008 Share Posted July 9, 2008 Have a simple script that call the uninstall routine for Novell. it requires two user inputs (hit enter) to complete. I captured the windows title and added some text that is displayed but it just ignores the windows and the user still has to hit enter. Any help would be appreciated. here is the script RunWait('cmd /c "%SystemRoot%\system32\rundll32 nwsetup.dll NWUninstallClient"') WinWait("Uninstall Novell Client for Windows","Are you sure you wan") If Not WinActive("Uninstall Novell Client for Windows","Are you sure you wan") Then WinActivate("Uninstall Novell Client for Windows","Are you sure you wan") WinWaitActive("Uninstall Novell Client for Windows","Are you sure you wan") Send("{ENTER}") WinWait("Uninstall Novell Client for Windows","you must shut down") If Not WinActive("Uninstall Novell Client for Windows","you must shut down") Then WinActivate("Uninstall Novell Client for Windows","you must shut down") WinWaitActive("Uninstall Novell Client for Windows","you must shut down") Send("{ENTER}") Thanks Alan Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 9, 2008 Share Posted July 9, 2008 Have a simple script that call the uninstall routine for Novell. it requires two user inputs (hit enter) to complete. I captured the windows title and added some text that is displayed but it just ignores the windows and the user still has to hit enter. Any help would be appreciated. here is the scriptRunWait('cmd /c "%SystemRoot%\system32\rundll32 nwsetup.dll NWUninstallClient"')WinWait("Uninstall Novell Client for Windows","Are you sure you wan")If Not WinActive("Uninstall Novell Client for Windows","Are you sure you wan") Then WinActivate("Uninstall Novell Client for Windows","Are you sure you wan")WinWaitActive("Uninstall Novell Client for Windows","Are you sure you wan")Send("{ENTER}")WinWait("Uninstall Novell Client for Windows","you must shut down")If Not WinActive("Uninstall Novell Client for Windows","you must shut down") Then WinActivate("Uninstall Novell Client for Windows","you must shut down")WinWaitActive("Uninstall Novell Client for Windows","you must shut down")Send("{ENTER}")Thanks AlanThe text is case sensitive. Examine the windows with AU3Info.exe to be sure you are matching visible text, and you have a case-sensitive match. Also, if there is only one window with that title, you don't need the text at all. muttley Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
prpldodge Posted July 9, 2008 Author Share Posted July 9, 2008 The second winactive needed the y in "you" capitalized but after recompiling I get the same thing. The two windows have the same name for a title. It only seems to run the RunWait('cmd /c "%SystemRoot%\system32\rundll32 nwsetup.dll NWUninstallClient"') and ignores the rest. Puzzled Alan Link to comment Share on other sites More sharing options...
NerdFencer Posted July 9, 2008 Share Posted July 9, 2008 Not sure, but maybe you should try using WinSetOnTop on the window in question? _________[u]UDFs[/u]_________-Mouse UDF-Math UDF-Misc Constants-Uninstaller Shell Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 9, 2008 Share Posted July 9, 2008 The second winactive needed the y in "you" capitalized but after recompiling I get the same thing. The two windows have the same name for a title. It only seems to run the RunWait('cmd /c "%SystemRoot%\system32\rundll32 nwsetup.dll NWUninstallClient"') and ignores the rest.PuzzledAlanPost the summary tab from AU3Info.exe with the mouse on the button you want (hit Ctrl-Alt-f to freeze the window info tool). muttley Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
herewasplato Posted July 10, 2008 Share Posted July 10, 2008 ...after recompiling...Don't compile it while debugging. Run it as an AU3 text file and include this line at the very top of your code:AutoItSetOption("TrayIconDebug", 1) ;0-offthen mouse-over the AutoIt icon in the system tray to see exatly whitch line of code the script is hung on - if any. ...It only seems to run the RunWait('cmd /c "%SystemRoot%\system32\rundll32 nwsetup.dll NWUninstallClient"') and ignores the rest...Does the script hang or exit? I'm ging to guess hangs - maybe you want Run instead of RunWait. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
prpldodge Posted July 10, 2008 Author Share Posted July 10, 2008 (edited) Ok I am working on postinng the summary tabs. but I was wondering if the problem is the runwait command. In the help it says "Runs an external program and pauses script execution until the program finishes." That is what is seems to be doing is pausing the script and not sending the enter key. is there a better way of executing that line? Alan Edited July 10, 2008 by prpldodge Link to comment Share on other sites More sharing options...
GEOSoft Posted July 10, 2008 Share Posted July 10, 2008 $wTtl = "Uninstall Novell Client for Windows" RunWait(@SystemDir & "\rundll32 nwsetup.dll NWUninstallClient") WinWaitActive($wTtl) Send("{ENTER}") Sleep(100) WinWaitActive($wTtl) Send("{ENTER}") 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!" Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 10, 2008 Share Posted July 10, 2008 Ok I am working on postinng the summary tabs. but I was wondering if the problem is the runwait command. In the help it says "Runs an external program and pauses script execution until the program finishes." That is what is seems to be doing is pausing the script and not sending the enter key. is there a better way of executing that line?AlanThat's what herewasplato posted: Does the script hang or exit? I'm ging to guess hangs - maybe you want Run instead of RunWait. muttley Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
prpldodge Posted July 10, 2008 Author Share Posted July 10, 2008 George Your code did the same thing but, I took PsaltyDS suggestion and changed the RunWait to Run and then your code worked fine. My guess is the original code might have worked but I like the way you did it. A lot cleaner looking. So just like the help file said "Runs an external program and pauses script execution until the program finishes" is what was happening. The script was waiting for it end before going on. Thanks all for the help. Alan Link to comment Share on other sites More sharing options...
GEOSoft Posted July 10, 2008 Share Posted July 10, 2008 GeorgeYour code did the same thing but, I took PsaltyDS suggestion and changed the RunWait to Run and then your code worked fine. My guess is the original code might have worked but I like the way you did it. A lot cleaner looking. So just like the help file said "Runs an external program and pauses script execution until the program finishes" is what was happening. The script was waiting for it end before going on. Thanks all for the help.AlanI forgot to change that in my code. Oh well, as long as it works then you should be fine. 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!" 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