Jump to content

Recommended Posts

Func EnterICD($code="92929", $returnVN=1)
   MCL(1706,758) ;Click level or service window
   Send("{"&$code&"}")
EndFunc

 

Hi I am using the following function. I would like this fuction to type in the variable $code into the box it clicks. However it will only send the first digit "9", nothing else. How can I get it to work. Thanks.

Link to post
Share on other sites

You want to send only the first number, soo you should use the StringLeft() function.

Func EnterICD($code="92929", $returnVN=1)
   MCL(1706,758) ;Click level or service window
   $code=StringLeft($code, 1) ;This function catch only the first number of the variable from the left side of the string
   Send( "{" & $code & "}" )
EndFunc

Try this script it must work fine.

Link to post
Share on other sites
  • Developers
4 minutes ago, DarkDragon said:

Try this script it must work fine.

No it will not, as stated, you need to remove the curly brackets to get the total string send in stead of just the first character. 
I think you are confused as to the reported problem.

Jos

Edited by Jos

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 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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...