Jump to content

StringInStr help


Orgins
 Share

Recommended Posts

It gets to ''If StringInStr("lost", "lost") Then

Reload()'' It copys the text right I tested in notepad.

Their is No lost in the text but it does func reload? Instead of sleeping 1 sec.

I think it has to do with the substring but I can't seem to get it to work.

LifeMana()
StartFight()
TimerUps()
Attack()
MouseClick("left", 800,  450, 2)
Send("^a");select all
Sleep(1500) 
Send("^c");copy to clipboard
$text=ClipGet();set text to clipboard
If StringInStr("lost", "lost") Then
Reload()
Else
Sleep(1000)
EndIf
MouseClick("left", 800,  450, 2)
Send("^a");select all
Sleep(1500) 
Send("^c");copy to clipboard
$text=ClipGet();set text to clipboard
If StringInStr("Take", "Take") Then
Pick()
Else
Sleep(1000)
EndIf
MouseClick("left", 800,  450, 2)
Send("^a");select all
Sleep(1500) 
Send("^c");copy to clipboard
$text=ClipGet();set text to clipboard
If StringInStr("Disconnected", "Disconnected") Then
Reload()
Else
Sleep(1000)
EndIf

Any pointers would be nice.

Edited by Orgins

I'm a newbie.Sorry if I don't reposed to your replays very fast.

Link to comment
Share on other sites

the variable would be the string you are getting from the clip board

LifeMana()
StartFight()
TimerUps()
Attack()
MouseClick("left", 800,  450, 2)
Send("^a");select all
Sleep(1500)
Send("^c");copy to clipboard
If StringInStr(ClipGet(), "lost") Then
Reload()
Else
Sleep(1000)
EndIf
MouseClick("left", 800,  450, 2)
Send("^a");select all
Sleep(1500)
Send("^c");copy to clipboard
If StringInStr(ClipGet(), "Take") Then
Pick()
Else
Sleep(1000)
EndIf
MouseClick("left", 800,  450, 2)
Send("^a");select all
Sleep(1500)
Send("^c");copy to clipboard
If StringInStr(ClipGet(), "Disconnected") Then
Reload()
Else
Sleep(1000)
EndIf
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...