Sign in to follow this  
Followers 0
Paulie

Support Forum FAQ : discussion

22 posts in this topic

#1 ·  Posted (edited)

Q: How do I create a bot that searches for and clicks on a specific colored pixel

A: Though this is basic, it does work.

;---------------Warning!-------------------
;This script is very basic and if it is used as a cheat or hack, it could be detcted/blocked by in-game
;anti-hack protection such as GameGaurd or Warden. Neither It's author, or any support provided are
;responsible in any way for you being detected, warned, banned, or punished in any other way for its use.
;You Have Been Warned.
;-------------Read The Above---------------
$Color = "0xFF0000" ;The Hexadecimal Value Of The Color To Seach For.
While 1; Initiate A never ending loop
    $Pos = PixelSearch(0+5, 0+5, @DesktopWidth-5, @DesktopHeight-5, $Color, 10, 1);Calls PixelSearch Function
    If IsArray($Pos) Then ;Validates whether or not the search Turned Up a result
        MouseClick("Left", $Pos[0], $Pos[1], 1, 0); Moves the Mouse To the Coordinates Of the Pixel and Left Clicks
    EndIf
WEnd
Edited by Paulie

Share this post


Link to post
Share on other sites



Hi,

I tried using this example:

#include <Misc.au3>
If _Singleton("MyScriptName", 1) Then
   ; We know the script is already running. Let the user know.
    MsgBox(0, "Script Name", "This script is already running. Using multiple copies of this script at the same breaks the [(UltimaCoder)] License!")
    Exit
Endif

In my script and the program exited immediately (i.e. not possible to have a second instance running because the first instance exits immediately).

I then had a look at the helpfile, and in the example it has:

#include <Misc.au3>
If _Singleton("MyScriptName", 1) = 0 Then
   ; We know the script is already running. Let the user know.
    MsgBox(0, "Script Name", "This script is already running. Using multiple copies of this script at the same breaks the [(UltimaCoder)] License!")
    Exit
Endif

Which did work for me.

You might want to run a test to confirm this. Apart from that I think this FAQ is a great idea and has some really useful tips.

VW

Share this post


Link to post
Share on other sites

Q11. How can I make my script start every time windows starts?

You might want to mention that the code may need to be run once manually http://www.autoitscript.com/forum/index.ph...st&p=262510

Great idea, this version of the FAQ.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hi there, it's been quite a long time!

Hi,

I tried using this example:

(...)
If _Singleton("MyScriptName", 1) Then
(...)

In my script and the program exited immediately (i.e. not possible to have a second instance running because the first instance exits immediately).

I then had a look at the helpfile, and in the example it has:

(...)
If _Singleton("MyScriptName", 1) = 0 Then
(...)

Which did work for me.

You might want to run a test to confirm this.

(...)

VW

Actually it seems that the function returns '0' when there IS another instance of the script, which would cause, in the first example, an 'If 0', that is, it skips the whole 'If'...

So I guess this should be corrected in the opening post.

Also let me suggest the following:

- What is being done now is creation of general FAQ topics within the Support Forum.

- What I suggest is creation of a new forum (like the Support one or linked by it) with FAQs or Troubleshooting topics for each and every category (Environment, File & Directory, Graphic and Sound and so on...). This would be particulary useful for the UDF ones... :whistle:

What do you think?

FS

EDIT: trying to explain myself ;)

Edited by footswitch

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Q. Is there any training or other documentation available for AutoIt V3?

A. Several members of the forum have put together helpful documents as well as training tools. This information is far from complete, but most find it very helpful.

AutoIt testing - What do you know? By Vollyman

Welcome to AutoIt 1-2-3, Class... is now in Session By Valuater

Learning to Script with AutoIt 3, My attempt at a tutorial By LxP

Edited by vollyman

Share this post


Link to post
Share on other sites

@All, I have been gone for a while, and am only now beginning to add the necessary changes.

@Paulie, I do not see a real need for the bot script (seems like it is not asked that often), but I have added the info from your second post.

@Larry, I have added your suggestion.

@vollyman, I intend to add your suggestion later.


Who else would I be?

Share this post


Link to post
Share on other sites

Some info about RunAsSet might be worth including.

Share this post


Link to post
Share on other sites

Q. How Can I make my script start on startup?

A. put this at the top of your script:

