Jump to content

Newb to this. (felix N.)


King
 Share

Recommended Posts

I forgot to add somthing in there i am sorry. I want it to do this every 60 seconds. I want it to preform that every 60 seconds i should say. Also how do i find the cords? Is there an easy way to do that? Like i said i am no good at this but i would liek to learn.

Send("{w down}");presses the W button and holds it
Sleep(7000);waits for 7000 milliseconds/7 sec
Send("{w up}");releases W button
MouseClick("left",123,234);leftclicks at the coordinates x=123,y=234
Link to comment
Share on other sites

maybe like this

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused, $t
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("{F8}", "Showme")  

;;;; Body of program would go here;;;;
While 1
    If $t = 1 Then
        Send("{w down}");presses the W button and holds it
        Sleep(7000);waits for 7000 milliseconds/7 sec
        Send("{w up}");releases W button
        MouseClick("left",123,234);leftclicks at the coordinates x=123,y=234
        Sleep(60 * 1000)
    EndIf
    Sleep(10)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func Showme()
    If $t = 0 Then
        $t = 1
        Return
    EndIf
    If $t = 1 Then
        $t = 0
        Return
    EndIf
EndFunc

8)

NEWHeader1.png

Link to comment
Share on other sites

maybe like this

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused, $t
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("{F8}", "Showme")  

;;;; Body of program would go here;;;;
While 1
    If $t = 1 Then
        Send("{w down}");presses the W button and holds it
        Sleep(7000);waits for 7000 milliseconds/7 sec
        Send("{w up}");releases W button
        MouseClick("left",123,234);leftclicks at the coordinates x=123,y=234
        Sleep(60 * 1000)
    EndIf
    Sleep(10)
WEnd
;;;;;;;;

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func Showme()
    If $t = 0 Then
        $t = 1
        Return
    EndIf
    If $t = 1 Then
        $t = 0
        Return
    EndIf
EndFunc

8)

How do i find out the mouse location???
Link to comment
Share on other sites

Like this

; Press Esc to terminate script, F9 to show mouse position

HotKeySet("{ESC}", "Terminate")
HotKeySet("{F9}", "Showme")  

;;;; Body of program would go here;;;;
While 1
    
    Sleep(10)
WEnd
;;;;;;;;

Func Terminate()
    Exit 0
EndFunc

Func Showme()
    $pos = MouseGetPos()
MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1])

EndFunc

this is relative to the entire screen... use

Opt("MouseCoordMode", 1)      ;1=absolute, 0=relative, 2=client

for screen, active window or client area

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

the help file is AWESOME..... most of the scripts above are written in the help files.....

the first one i looked up "pause"

the second one i looked up "mouse"

help has very good demo's at the bottom of each page

on your computer press the following

Start > All Programs > Autoit v3 > Autoit Help File

when that loads then press the "search" tab

then type in "?your search?" and press "List Topics"

**** you can do this with any word you want

thats what i do all the time

8)

NEWHeader1.png

Link to comment
Share on other sites

I would say the easiest way to get the mouse coordinates is the tool "AutoIt Window Info"!

You can find it in the start menu under the AutoIt category. It shows all kinds of information that you might need for writing a script.

Felix N.

Ok i have the program on this CPU but there is no Autoit in the start menu. I have downloaded the latest V3.

If i was lost (which... you can tell B) ) whats the name of the exe i need to find. Or is there a different program i need to dl?

Link to comment
Share on other sites

no the info tool is in the standart autoit installation. You probably clicked "no start menu entry" but thats fine.

The file is called AU3Info.exe and is in your main autoit folder.

[Edit] Oh man, ijust found out that the info tool isn't included in the newest beta version, but here it is:

http://www.autoitscript.com/fileman/users/tdlrali/AU3Info.exe

AU3Info.exe is not my program, I just uploaded it because I was kind enough to help King get started on writing autoit scripts!

HF

Felix N. (tdlrali)

Edited by Felix N.
Link to comment
Share on other sites

