Jump to content

Recommended Posts

Posted

Hi Everyone,

I need help. I made an autoit script long time ago on Windows XP and all was working well. It sends and retrieves values to Edit control without problems.

Now I upgraded to Windows 7 and the ControlSetText, doesn't work (only this function) and only with Tradestation. If I use notepad.exe and try to send text, all is working fine. I use the same version of Tradestation on both XP and W7. I try to upgrade Tradestation on the Win7 computer but ControlSetText doesn't work (the function return a 0, I also try ControlFocus before but it's the same).

How can I debug this ?

Thanks and sorry for my English.

Posted

Examine the control with AU3Info.exe and post the contents of the "Summary" tab so we can look and the Class and attribute info.

:)

Very thanks but I cannot access the computer at this time, I'll send it tomorrow.

Regards.

Posted (edited)

>>>> Window <<<<

Title: TradeStation 8.8 - Desktop #1 - Janv 2011

Class: ORPLAT.EXE TRADESTATION

Position: 139, 16

Size: 1327, 689

Style: 0x14CF8000

ExStyle: 0x00000110

Handle: 0x00050206

>>>> Control <<<<

Class: Edit

Instance: 13

ClassnameNN: Edit13

Name:

Advanced (Class): [CLASS:Edit; INSTANCE:13]

ID: 1156

Text:

Position: 172, 48

Size: 52, 23

ControlClick Coords: 31, 11

Style: 0x50012080

ExStyle: 0x00000204

Handle: 0x00010428

>>>> Mouse <<<<

Position: 350, 125

Cursor ID: 13

Color: 0xFFFFFF

Edited by DjErase
Posted

That edit control appears to have the readonly bits set.

Can you manually enter a value in the control?

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

Posted (edited)

That edit control appears to have the readonly bits set.

Can you manually enter a value in the control?

Hello,

Yes, I can manually write in this edit box. And this "phenomena" appears only in Win7.

Where can you see that the control is in read only mode ?

I found a peace of code to force the read only bit:

#Include <GuiEdit.au3>
opt("WinTitleMatchMode",2)
Run("Notepad") 
$hWnd = ControlGetHandle("Notepad","","Edit1")
msgbox(0,"","Setting Notepads Edit control to read only")
_GUICtrlEdit_SetReadOnly($hWnd, True)
Sleep(5000)
msgbox(0,"","Setting back to normal")
_GUICtrlEdit_SetReadOnly($hWnd, False)

Regards.

Edited by DjErase
  • 1 month later...
Posted

I found the answer : It was the User Account Control settings that wasn't deactivated.

What do you mean by User Account Control settings ?

I am having the same problem, can you post your code ?

Thanks

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
  • Recently Browsing   0 members

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