UIGetValue

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Scones
Newbie
Posts: 8
Joined: Fri Jul 05, 2019 11:21 am

UIGetValue

Post by Scones » Thu Sep 26, 2019 8:20 am

Hi.

When i get a value from something using UIGetValue, how do i name the string?

When using GetClipboard i type "GetClipBoard>myclipboard", and my string will be called myclipboard

But i don't know how to do it for other get functions.

Thanks in advance!

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 490
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: UIGetValue

Post by Dorian (MJT support) » Mon Sep 30, 2019 11:16 am

The usage for UIGetValue is this :
UIGetValue>Window Title,Object Name, Values,Positions

If more than one object is found the values and positions will be delimited by the "|" character. So if there was more than one found you would use Separate

Here's a script to play with (tested in Win10)

Code: Select all

//Open a window to test with
Run>Explorer
WaitWindowOpen>File Explorer

UIGetValue>File Explorer,This PC,Values,Position
MessageModal>Values : %Values%%CRLF%%CRLF%Position : %Position%
Some "get commands" use an array though. Such as IEGetTagsByAttrib like this :

Code: Select all

//Set the variables
Let>TheURL=https://www.google.com/search?q=usd+to+gbp

//Create an IE instance
IECreate>IE[0]
WaitWindowOpen>Internet Explorer*

//Navigate
IENavigate>IE[0],TheURL,IEnavres
IEWait>%TheURL%

//Extract the value to an array : valueArray
// Change "O" to H to extract inner html, T for just text. O is outer html - i.e. everything. Matches returned in valueArray
IEGetTagsByAttrib>https://www.google.com,SPAN,classname=DFlfde SwHCTb,T,valueArray

mdl>valueArray_1

Always accepting custom script commissions. Message me or go here

Post Reply