Jump to content

Recommended Posts

Posted (edited)

I know this is a basic question

but im trying to focus on a firefox window with WinActivate and WinGetHandle

The url = http://tweepi.com/tools/flush#0

the tabname = Flush the Twitter users that do not follow you back :: Tweepi

but somehow Im doing something wrong because after the function I give the browser window a command and it give me an error that it didn'' found the browser window

So I would really like to know how I focus this window In the right way.

Edited by Arclite86
Posted

Well its actually pretty simple

When I go from page to page I use _FFOpenURL("http://website.com/example") it suddently loses focus  and after that all commants will give errors

If somebody could help me with something like: If error that "focus on firefox window"

but I dont know how I can do this in the correct way

Posted

This is an example when it loses it focused 

(Tweepi is the only website I use)

_FFOpenURL("http://tweepi.com/tools/flush#480")
_FFLoadWait()
$oButton2 = _FFXPath("//input [@id='button78']")
_FFClick($oButton2)
_FFLoadWait()
Sleep(2000)
_FFOpenURL("http://tweepi.com/tools/flush#500")
_FFLoadWait()
$oButton2 = _FFXPath("//input [@id='button78']")
_FFClick($oButton2)
_FFLoadWait() 

its very hard to track and see where the problem is because 9 out of 10 it works fine

but something it just loses it focus :wacko:  its very weird so thats why I thought of using a code like If error that "focus on firefox window"

Posted

Are you doing anything while this script runs? Clicking on another window?

yes is do sometimes I use google chrome at the same time, could that effect it? and how can I prevent I cant I use chrome at the same time?

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
×
×
  • Create New...