Jump to content
N1cE221

Run a script

Recommended Posts

N1cE221

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

Share this post


Link to post
Share on other sites
N1cE221

so i just put the code in the scite and then i save it and if i want to (run/convert to an .exe) it, then comes Line 5 ERROR {

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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

×