Jump to content
Sign in to follow this  
daashag

Using Data from Window Info

Recommended Posts

daashag

That totally worked. It was adding a blank space in the front of the string. Just curios as to why this code didn't work though.

Local $s_path = StringStripWS ($aArray[0],1)

Do
    WinWaitNotActive("Create Backup", "")
Until FileExists($s_path)

Thanks a ton. Never would have figured this out without your help.

Share this post


Link to post
Share on other sites
herewasplato

@daashag,

You are welcome.

StringStripWS ($aArray[0],1)

Removes the "white space" from the front of the path.

StringStripWS ($aArray[0],2)

Removes the "white space" from the end of the path.

StringStripWS ($aArray[0],3)

Removes the "white space" from both ends of the path.

I should have noticed from your post of the "AutoIt Window Info" tool.

If the path was displayed on a separate line in that tool,

then there had to be a CR or CRLF after "001"

and there had to be a CR or CRLF after the path.

If we tell _StringBetween to return everything between '001' and 'TROON', it does just that - including whatever form of line returns your app is using.

I've never worked with _StringBetween before...

Thanks for the opportunity to learn about another of SmOke_N's fine UDF's.

Glad that it helped you out too.

I PM'd piccaso to come to my aid while I was stuck on this...

@piccaso,

Thanks for coming to the thread.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
maurocav

$WinText = WinGetText('Some window')
$aArray = _StringBetween($WinText, '001', 'TROON', -1, 1)
If IsArray($aArray) Then MsgBox(64, 'Info', $aArray[0])

_StringBetween() is in the 3.2.1.12 beta.

And if beginning and end of visible text is unknow ?

best regard

Share this post


Link to post
Share on other sites
herewasplato

And if beginning and end of visible text is unknow ?

best regard

Then you will not want to use the _StringBetween UDF. Please post more info about what you are working with.

Can you post the info from the AutoIt info tool like in this post:

http://www.autoitscript.com/forum/index.ph...st&p=269150

-MSP-


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
maurocav

Then you will not want to use the _StringBetween UDF. Please post more info about what you are working with.

Can you post the info from the AutoIt info tool like in this post:

http://www.autoitscript.com/forum/index.ph...st&p=269150

-MSP-

Tank you

Iave resolved with

$WinText = WinGetText('Program')

best regard

Share this post


Link to post
Share on other sites
herewasplato

Glad that you got it working....enjoy.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
maurocav

Glad that you got it working....enjoy.

Please i need still a help:

I ave more same strings within a file,how delete all doubles ?

Tank

Share this post


Link to post
Share on other sites
herewasplato

Please i need still a help:

I ave more same strings within a file,how delete all doubles ?

Tank

I would suggest that you open a new topic in the support forum and post a sample of the text that you are dealing with and a sample of what you want the text to look like after the script runs - or a sample of the text that you want the script to pull out of the starting text.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
maurocav

I would suggest that you open a new topic in the support forum and post a sample of the text that you are dealing with and a sample of what you want the text to look like after the script runs - or a sample of the text that you want the script to pull out of the starting text.

Tank you

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×