Jump to content

Recommended Posts

Posted (edited)

Hello All, this is my first Post... Started today with AutoIT

I Have made a Script for an Online game (OGame).

It has to click on the Overview page on 2 spots (Mouseclick commands)

On the second spot, it has to copy the Overview page and search for a word to see if I being Attacked,

And if so, playing a Beep 10 times. (It's an sort of Alarm :) )

When I run the Script, the fisrt 2 actions work, but the Copy to Clipboard and Search dont... And I'm getting this Error:

$string = glipget()

$string = ^ERROR

Error: Unknown function name.

Here follows the code:

While 1

sleep(3000)

MouseClick("left",100,224)

sleep (2000)

MouseClick("left",728,265)

sleep (1000)

;Send("!C")

$string = glipget()

if stringinstr($string,"aanvallen") then beep($10)

Sleep(600000)

WEnd

What am I doing wrong??

srry for bad English btw

Edited by ClickIT
Posted

Ah, it was a typo ^^

Now I'm getting this Error...

if stringstr($"aanvallen") then beep ($10)

if stringstr($"aanvallen") then beep (^ ERROR

Error: Variable used without being declard.

I think that I still mis something.. Buts it's late overhere and I'm tired.

New day tomorrow

thnx anyway

Posted

Ah, it was a typo ^^

Now I'm getting this Error...

if stringstr($"aanvallen") then beep ($10)

if stringstr($"aanvallen") then beep (^ ERROR

Error: Variable used without being declard.

I think that I still mis something.. Buts it's late overhere and I'm tired.

New day tomorrow

thnx anyway

did u declare $10?...remove the $

btw...

Beep ( [ Frequency [, Duration ]] )

[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
Posted

Hi again.

Well I thougt that the Script was working like it should, and today I finaly got an Attack against me, but the Beep doesn't work...

Now my Question, Do I still have an bug in it?

While 1
sleep(3000)
MouseClick("left",97,188)
sleep (3000)
MouseClick("left",1007,365)
sleep (1000)
;Send("!C") 
$string = ClipGet()
if stringinstr($string,"aanvallen") then beep(1000,6000)
Sleep(600000)
WEnd

And if not... How does the PlaySound function work with this?

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
×
×
  • Create New...