Jump to content

Why doesn't this work?


 Share

Recommended Posts

Why doesn't this work?

Run("Diablo II.exe","C:\Program Files\Diablo II\Diablo II.exe", @SW_MINIMIZE)

Posted Image

I'm really new.. I started looking at autoit along time ago.. and I've taken computer classes at my school and votech and a career center I don't have many interests but I have been interested and around computers for the last 7-8 years.. Now i'm a senior in highschool so I guess i'm supposed to know what i'm going to do with my life and I thought I'd take a shot at programming but I'm afraid i'll fail.. there's thousands of people that want to learn to program and soooo many posts in so many diff places like "What's the easiest programming language to learn" or stuff like that.. I've looked at tutorials for about everything and Autoit seems like the most understandable thing to set me in that direction if any of what i've said makes sense lol I looked at autoit along time ago and did the tutorials and looked at help file but never understood autoit 1-2-3.. and i made a little program that wrote a batch file to show the matrix effect haha

Now I want to give autoit another try.. alot of tutorials say make a goal for urself or keep in mind something u want to shoot for.. so I think i'm going to try at making a Den of Evil bot for Diablo 2.. for learning purposes.. I have no idea on how I would get the pathing down ;) But look at me having a hard time even with the first line lol If anyone would like to help me get started and maybe help me more in the future PM me or something :) Thanks, All help appreciated

Link to comment
Share on other sites

Thanks alot guys :) yayyyy and I figured out how to minimize it too.. @SW_SHOWMINIMIZED and @SW_SHOWMINNOACTIVE didn't work.. or maybe i read it wrong

Run("C:\Program Files\Diablo II\Diablo II.exe -w","C:\Program Files\Diablo II")

Ok.. now how do I put the window in the top left and make it click in the window to get to the selection screen? and how would i make it click on single player or battle.net? pixelsearch?

Edited by Canasian
Link to comment
Share on other sites

WinMove()

and I would use MoustClick() for the second part

Tyvm hmm.. This is what i've got.. but the prob now is that it won't activate the window sometimes for some reason.. any ideas?

Run("C:\Program Files\Diablo II\Diablo II.exe -w","C:\Program Files\Diablo II")
WinWaitActive("Diablo II")
WinMove("Diablo II", "",0,0)
MouseClick("left",115,110)
MouseClick("left",375,375)
Link to comment
Share on other sites

Tyvm hmm.. This is what i've got.. but the prob now is that it won't activate the window sometimes for some reason.. any ideas?

Run("C:\Program Files\Diablo II\Diablo II.exe -w","C:\Program Files\Diablo II")
WinWaitActive("Diablo II")
WinMove("Diablo II", "",0,0)
MouseClick("left",115,110)
MouseClick("left",375,375)
When you say sometimes do you mean that sometimes it is working? If that is the case then I'm not sure what the problem is. However, if it doesn't work at all I would suggest making sure you have the name right.
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Canasian.. You asked the "easiest" way to learn programming. There is no 'easest' but there are some good ways to start. Take it from one who has been progamming over 30 years .. it can be seriously exciting.not to mention lucrative. Most programming languages are alike..same basic concepts.. same basic flaws.. same basic commands/controls. After you've learned 20 or 30 the rest are east ! The trick is the base logic behind it all.. that is.. what the devil do you want the program to do.. and is it the right language in which to do it... Microsoft has blurred the lines between their office products so much you can't tell a database from a word doc.. sadly, they have diluted the capabiities and the brains of people who (mis)use them.

I do't know what languages you know but the best place to start with programming is at the beginning. Take a look at BASIC and FORTRAN. There are those who are reading this and saying 1) what are they or 2) they are archaic and useless or 3) unusable.. WRONG on 2 out of 3 ! They wer some of the first language used in business and education.. They are simple, elegant, an teach excellent programming technique and logic.. BOTH are necessary to excel in the art of programming. (FORTRAN probably still has the largest installed base in business next to COBOL)

Different languages have differnt strengths. Sometimes a DOS bat/cmd file is plain and simple the right way to do something - sometimes you need a tool like AUTOIT or PERL or C++. If you don't know the strengthes and weaknesses then you may faiol to recognize a simple elegant solution and end up prgammig yourself to death over nothing. The infamous.. "IF the only tool you have is a hammer... every problem is a nail"

More important than the programming.. is the design of the solution.. Take a look at any book on flowcharting.. You start with an idea.. and lay out the flow in English or Pseudo-Code (looks like code but it's just structured English). Start simple. Then add depth / flesh to what you've written make it look more like programming.. Decide the best tool .. and start PENCIL coding it in that language. (that means write it out on paper - .. see if it makes sense).

You'll do less work, enjoy it more, get done faster, and your programs will have a longer lifespan. For what it's worth.. I have software running today - everyday - 24 hours a day- that was writen around 1982-1985.. It still runs today.. untouched..flawlessly.. with no maintenance required.. Oh and with thousands of users using it in a shared environment. I hope you can say that in 2027 !!

Some will laugh at the idea of Fortan and Basic.. but they are not much different than PERL or HTML.. just orders of magnitude easier to do the same thing.

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...