I'm running Adobe Reader 10.1.5 on Windows 7 64 bit german version. AutoIt is 3.3.8.1 and 3.3.9.4.
When I try to extract the currently selected printer from the combobox I always get the first 4 correct characters (the correct result has about 20 characters). Sometimes the returned string is longer but contains garbage from character 5 onwards.
Examples (text in [] is a single control character display with black background):
\\EG[DC1][GS][STX]
\\EGainThreadWndClass
I open a PDF file and then run the following test script:
I ran the script as 32 and 64 from SciTE and compiled with/without UPX. Tried several PDF documents, restarted the computer but always get the same result.
Does anyone know what's going on?
The final goal is not to query the current selection but to set a new printer.
Edit: The AutoIt Window Info Tools result for the ComboBox:
>>>> Control <<<<
Class: ComboBox
Instance: 1
ClassnameNN: ComboBox1
Name:
Advanced (Class): [CLASS:ComboBox; INSTANCE:1]
ID:
Text:
Position: 69, 15
Size: 250, 24
ControlClick Coords: 162, 12
Style: 0x56000413
ExStyle: 0x00000000
Handle: 0x0000000000020B20
When I try to extract the currently selected printer from the combobox I always get the first 4 correct characters (the correct result has about 20 characters). Sometimes the returned string is longer but contains garbage from character 5 onwards.
Examples (text in [] is a single control character display with black background):
\\EG[DC1][GS][STX]
\\EGainThreadWndClass
I open a PDF file and then run the following test script:
[ autoit ]
#AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_UseX64=n $sAdobeWindow = "Adobe Reader" ; <== Window title for the PDF document $sPrintDialog = "Drucken" ; <== Window title for the print dialog AutoItSetOption("WinTitleMatchMode", 2) ConsoleWrite("1: " & @error & @LF) $Result = WinActivate($sAdobeWindow) ConsoleWrite("2: " & $Result & @LF) $Result = Send("^p") ConsoleWrite("3: " & @error & @LF) $Result = WinWait($sPrintDialog, "") ConsoleWrite("4: " & $Result & @LF) $Result = WinActivate($sPrintDialog, "") ConsoleWrite("5: " & $Result & @LF) $Result = ControlCommand($sPrintDialog, "", "[CLASS:ComboBox; INSTANCE:1]", "GetCurrentSelection", "") ConsoleWrite("6: " & $Result & "-" & @error & "-" & StringLen($Result) & @LF)
Does anyone know what's going on?
The final goal is not to query the current selection but to set a new printer.
Edit: The AutoIt Window Info Tools result for the ComboBox:
>>>> Control <<<<
Class: ComboBox
Instance: 1
ClassnameNN: ComboBox1
Name:
Advanced (Class): [CLASS:ComboBox; INSTANCE:1]
ID:
Text:
Position: 69, 15
Size: 250, 24
ControlClick Coords: 162, 12
Style: 0x56000413
ExStyle: 0x00000000
Handle: 0x0000000000020B20