no the info tool is in the standart autoit installation. You probably clicked "no start menu entry" but thats fine.

The file is called AU3Info.exe and is in your main autoit folder.

[Edit] Oh man, ijust found out that the info tool isn't included in the newest beta version, but here it is:

http://www.autoitscript.com/fileman/users/tdlrali/AU3Info.exe

HF

Felix N. (tdlrali)

I see your shortcut points to http://www.autoitscript.com/fileman/users/tdlrali/AU3Info.exe

Is this the official release site where future updates will be found?

Link to comment
Share on other sites

no, that is just my fileman account.

Autoit has the fileman website where you can store scripts and autoit related stuff! Really great since you can only have 1mb as attachments, i just store everything else in the fileman...

Go here: http://www.autoitscript.com/fileman/index.php?act=list

You can create a new folder and put your stuff there or create an account. If you create an account, nobody (except jon i think^^) can delete your stuff, but they can still access it. I created an account so i have my stuff stored here: http://www.autoitscript.com/fileman/users/tdlrali/

AU3Info.exe is not my program, I just uploaded it because I was kind enough to help King get started on writing autoit scripts!

You see?

Felix N. (tdlrali)

Edited by Felix N.
Link to comment
Share on other sites

no, that is just my fileman account.

Autoit has the fileman website where you can store scripts and autoit related stuff! Really great since you can only have 1mb as attachments, i just store everything else in the fileman...

Go here: http://www.autoitscript.com/fileman/index.php?act=list

You can create a new folder and put your stuff there or create an account. If you create an account, nobody (except jon i think^^) can delete your stuff, but they can still access it. I created an account so i have my stuff stored here: http://www.autoitscript.com/fileman/users/tdlrali/

You see?

Felix N. (tdlrali)

Um, I have a problem with somebody taking another's work and calling it their own, or implying they contributed to the work. My copy of Au3Info.exe has a Larry Keys showing in the copyright notice, and the software is distributed as part of the standard software release of AutoIT - hence my questioning why you should see the necessity of keeping a separate copy in your web forum folder and risk having people download and use it if it is later superseded and re-released as part of a new standard distribution.

See where I'm coming from? B)

Link to comment
Share on other sites

Hey i never said its mine, buddy! People like you really ruin my day!

I just uploaded it to my files because i was kind enough to help somebody out! If you're not that type of person and just care about yourself (egoist), than please don't be a pain in my neck!

If you have any problems with that, than just tell me what your problem is per PM!

But ok, just for you:

AU3Info.exe is not my program, I just uploaded it because I was kind enough to help King get started on writing autoit scripts!

Happy now?

Felix N.

Link to comment
Share on other sites

Sigh.

The main problem is that eventually the tool will be updated and people may download an outdated version because they chanced upon this thread and clicked your link.

It's not a huge problem though -- all that you need to do is delete the file and get rid of the link. Problem solved and everyone will be happy (including King who will have the utility by now). Your actions were admirable and I encourage helping newcomers as much as reasonably possible, but next time it would be better just to PM things like this to them.

P.S. Don't let your day be ruined by other people. 99% of the time people don't intend to do so, and the other 1% of the time some people will do it just because they can.

Link to comment
Share on other sites

P.S. Don't let your day be ruined by other people. 99% of the time people don't intend to do so, and the other 1% of the time some people will do it just because they can.

Hey, LxP made me a statistic. I'm usually that 1%.
Link to comment
Share on other sites

Um, you possibly didn't see where I was coming from. After a hard day debugging an unstable user's windows system as there were numerous versions of the same named DLL in various installation folders, and the first one called became memory resident and subsequent calls for later versions caused instability, you would know what I was talking about. I thinks the term is DLLHell.

Version control is important. Leaving obsolete versions with pointers for unsuspecting noobies is a time bomb trap that I would not wish on anybody. Commit your sins in public and take your punishment in ???

Now that I have that off my chest, unreserved apologies to any I have offended, and I hope we have all learned something from this discourse.

Which 1%?

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