| View previous topic :: View next topic |
| Author |
Message |
JimboSlice Guest
|
Posted: Sat Jul 05, 2008 8:01 pm Post subject: Problem with IfWinActive inside a Loop |
|
|
Here is what I got
| Code: |
Loop {
IfWinActive, Google - Mozilla Firefox
{
break
}
else
{
Send {TAB}
Send {Enter}
Send ^w
}
}
ExitApp
|
I'm on a site with a bunch of links placed in text format (browseable by using TAB and pressing Enter) and I want the Script to close Firefox and stop working when it finds the link that takes it to the site titled Google.
When it comes across the site titled Google the script will just keep doing the ELSE actions.
This has me puzzled, been trying for hours, help will be very appreciated, thanks in advance! |
|
| Back to top |
|
 |
SpiderGames
Joined: 09 Jun 2008 Posts: 290 Location: Canada
|
Posted: Sun Jul 06, 2008 3:03 am Post subject: |
|
|
after ifwinexist put exit app
| Code: |
Loop {
IfWinActive, Google - Mozilla Firefox
{
ExitApp
}
else
{
Send {TAB}
Send {Enter}
Send ^w
}
}
ExitApp
Or if you watn teh script to run all the time...
Loop {
IfWinActive, Google - Mozilla Firefox
{
break
Return, ; stops next action
}
else
{
Send {TAB}
Send {Enter}
Send ^w
}
}
ExitApp |
_________________ http://www.spider-games77.piczo.com
Join the Elite few... |
|
| Back to top |
|
 |
GodlyMario
Joined: 02 Jul 2008 Posts: 35
|
Posted: Sun Jul 06, 2008 3:06 am Post subject: |
|
|
ifwinactive only works if the window title bar of firefox is entitled
"Google - Mozilla Firefox", if tabbing and selecting the text link entitles the window so, then its fine, but if it doesnt, you need to find another solution to retrieve text
| Code: | Loop {
IfWinActive, Google - Mozilla Firefox
break
else
continue
Send {TAB}
Send {Enter}
Send ^w
}
exitapp
return |
|
|
| Back to top |
|
 |
JimboSlice Guest
|
Posted: Sun Jul 06, 2008 5:41 pm Post subject: |
|
|
| Thanks a lot guys, got it working. >:) |
|
| Back to top |
|
 |
|