Jump to content
Macro Express Forums

WEB sites problems with not active window


koden

Recommended Posts

My macro hit a button on a web site which opens a window on the site.

This window is not visible in macro "activate window" and I can't do a window check.

 

In this new window I have to insert a date in a field.

I can reach the field by TAB 10 times.

 

Is there any other ways to get these windows active in another way?

Link to comment
Share on other sites

If the new window always opens in a predictable location, perhaps you could check for a unique color at one or more places to test whether it has opened successfully.  Then maybe click the mouse within the window to make it active, and then TAB to the date field.  You will probably need some "delay" commands among the color checks and TABs, to keep the macro from outrunning the screen changes.

Link to comment
Share on other sites

I will try that.. but where did you find a way to check colors.

have looked and could not find a command that can check colors

 

But not sure it's much better than the TAB.

 

I assume it's the web site constuction that is not macro freindly.

Maybe there was a way around for that kind of sites.

Link to comment
Share on other sites

6 hours ago, koden said:

But not sure it's much better than the TAB.

TAB ten times is definitely better, if that's all you have to do.  I thought you were having trouble getting focus on the appropriate window, or making sure it had loaded, before you could even do the tabs -- that's why the other suggestions.

 

The command "Get Pixel Color" is under System commands.  I agree it's hard to find -- there are several commands I have trouble locating whenever I want to use them.  Get Pixel Color can be very useful; play around with it a bit when you have the time. 

Link to comment
Share on other sites

25 minutes ago, koden said:

 

It works but sometimes fails and I think it's because of this jumping up and down.

 

Sometimes tabbing from one field to the next doesn't take the fields in the order that you see them on the screen, but in a seemingly random order (but not really random).  So successive TABs might go from the top of the window to some field near the bottom then back to the top.  If the window is bigger than the screen, that can make it jump around like you describe.  


You might be able to use the browser's "find" command to get where you want to go.  For example, one of my macros uses the following sequence to find "forgot your password?" text within the window, then tabs backwards to get to the fields where name and password are typed.  

 

  Text Type (Simulate Keystrokes): 'forgot your password // single quote initiates Firefox Quick Search for hyperlink text
  Delay: 250 milliseconds
  Text Type (Simulate Keystrokes): <SHIFTD><TAB><TAB><TAB><TAB><SHIFTU>
  Delay: 250 milliseconds
    Text Type (Simulate Keystrokes): signonname<TAB>
    Text Type (Simulate Keystrokes): password<TAB>

 

Link to comment
Share on other sites

yes that could be... tab form top to bottom.

Not sure I completly understand this with search.

 

But if i search the word that is typed in this box, where i use mouse to click on because tab not works.

Then the word is highlighted in the box.

But still no tab or enter that can activate box.

 

Another issue with web site is that in the adress field (www field) the site name is (changed a bit but quite similar).

 

https://sys-online.dk/sys/#a_

 

when click in the first box where I should paste numbers it removes https:// and is now just sys-online.dk/sys/#a_

 

But whatever it is I can in macro express under timing "wait for window title" only see a window called "sys-online - google chrome"

 

The same when I on web site goes further into website...

The name in timing is still the same  "sys-online - google chrome"

yes that could be... tab form top to bottom.

Not sure I completly understand this with search.

 

But if i search the word that is typed in this box, where i use mouse to click on because tab not works.

Then the word is highlighted in the box.

But still no tab or enter that can activate box.

 

Another issue with web site is that in the adress field (www field) the site name is (changed a bit but quite similar).

 

https://sys-online.dk/sys/#a_

 

when click in the first box where I should paste numbers it removes https:// and is now just sys-online.dk/sys/#a_

 

But whatever it is I can in macro express under timing "wait for window title" only see a window called "sys-online - google chrome"

 

The same when I on web site goes further into website...

The name in timing is still the same  "sys-online - google chrome"

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...