If Not FileExists (@StartupDir&"\"&StringReplace(@ScriptName,".au3","")&".lnk") Then FileCreateShortcut (@ScriptFullPath, @StartupDir&"\"&StringReplace(@ScriptName,".au3","")&".lnk")

It's just one line, but after running your script once manually, it will always start on startup on the computer that it was run on.


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Q. How Can I make my script start on startup?

A. put this at the top of your script:

If Not FileExists (@StartupDir&"\"&StringReplace(@ScriptName,".au3","")&".lnk") Then FileCreateShortcut (@ScriptFullPath, @StartupDir&"\"&StringReplace(@ScriptName,".au3","")&".lnk")

It's just one line, but after running your script once manually, it will always start on startup on the computer that it was run on.

If you're going to post stuff, make sure it doesn't suck. First of all, that code makes the assumption that a non-compiled script is set to "Run" by default. On my system, the code would open SciTE since "Edit" is my default. Second, the code assumes the script is not compiled. You don't adjust the name if it's a compiled executable. Edited by Valik

Share this post


Link to post
Share on other sites

@this-is-me

I split the post into 2 threads so the Larry remark can be true.

May I suggest You edit your awsome FAQ starting with the list of all Questions, so at a glance we can know which subjects are covered.

You can also put in front the Larry remark with the link to the discussion thread.

Nice Job ;)

Share this post


Link to post
Share on other sites

Q15. How can I get the screen resolution in multiple monitor setups?

I just posted a script that will get more detailed position/resolution/workspace information.

Share this post


Link to post
Share on other sites

Btw, I think it might be nice if we combined this FAQ with Jon's... it's a bit of a hassle and a little confusing to have two faq's stickied right next to eachother.

@This-is-me: not sure if you're super busy or what, but I'd certainly be willing to help in editing and adding faq entries! Not sure if that would be possible, but I thought I'd throw it out there.

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

This is more information on a question that is already in the list...

Question: Why am I not getting a response to my post?

Answer:

1. Are you attempting to hack, or are using stolen software? Did you say you were doing this in your post?

- Using stolen software, or hacking it so you can "Unlock" it, is just wrong. By doing this, you are basically saying you are perfectly willing to steal someone's hard work instead of either paying for it, or making your own. We have spent many hours, days, and in some cases years writing programs. And you want to steal it for you like being a thief. Shame on you. :)

Edited by Volly

Share this post


Link to post
Share on other sites

Maybe add somthing about decompiling scripts without a passphrase/cracked decompilers and that whole business.

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

i use these a lot

; exit script quickly

HotKeySet("{ESC}", "_Exit")

Func _Exit()
    Exit
EndFuncoÝ÷ Ù«­¢+ØìÕ()Õ¹ ÀÌØíµÍ¤(%
½¹Í½±]É¥Ñ ÀÌØíµÍµÀì
I1¤(%±±
±° ÅÕ½Ðí­É¹°Ìȹ±°ÅÕ½Ðì°ÅÕ½Ðí¹½¹ÅÕ½Ðì°ÅÕ½Ðí=ÕÑÁÕÑÕMÑÉ¥¹ÅÕ½Ðì°ÅÕ½ÐíÍÑÈÅÕ½Ðì°ÀÌØíµÍ¤)¹Õ¹

Posted ImageDownload DebugView (301 KB)

Edited by user52

Share this post


Link to post
Share on other sites

#17 ·  Posted

This is more information on a question that is already in the list...

Question: Why am I not getting a response to my post?

Answer:

1. Are you attempting to hack, or are using stolen software? Did you say you were doing this in your post?

Ha! I see a lot of responses to people who are creating hacks or enhancing stolen software!

The most common reason why people don't reply is because they don't know, or the answer is extremely obvious, like in the site tutorial, or you made a joke that wasn't funny.

Share this post


Link to post
Share on other sites

#18 ·  Posted

Last Seen: 27th November 2006 - 06:04 AM

Where is he? Isn't he supposed to maintain that support forum FAQ? :)

i542


I can do signature me.

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

i use these a lot

; exit script quickly

HotKeySet("{ESC}", "_Exit")

Func _Exit()
    Exit
EndFuncoÝ÷ Ûú®¢×¢ºò¶î®Ër¢êÛ¹¶åy»­ë-ºÇºÚ"µÍÜ
    ][ÝÑÕRPÛÜÙSÛØÉ][ÝËJ
Edited by sandman

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites

Sorry to burst your bubble... but just use:

Opt("GUICloseOnEsc", 1)
but that assumes it is a GUI script

[size="1"][font="Arial"].[u].[/u][/font][/size]

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