Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#3269 closed Bug (No Bug)

ControlSend acts inconsistently

Reported by: zureks@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.14.0 Severity: None
Keywords: ControlSend Cc:

Description

This problem was already raised in:

https://www.autoitscript.com/trac/autoit/ticket/330

but no solution was given. The problem DEFINITELY exists still. My PC is Windows XP, SciTE-Lite Version 3.5.4.

The part of the responsible code is as follows:

============

Run ( "putty.exe -serial $COM1 -sessionlog log_COM1.txt -sercfg 115200,8,n,1,N", "", @SW_MINIMIZE)
WinWait( "COM1", "", 10)
$Putty_handle=WinGetHandle ( "COM1" )	
WinActivate ( $Putty_handle )
WinSetState ( $Putty_handle, "", @SW_MINIMIZE )
Send ("SOURce:CALIbrate:SERIalnumber?", $SEND_RAW) ; just to check Send command
Send ("{ENTER}", $SEND_DEFAULT)	
Sleep ( 1500 )
ControlSend ($Putty_handle, "", "", "SOURce:FILE:RESUlts:DEBUg:ENTEr", $SEND_RAW) ; just to use ControlSend
Send ("{ENTER}", $SEND_DEFAULT)

I have run the same code again and again (Go by F5 in SciTE). What I get is that when it works (as it should) the Putty window shows:

SOURce:CALIbrate:SERIalnumber?
SOURce:FILE:RESUlts:DEBUg:ENTEr

But when it doesn't work it comes as:

SOURce:CALIbrate:SERIalnumber?
source;file;results;debug;enter

Please note how the capital letters are changed to lower case, and all the colons to semicolons. This indicates that a "shift" was "pressed" somewhere, somehow?

I run this code repeatedly 32 times. On 4th execution doesn't work (comes back as "source;file;results;debug;enter"), 5th works, 6th doesn't, 7-10th does, 11th doesnt, 12-31st does, 32nd doesn't, and so on.

There is just no pattern to it. However, I discovered that if the Putty window is opened maximised (@SW_MAXIMIZE, and WinSetState commented out in the code above) then it works EVERY TIME (20 additional runs, no problem).

But as soon as the target window is minimised (@SW_MINIMIZE) or hidden (@SW_HIDE) the problem appears immediately (1st run after hiding, 2nd run after minimising).

Hope this information helps to track it down?

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by Melba23

  • Resolution set to No Bug
  • Status changed from new to closed

As explained in the ticket to which you linked, this is not the place to ask for support. please post in the forum.

M23

comment:2 Changed 4 years ago by anonymous

Are you serious? How is this "no bug"? Many people complain about the ControlSend erratic behaviour. This post just gave new information that the erratic behaviour does NOT happen on a maximized window. Why not use it to fix the bug which is clearly there?

I don't need any support for my case.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.