Relisek

Beginner syntax error

2 posts in this topic

Hi there, im just starting my journey with autoit and till now i was doing good but cannot figure out where the error came from here's the code

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <nomad.au3>
#include <Timers.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 199, 213, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 40, 24, 121, 33)
$Input1 = GUICtrlCreateInput("Input1", 40, 64, 121, 21)
$Input2 = GUICtrlCreateInput("Input2", 40, 88, 121, 21)
$Button2 = GUICtrlCreateButton("Button2", 40, 120, 121, 33)
$Input3 = GUICtrlCreateInput("Input3", 40, 160, 121, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $Button1
            global $pid = ProcessExists("Nastarius.exe")
            $memaaa = _MemoryOpen($pid)
            _Timer_SetTimer($Form1,500,"spell")
        case $Button2
            $ff = GUICtrlRead($Input3)
            $ff *= 1000
            _Timer_SetTimer($Form1,$ff,"afk")
    EndSwitch
WEnd
func afk($1 $2 $3 $4)
    controlsend("Nastarius Client","","","(ctrldown)(down)(ctrlup)")
    controlsend("Nastarius Client","","","(ctrldown)(up)(ctrlup)")
    controlsend("Nastarius Client","","","(ctrldown)(left)(ctrlup)")
    controlsend("Nastarius Client","","","(ctrldown)(right)(ctrlup)")
EndFunc
func spell($1 $2 $3 $4)
    $kk = GUICtrlRead($Input2)
    $mem = _MemoryRead(0x033502C8,$memaaa)
    if $mem >= $kk Then
        controlsend("Nastarius Client","","",GUICtrlRead($Input1))
        controlsend("Nastarius Client","","","(enter)")
    EndIf
EndFunc

 

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

10 minutes ago, Relisek said:

where the error came from

Which error?

-skip that question-  as you seem to have missed our forumrules on your way in. Read them now please, especially the part about game automation. 

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.