Sign in to follow this  
Followers 0
Spiker

What do I start a Script with

13 posts in this topic

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

Share this post


Link to post
Share on other sites



post what you have.

To clairfy: You are trying to make a script run by mkaing a custom marco. Is this correct?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

send("d")

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

He wants a game, it sounds like. He wants something that will tell him "Lift!" and make him press a button. His english is odd, I am guessing here.

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

LOL, yes

So how long would it take to do what Icekirby1 is saying?

Edited by Spiker

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
Sign in to follow this  
Followers 0