Retrieving last url

Post your questions and help other users.

Moderator: Martin

Post Reply
ar234948
Posts: 6
Joined: 01 Jun 2016 21:15

Retrieving last url

Post by ar234948 » 19 Jun 2016 03:22

The following:

ControlUI
text = getText("http*");

Returns the first url encountered.

Is it possible to return the last one encountered instead?

I figured it might have to do with regex, but my trials have led to more than enough errors.

Along the same vein, would it be possible to add all urls to a list?

Thanks.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Retrieving last url

Post by Martin » 19 Jun 2016 18:22

The getText function with a pattern returns the text of the first matching element only. You would have to use getText(x, y) to search for other elements. The next version of Automagic adds a new function that retrieves the entire text on screen. You could then use a regular expression to extract all urls.

Regards,
Martin

dragon
Posts: 29
Joined: 10 Sep 2015 08:13

Re: Retrieving last url

Post by dragon » 26 Jun 2016 09:20

Martin, hello, I am really excited to read that the next version of automagic will be able to retrieve all text. I'm tempted to ask when the next release will be, but know that it's not proper to ask for release dates. I'm loving the app and already have it 5 stars a while back. Thanks again

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Retrieving last url

Post by Martin » 26 Jun 2016 19:26

Hi,

The release will probably be within the next few weeks if I don't find any serious bugs. The EAP build of the next version available in the EAP forum is feature complete and should be quite stable (I still highly recommend to create a backup before you install the EAP version).

Regards,
Martin

dragon
Posts: 29
Joined: 10 Sep 2015 08:13

Re: Retrieving last url

Post by dragon » 26 Jun 2016 19:34

thank you so very much :)

Post Reply