 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
mmmg Guest
|
Posted: Mon Jan 25, 2010 12:30 am Post subject: WinWait and WinWaitClose Problem |
|
|
I'm very new at this. As in last night was my first time making a script. I'm just trying to make a really simple script that will launch google chrome than wait for google chrome to close and then run Ccleaner and flush the dns entries. Everything works except that after I exit google chrome, nothing happens. Autohotkey says that the last script line that was executed is WinWait, - Google Chrome. And it stays there for ever. It's probably a very simple solution, I just don't know what it is. Thanks in advanced.
| Code: | Run, C:\Users\Michael\AppData\Local\Google\Chrome\Application\chrome.exe
WinWait, - Google Chrome
WinWaitClose
MsgBox, 4, Clean Session, Would you like to clear browsing session?, 60
IfMsgBox, No
return
Run, C:\Program Files (x86)\CCleaner\ccleaner.exe /AUTO
Run, cmd /c "ipconfig /flushdns",, Hide
MsgBox, 0, Clean Session, Browsing session is cleared., 30 | [/quote] |
|
| Back to top |
|
 |
Z_Gecko Guest
|
Posted: Mon Jan 25, 2010 12:36 am Post subject: |
|
|
| use RunWait |
|
| Back to top |
|
 |
Micahs
Joined: 01 Dec 2006 Posts: 460
|
Posted: Mon Jan 25, 2010 12:37 am Post subject: |
|
|
You're going to want to look at SetTitleMatchMode. Add | Code: | | SetTitleMatchMode, 2 |
| AHK Documentation wrote: | | 2: A window's title can contain WinTitle anywhere inside it to be a match. | The default (1) is that it must start with the given text to match. HTH
EDIT: Or just use RunWait... _________________
 |
|
| Back to top |
|
 |
mmmg Guest
|
Posted: Mon Jan 25, 2010 2:47 am Post subject: |
|
|
| Thanks. I had tried SetTitleMatchCode before and it didn't work so I tried RunWait, and it didn't work but then I tried SetTitlematchCode Again and it worked fine. So I don't know what the problem was, but it is fixed so thank you. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|