DjErase Posted March 2, 2011 Posted March 2, 2011 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.
PsaltyDS Posted March 2, 2011 Posted March 2, 2011 Examine the control with AU3Info.exe and post the contents of the "Summary" tab so we can look and the Class and attribute info. 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
DjErase Posted March 2, 2011 Author Posted March 2, 2011 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.
DjErase Posted March 3, 2011 Author Posted March 3, 2011 (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 March 3, 2011 by DjErase
Bowmore Posted March 3, 2011 Posted March 3, 2011 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
DjErase Posted March 6, 2011 Author Posted March 6, 2011 (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 March 6, 2011 by DjErase
DjErase Posted March 8, 2011 Author Posted March 8, 2011 I found the answer : It was the User Account Control settings that wasn't deactivated.
greytrader Posted May 5, 2011 Posted May 5, 2011 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now