Jump to content

ControlSend acts weird


Recommended Posts

Hi everybody,

I have a weird problem. I am getting data from a field in one program (JTAlert) with ControlGetText (which works fine) and want to send it to another program with ControlSend (Log4OM). 8~9 times out of 10 it works but sometimes the ControlSend is sending the "SHIFTVALUE" from the number keys to the second program. By that I mean instead of numbers 3,4 or 9 it sends #,$,( It behaves as if it pushes the shift key and instead of sending a number it sends the "shifted" key.

Both programs are used by HAM operators for digital modes. HAM's have callsigns made out of letters and numbers. Mine for example is KF5WGB. Sometimes my little script sends KF%WGB which of course is wrong.  How can I make the script stop to send the "shifted" values of the number keys. The MSGBOX is only in there for me to see what was pulled from JTAlerts textfield and that is always right. No &,@,$,%,# just numbers.

On more thing. For now I use a timer set to 10000. Is there a way to make the script aware of a mouse click in the first program (JTAlertand only do its thing when the mouse is clicked??

Thanks for any advice.


KF5WGB ~ Ralf

include <MsgBoxConstants.au3>
Local $CS, $CSmem

While 1

if $CS <> $CSmem then

Func GetCS()
   Local $sText = ControlGetText("JTAlert", "", "Static72") ;Getting text from datafield -program JTAlert
   MsgBox (0,"Callsign", $sText,1) ;what is in the datafield? For some reason $sText is always correct in here(for testing)
      $CS = $sText
   Return $CS


WinActivate("Log4OM [User") ; bring window in focus - program Log4OM
ControlSend("Log4OM", "", "[CLASS:WindowsForms10.EDIT.app.0.338574f_r13_ad1; INSTANCE:3]", "{CTRLDOWN}a{CTRLUP}{SHIFTUP}") ; clear field in second application
ControlSend("Log4OM", "", "[CLASS:WindowsForms10.EDIT.app.0.338574f_r13_ad1; INSTANCE:3]", $CS) ; send data from first application. Sometimes send the "SHIFT" value
$CSmem = $CS 



Link to comment
Share on other sites

_ispressed can detect the click. As for the behaviour of the ctrlsend.. idk


Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples


Link to comment
Share on other sites

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...