AzGuL^ Posted February 15, 2006 Share Posted February 15, 2006 (edited) I need this script; I press keyboard button "G" then it triggers this; presses keyboard button presses with mouse on cord x;y presses keyboard button Just hit me with a script where I can change the button/coords, if it's possible. I may not loop it, just do the sequence when I get "G". Thanks in advance. Edited February 15, 2006 by AzGuL^ Link to comment Share on other sites More sharing options...
cdkid Posted February 15, 2006 Share Posted February 15, 2006 ok, read the helpfile look at HotKeySet() Send() MouseClick() people will probably not write it for you but if you make some kind of effort to do it yourself and you have problems, people will help ~cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 15, 2006 Moderators Share Posted February 15, 2006 Just hit me with a script where I can change the button/coords, if it's possible. I may not loop it, just do the sequence when I get "G".Can you get me a cheese burger while your at it? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
AzGuL^ Posted February 15, 2006 Author Share Posted February 15, 2006 (edited) ok, read the helpfile look at HotKeySet() Send() MouseClick() people will probably not write it for you but if you make some kind of effort to do it yourself and you have problems, people will help ~cdkidThanks for the fast response! I now made this; HotKeySet("^!g", "MyScript") Func MyScript() Send(^!p) MouseClick(100,150) Send(^!p) Exit EndFunc But it tells me some error around the Send cmd I believe I didn't get how to send a key EDIT; SmOke_N, haha so funny .. ? Edited February 15, 2006 by AzGuL^ Link to comment Share on other sites More sharing options...
Knight Posted February 15, 2006 Share Posted February 15, 2006 HotKeySet("{END}", "End") HotKeySet("g", "Go") $btn = InputBox("Btn", "What is the button to press?") $x = InputBox("Mouse Click X", "What is the X coordinate for the mouse click?") $y = InputBox("Mouse Click Y", "What is the Y coordinate for the mouse click?") While 1 Sleep(10) WEnd Func End() Exit EndFunc Func Go() Send($btn) MouseClick("left", $x, $y) Send($btn) EndFunc Link to comment Share on other sites More sharing options...
=sinister= Posted February 15, 2006 Share Posted February 15, 2006 (edited) HotKeySet("{g}", "MyScript") Func MyScript() Send("{p}") MouseClick("left", 100, 150, 2) Send("{p}") Exit EndFunc Edited February 15, 2006 by =sinister= Link to comment Share on other sites More sharing options...
GaryFrost Posted February 15, 2006 Share Posted February 15, 2006 HotKeySet("^!g", "MyScript") Func MyScript() Send("^!p") MouseClick(100,150) Send("^!p") Exit EndFunc I was going to say I wanted $10,000,000.00 but would settle for $1,000,000.00 SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
AzGuL^ Posted February 18, 2006 Author Share Posted February 18, 2006 Thanks to the ones who helped me it works now, BUT I would like it to be very rapid speed. Atm it likes run smooth if we say I got the mouse in the lower right corner it runs smooth up to the point where it needs to click. Is there some way to remove this delay so it executes the sequence within a few miliseconds? This is my current code; HotKeySet("{END}", "End") HotKeySet("{DEL}", "Go") While 1 Sleep(1) WEnd Func End() Exit EndFunc Func Go() Send("P") MouseClick("left", 100, 150) Send("P") EndFunc Link to comment Share on other sites More sharing options...
cdkid Posted February 18, 2006 Share Posted February 18, 2006 change Func Go() Send("P") MouseClick("left", 100, 150) Send("P") EndFunc to Func Go() Send("P") MouseClick("left", 100, 150, 0) Send("P") EndFunc the mouse should move instantaniously now ~cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
AzGuL^ Posted February 18, 2006 Author Share Posted February 18, 2006 Nothing happens now :-/ Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 18, 2006 Moderators Share Posted February 18, 2006 Had you bothered looking at MouseClick() in the helpfile? MouseClick ( "button" [, x, y [, clicks [, speed ]]] ) MouseClick("left", 100, 150, 1, 1) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
mikeytown2 Posted February 18, 2006 Share Posted February 18, 2006 (edited) Here is the complete code, give this a spin Opt("SendKeyDelay", 0) HotKeySet("{END}", "End") HotKeySet("{DEL}", "Go") While 1 Sleep(1) WEnd Func End() Exit EndFunc Func Go() Send("P") MouseClick("left", 100, 150, 1, 0) Send("P") EndFunc Edited February 18, 2006 by mikeytown2 Email: POP3 & SMTP using SSL/TLS (OpenSSL)Email: IMAPEmail: Base64 & SMTP login & Send email direct to MX Server (thanks blindwig)Win: Hook Registry ChangesWin: Read/Write to Alternate Data Streams (ini example)Utility: GPS Distance Calculations, Vincenty and Haversine formulas; angles and elevationUtility: Dell Laser Printer (3000-5100) - Print LoggerUtility: Reset Router when Wireless Link FailsUtility: ImageMagick Batch jpg ProcessorVideo HCenc Batch FrontendVideo: *DEAD* YouTube Video Encoder (avs/avi to flv)Software On CD's I Like<<back|track3 Ultimate Boot CD for Windows SpinRite Ubuntu ophcrack Link to comment Share on other sites More sharing options...
AzGuL^ Posted February 18, 2006 Author Share Posted February 18, 2006 (edited) SmOke_N, thanks a TON, you actually helped me this time. mikeytown2, thanks too! Thanks all, this can be closed now, or whatever you do with topics which is "done". Thanks again ! Edited February 18, 2006 by AzGuL^ Link to comment Share on other sites More sharing options...
cdkid Posted February 18, 2006 Share Posted February 18, 2006 Had you bothered looking at MouseClick() in the helpfile? MouseClick ( "button" [, x, y [, clicks [, speed ]]] ) MouseClick("left", 100, 150, 1, 1) >.< oops, forgot about the clicks param --im an ~cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted February 18, 2006 Moderators Share Posted February 18, 2006 SmOke_N, thanks a TON, you actually helped me this time.mikeytown2, thanks too! Thanks all, this can be closed now, or whatever you do with topics which is "done". Thanks again !I still want my cheese burger Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted February 18, 2006 Share Posted February 18, 2006 (edited) I still want my cheese burger I will buy you one WHEN i get my $10.00 for helping that other newbielol8) Edited February 18, 2006 by Valuater Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now