Jump to content

Run a script


N1cE221
 Share

Recommended Posts

hello 

i have a little question ...how i can use/run this cod.. i became in every line an error, whats wrong ? 

  1. var autoItX3 = new AutoItX3();
  2. int Width = Screen.PrimaryScreen.Bounds.Width;// getting width of desktop
  3. int Height = Screen.PrimaryScreen.Bounds.Height; // getting height of desktop
  4. if (Keyboard.IsKeyDown(keyToHold)) // for example Keys.Alt
  5. {
  6. autoItX3.PixelSearch(Width / 2 - 20, Height / 2 , Width / 2 - 4, Height / 2 + 1, 13581886, variance); // variance - i usually use 45-60
  7. if (autoItX3.error != 1)
  8. {
  9. autoItX3.MouseClick("Left");
  10. autoItX3.Sleep(new Random().Next(1, 10));
  11. }
  12. if (Control.MouseButtons != MouseButtons.Right)
  13. {
  14. autoItX3.PixelSearch(Width / 2 - 25, Height - 125, Width, Height - 124, 15845740, 20); // for "no scope" with shotgun and etc.
  15. if (autoItX3.error != 1)
  16. {
  17. autoItX3.MouseClick("Left");
  18. autoItX3.Sleep(new Random().Next(1, 10));
  19. }
  20. }
  21. }
Link to comment
Share on other sites

  • Developers

Save it as *.au3? 
Well, the shown code isn't AutoIt3 syntax, so why do you expect it will work?

Jos

3 hours ago, N1cE221 said:

shotgun

.. and seeing this I assume you found it somewhere on a Game forum, so please read our forumrules on this topic as well.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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