Jump to content

Recommended Posts

Posted

Hi Guys,

I am using 'Send' to pass a command-line parameter to a textbox, but the string loses characters, seemingly at random.

The string is a mixture of letters, numbers and spaces.

ControlFocus("TheWindow", "" , "[CLASS:Edit; INSTANCE:3]")
Send($CmdLine[1], 1)

I can view the string correctly in a messagebox, but the string, once 'sent' it is incomplete.

If I define the string within the autoit function and pass that, the string is always complete, it just doesn't seem to like passing command line variables.

I tried 'raw' option with no luck.

I have also tried setting a new variable in the function to the command line variable and then using that, but the result is the same.

suggestions please. ...

Posted

Have you tried different values on following options:

Opt("SendKeyDelay",...)

Opt("SendKeyDownDelay",...)

Opt("SendKeyDelay",...) alters the the length of the brief pause in between sent keystrokes.
Opt("SendKeyDownDelay",...) alters the length of time a key is held down before being released during a keystroke.
Set both "SendKeyDelay" and "SendKeyDownDelay" to 0 to remove all delays when sending keystrokes. This may be required under certain circumstances, for example, when locking the system ("#l") it may be necessary to remove the delays in order to prevent the WIN key from being stuck down.

This solved my problems with such insures...

Best solution will be not using send but GUICtrlSetData on Autoit Messageboxes or ControlSetText or ControlSend on others

Posted

Hi Devil,

Thanks for the reply and apologies ..... user error.

I put the application i am interacting with into an idle loop while the autoit script is processing. The loop included a periodic refresh of the display (required for a previous task).  That refresh was interrupting the 'paste' of the characters into the control.

Sorted now (though it did take me several hours to find the cause!!).

Many thanks.

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