Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Excel Control Send

$
0
0
I'm trying to send an Esc command to my excel file whenever my GUI gains focus in order to make sure it doesn't have a cell being edited. Or if anyone has a better way of doing this. I want my script to take priority so it completes it read or write.

Based off the Notepad example I thought this should work.

$TitleSend = "Microsoft Excel - " & $File_Name			 ; Filename=ExcelName_2_14_2013
ControlSend ("[XLMAIN]","","[CLASSNN:Excel7]",{esc});

ControlSend("[CLASS:Notepad]", "", "Edit1", "This is a line of text in the notepad window")




Window info
>>>> Window <<<<
Title: Microsoft Excel - ExcelName_2_14_2013
Class: XLMAIN
Position: -9, -9
Size: 1938, 1050
Style: 0x15CF0000
ExStyle: 0x00000110
Handle: 0x005F06BC
>>>> Control <<<<
Class: EXCEL7
Instance: 1
ClassnameNN: EXCEL71
Name:
Advanced (Class): [CLASS:EXCEL7; INSTANCE:1]
ID:
Text: ExcelName_2_14_2013
Position: -11, 139
Size: 1938, 886
ControlClick Coords: 401, 504
Style: 0x56CF0000
ExStyle: 0x00000300
Handle: 0x00040B8E
>>>> Mouse <<<<
Position: 390, 634
Cursor ID: 0
Color: 0xFFFFFF
>>>> StatusBar <<<<
>>>> ToolsBar <<<<
>>>> Visible Text <<<<
Status Bar
Status Bar
Ribbon
Ribbon
ExcelName_2_14_2013
Vertical
Horizontal

>>>> Hidden Text <<<<
Vertical
MsoWorkPane

Viewing all articles
Browse latest Browse all 12506

Trending Articles