Jump to content

SendKey with a variable


Recommended Posts

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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

  • Developers

Should be

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...