Jump to content

Problem with WinDetectHiddenText


WBoy2
 Share

Recommended Posts

Hello,

with my script on Friday I could read hidden text with

$Line = WinGetText($Title)

Before this I set

$i = Opt("WinDetectHiddenText", 1)

MsgBox(0, "I", $i)

Today the result $i = 0 and I can't read hidden text.

What is my mistake?

Can anyone help me, please?

Link to comment
Share on other sites

Hello,

with my script on Friday I could read hidden text with

$Line = WinGetText($Title)

Before this I set

$i = Opt("WinDetectHiddenText", 1)

MsgBox(0, "I", $i)

Today the result $i = 0 and I can't read hidden text.

What is my mistake?

Can anyone help me, please?

I'm pretty sure it should be:

Opt("WinDetectHiddenText", 1)
$Line = WinGetText($Title)
MsgBox(0, "", $Line)
Link to comment
Share on other sites

On Friday I made a lot of tests to read names from an application.

Tests with

$Line = WinGetText("[TITLE:Application; CLASS:SWT_Window0; INSTANCE:46]", "")
$Line = WinGetText($Title)

and so on without the right result.

To get information about the window I use your "Au3Info.exe" and select the folder

"Hidden Text" and I got all information who I want. In the restles day I worked with

Opt("WinDetectHiddenText", 1)
$Line = WinGetText($Title)
MsgBox(0, "", $Line)

how you described and it works very well.

Today in my and your application "Au3Info.exe" I doesn't see the hidden text from friday.

In your help file I read about the result value from Opt("WinDetectHiddenText", 1)

and it should be "1" but it is "0".

What have I done on friday or today that now hidden text is not available?

Is there a parameter changed who I not known?

I booted my computer two times without result.

Thank you for the help

Link to comment
Share on other sites

  • Moderators

On Friday I made a lot of tests to read names from an application.

Tests with

$Line = WinGetText("[TITLE:Application; CLASS:SWT_Window0; INSTANCE:46]", "")
$Line = WinGetText($Title)

and so on without the right result.

To get information about the window I use your "Au3Info.exe" and select the folder

"Hidden Text" and I got all information who I want. In the restles day I worked with

Opt("WinDetectHiddenText", 1)
$Line = WinGetText($Title)
MsgBox(0, "", $Line)

how you described and it works very well.

Today in my and your application "Au3Info.exe" I doesn't see the hidden text from friday.

In your help file I read about the result value from Opt("WinDetectHiddenText", 1)

and it should be "1" but it is "0".

What have I done on friday or today that now hidden text is not available?

Is there a parameter changed who I not known?

I booted my computer two times without result.

Thank you for the help

Maybe the application you are trying to read has updated to prevent this?

If you are doing what you say you are doing "correctly", then give us the application name so someone can test to see if there is an issue with your code, or an issue with actually getting the text. Otherwise it's just a guessing game.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

The apllication who I will read is our "Redaktionssystem" to write technical documentation.

It is based on XMeatal XML-Editor and has a DTD from another german company.

The application is not updated since friday.

With the AutoIt3 scripts I would like to support our editors to reduse time for any handlings.

One AutoIt3 script I have distributed and the editors use it very well.

I think we should not spend a lot of time in this application. If the script is not working than it is so.

Maybe I should go inside in my mind after several days to take a new begin with new ideas.

If I found a reason for this behaviour I will post it on this place. I think it is difficult enough

to control another application and it is not so importand to run this script.

Thanks a lot for the fast help.

Thank you for a such helpfull software.

Have a nice day.

Link to comment
Share on other sites

Id say you probably not picking up the correct $Title anymore...

What's your code for getting that variable?

Also, try to save your old code as you go along. That way if you screw up down the road, you can always go back to the last working copy.

If you are too lazy to set up a proper CVS repository, just create folders named after dates in your Autoit folder.

Edited by Oldschool
Link to comment
Share on other sites

Hello Oldschool

What do you mean with correct $Title?

I read the title with my eyes from the appliocation and write it to the variable $strRedSysTitle in my script. After this I ask

If WinExists($strRedSysTitle) = True Then

If the right window doesn't exist I can show a messagebox with an error text.

I have try to take the title from the subwindow to get information about it but it doesn't function. On "Friday" I get the information over hidden text and on "Monday" it doesn't function. I admit that I made changes on "Monday" without test the functionality from "Friday". But I have restore my changes and it doesn't function.

What I wonder is:

With Au3Info.exe I have got the hidden text from the subwindow on "Friday". It includes e.g. the name from the selected file in a tree.

On monday I doesn't get with the same Au3Info.exe the hidden text. With Au3InfoA.exe I get the same behaviour.

I had never the idea to read hidden text but I saw these text on Au3Info.exe. I looked for the options in Au3Info.exe to find the checkbox to select hidden text but I doesn't found it.

What I wonder too is:

Why do I get the result value 0 in my script?

$i = Opt("WinDetectHiddenText", 1)
MsgBox(0, "I", $i)

I assume with my tests on "Friday" I have changed a parameter who I don't know to get the hidden text from our application.

On weekend I have made a shutdown and on "Monday" the PC doesn't remember my changes and I also. Isn' it?

Thank you Oldschool for help

Link to comment
Share on other sites

In your code you have:

$Line = WinGetText($Title)

Where is $Title defined?? I presume you have it defined somewhere above...something like

$Title = WinGetTitle("some window name")

paste your entire code

PS. $i cannot = Opt because Opt does not equal anything, it's just an Option FLAG

http://www.autoitscript.com/autoit3/docs/f...ItSetOption.htm

Edited by Oldschool
Link to comment
Share on other sites

PS. $i cannot = Opt because Opt does not equal anything, it's just an Option FLAG

http://www.autoitscript.com/autoit3/docs/f...ItSetOption.htm

Perhaps you could take your own advice and read that a little closer:

Return Value

Returns the value of the previous setting for the option.

That is a normal technique to change a Opt() while preserving the old value:

; Change mouse coord mode, saving the old value
$iMouseMode = Opt("MouseCoordMode", 2)

; ... do stuff

; Restore old mode
Opt("MouseCoordMode", $iMouseMode)

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Hello Oldschool,

hello PsaltyDS

the Window Title I set it directly in my script:

$strRedSysTitle = "Redaktionssystem"

If I read the title with

$strLine = WinGetTitle($strRedSystitle)
MsgBox(0, "T", $strLine)

I get the name "Redaktionssystem".

In my script I have inserted these two lines now.

Is it helpfull to post my script as extract for this case only?

In this case it runs of course with our application only.

But you can change the title then you should read a tree.

Thanks for the help

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...