Jump to content
Sign in to follow this  
Agent Orange

SendKey with a variable

Recommended Posts

Agent Orange

I'm trying to sendkey a variable to a window from information obtained from an inputbox earlier in code.

Example:

$path = InputBox("Document Path" , "Please Enter the document path and name you wish to open")

Run("C:\Program Files\Microsoft Office\Office10\winword.exe")

WinWaitActive("Document1 - Microsoft Word")

AutoItSetOption("SendKeyDelay", 400)

Send=($path)

I'm getting this error when running the script

Send=($path)

^ ERROR

Error: Error parsing function call.

Share this post


Link to post
Share on other sites
GaryFrost

I'm trying to sendkey a variable to a window from information obtained from an inputbox earlier in code.

Example:

$path = InputBox("Document Path" , "Please Enter the document path and name you wish to open")

Run("C:\Program Files\Microsoft Office\Office10\winword.exe")

WinWaitActive("Document1 - Microsoft Word")

AutoItSetOption("SendKeyDelay", 400)

Send=($path)

I'm getting this error when running the script

Send=($path)

^ ERROR

Error: Error parsing function call.

Should be

Send($path)

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
Jos

Should be

Send($path)
Thought you were posting DB jokes :) Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  

×