Jump to content

What do I start a Script with


Recommended Posts

I am making a Script for a macro...and whenever I try to run it, it has a bunch of errors. If this due to not adding something to the front of the script in order to run it, becuase im using a simple 1 line script. thanks

Link to comment
Share on other sites

Ok,Yes to the macro thiny, and dont flame me if I suck at scripting I just started like 2 hours ago. Here is my code, lol...

ControlSetText ( "Graal", "Lift", controlID, "d" )
Edited by Spiker
Link to comment
Share on other sites

dont flame me if I suck at scripting I just started like 2 hours ago

No flames about, I'm just brutally blunt somtimes (personality feature, nothing to take personally).

That being said-

Marcos are predefined in autoit. you may be wanting to define your own fucntion which is fine but mostly unessascry-

CustomFunc()

;any additional calls can be made with 'CustomFunc()' also.

Func CustomFunc()
    ControlSetText ( "Graal", "Lift", controlID, "d" )
EndFunc
Edited by evilertoaster
Link to comment
Share on other sites

Ok,Yes to the macro thiny, and dont flame me if I suck at scripting I just started like 2 hours ago. Here is my code, lol...

ControlSetText ( "Graal", "Lift", controlID, "d" )
Welcome to AutoIT! :whistle:

Ok, based on your line of code using ControlSetText():

The title of the window is "Graal".

The window contains the visible (to AutoIT) text string "Lift".

Your ControlID is just wrong...

The text you want to set to the control is "d".

For a ControlID you need the numeric ControlID number, or the name of the control (i.e. "Edit1"), etc. See the help file on Controls.

I don't get what this is a macro for, but that should move the ball forward.

:)

P.S. I was posting when this popped up:

Accually, I am trying to make something that when the screen says 'Lift' it press the d button, got any idea's on that?

Send("d") was probably more what you wanted than ControlSetText() then.

:)

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

I dont understand you, I am kinda in need of an accual script, I have a program that says 'Lift!' and when it says that, I have to press the D button. But the problem is that I dont really know when it is going to start saying 'Lift!' so I need something to press D when the screen says it. I am looking for a code to go off of right now, I can learn with a example. Either of you have AIM, Yahoo, or MSN Messanger?

EDIT FOR POST ABOVE: But I dont know what to put before or after that in order to make it work. I am the newest kind of scripter you can find. I hack computer games, but nothing like this.....

Edited by Spiker
Link to comment
Share on other sites

I dont understand you, I am kinda in need of an accual script, I have a program that says 'Lift!' and when it says that, I have to press the D button. But the problem is that I dont really know when it is going to start saying 'Lift!' so I need something to press D when the screen says it. I am looking for a code to go off of right now, I can learn with a example. Either of you have AIM, Yahoo, or MSN Messanger?

EDIT FOR POST ABOVE: But I dont know what to put before or after that in order to make it work. I am the newest kind of scripter you can find. I hack computer games, but nothing like this.....

If you want to post some specs and have someone write it for you... :whistle: Google for RentACoder. :)

If you want to learn AutoIT, great! :)

Download both the Production (stable) and latest Beta versions of AutoIT. Make your life MUCH easier by downloading and using the SciTE editor with it. Run the tutorial in the help file for basic "Helo, world." stuff and then do the tutorial linked in my Sig from Valuater.

As for your current issue, you want a While/Wend loop that continuously looks for that message to pop up and then does Send(). Look them up in the help file and run the examples to see how they work. Then you'll be able to code a short script (about 6 lines) to do what you want.

:lmao:

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

It entirely depends on how it says lift.

If it's a computer game ran ran as an application you have two options

1. Pixel detection of when the 'lift' appears.

2. OCR. Seach the forums, it is basically the advanced version of option 1

unfortuatly these are HUGE works (OCR especially). I doubt anyone will code one for you. Look up the pixel functions in the help file for a start. But if you just begun scripting you have a LONG way to go.

Link to comment
Share on other sites

Have you tested this theory ((lol?)) Ok, i guess, but when I downloaded the SCiTE editor, I opened it up in winrar and it just came with a bunch load of files

Well, if somebody would make a script for me with that into it. It would be AWESOME. I am a learner and need some examples....Thats why im here

Edited by Spiker
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...