Jump to content
Sign in to follow this  
mcgill

send key problem with strings

Recommended Posts

mcgill

Send keys problem when sending a string with the send keys command, only sending one variable and not the entire string, anyone know why?

$ret = _GUICtrlListViewGetItemText ($listview1, -1, 0)

; Set the RunAs parameters to use local adminstrator account

$USERNAME = "********"

$PASSWORD = "********"

$DOMAIN = @LogonDomain

$RUN = 0 ; run indicator

; retrieve the cycle from commandline

If $CMDLINE[0] = 1 Then $RUN = $CMDLINE[1]

If $RUN = 0 Then

RunAsSet($USERNAME, $DOMAIN, $PASSWORD)

run("explorer.exe","", @SW_MAXIMIZE)

WinWaitActive("My Documents")

Send("!d")

$x = StringFormat("%s", $ret)

msgbox(0,"", $x)

Send("{"& $x & " ENTER}")

RunAsSet()

endif

Share this post


Link to post
Share on other sites
mcgill

I am trying to send the string $x with send keys. It is only showing one variable and not the entire string. A msgbox displays the entire string. How come?

Share this post


Link to post
Share on other sites
GaryFrost

I am trying to send the string $x with send keys. It is only showing one variable and not the entire string. A msgbox displays the entire string. How come?

Try:

Send($x & "{ENTER}")

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.