Jump to content
Ben17

Using clipget and stringinstr to react to numbers in text?

Recommended Posts

Ben17

I'm having trouble with my script recognizing numbers in text. I think its probably a case of simply using the wrong command, but I've searched and either can't find the right one, or I'm using it incorrectly.

I'm hoping someone can point me in the right direction.

 

This works fine:

MouseClickDrag("left", 66, 175, 270, 259)
Sleep (200)
Send ("^c")
Sleep (200)
$Text=ClipGet()
if StringInStr($Text,"hello") Then ;(do certain task)
   if StringInStr($Text,"goodbye") Then ;(do different task)

 

This doesn't seem to work at all:

MouseClickDrag("left", 66, 175, 270, 259)
Sleep (200)
Send ("^c")
Sleep (200)
$Text=ClipGet()
if StringInStr($Text,"1") Then ;(do certain task)
   if StringInStr($Text,"2") Then ;(do different task)

 

Can anyone show me what I'm doing wrong? I'm hoping its an easy fix.

Share this post


Link to post
Share on other sites
Ben17

All sorted. An error I'd made elsewhere. Need to delete this.

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

×