langthang084 Posted July 18, 2014 Share Posted July 18, 2014 here is my code Do send("!a") sleep(300) send("{space}") Until WinActive("Microsoft Office Word", "made 1 replacements.") I want to send ALT + A and SPACE until the window "Word has completed its search of the document and has made 1 replacements." appear. But if i run this scripts above, it will run forever. And When I change to "WinActive("Microsoft Office Word", "1"), it stop when "made 10 replacements" appear. Link to comment Share on other sites More sharing options...
careca Posted July 18, 2014 Share Posted July 18, 2014 (edited) When you use "WinActive("Microsoft Office Word", "2")" Does it stop at "made 2 replacements"? If it does, im inclined to think it may have something to do with timing.. How can i reproduce it? EDIT: BTW check the title of the topic. Edited July 18, 2014 by careca Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
langthang084 Posted July 18, 2014 Author Share Posted July 18, 2014 No. It stop at "made 29 replacements" :| Link to comment Share on other sites More sharing options...
careca Posted July 18, 2014 Share Posted July 18, 2014 Try: While WinActive("Microsoft Office Word", "made 1 replacements.") = 0 send("!a") sleep(300) send("{space}") WEnd Check if the word you are looking for is realy "replacements." and not "replacement." since it's 1 replacement. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
langthang084 Posted July 19, 2014 Author Share Posted July 19, 2014 It still run again and again :|. I also change to "made 1 replacement" but not successful Link to comment Share on other sites More sharing options...
Solution careca Posted July 19, 2014 Solution Share Posted July 19, 2014 (edited) Try adding the opt WinTitleMatch 2 option to the top, and change the title to just "made 1" or "1 replacement". Im not at my desktop, so i may be wrong, but i think it's that or very similar, search for title match in help file and you'll see it. EDIT: its WinTitleMatchMode 2 Edited July 19, 2014 by careca Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
langthang084 Posted July 20, 2014 Author Share Posted July 20, 2014 Thanks you! I have solved it. When i put sleep(300) below "send("{space}") and use "replacement", not "replacements", now it run correctly. Here's my code: Do send("!a") sleep(300) send("{space}") sleep(300) Until WinActive("Microsoft Office Word", "made 1 replacement.") Link to comment Share on other sites More sharing options...
careca Posted July 20, 2014 Share Posted July 20, 2014 Glad it's sorted out. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe 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