pawel054 Posted September 12, 2012 Posted September 12, 2012 I want to do little 'macro' program. But i have 2 problems - First - i don't know how to do right mouse click on hotkey ( to on and off script just by pressing right mouse button ). Second thing - i want to do 2 scripts in one time ( if it's not possible try to mod my script thx ). What i have now - expandcollapse popupHotKeySet("{NUMPAD1}", "start") ; HotKeySet("{NUMPAD2}", "start1") ; HotKeySet("{NUMPAD0}", "stop") ; $i=0 $o=0 ;;;;;;;;;;;;;;;;;;;;;;;; While 1 If $o=1 Then While 1 Send ("p") WEnd EndIf If $i=1 Then While 1 Send ("p") WEnd EndIf While $o=1 Send (3) Sleep (51) Send (4) Sleep (51) Send (5) Sleep (51) Send (6) Sleep (51) WEnd sleep (100) While $i=1 Send (3) Sleep (71) Send (4) Sleep (71) Send (5) Sleep (71) Send (6) Sleep (71) WEnd sleep(100) WEnd ;;;;;;;;;;;;;;;;;;;;;;;; Func start1() $i=1 EndFunc Func start() $o=1 EndFunc Func stop() $i=0 $o=0 EndFunc I want something like this - I click num1, then if I click rmb macro starts with 51 ms delay. ($o ) If i click rmb second time macro stops I click num2, then i click rmb - macro starts with 71 ms delay ( $i ) When one of this macros start - i want 'hold' effect ( in this i wanted to do hold effect on 'p' letter ) For now it didn't work how I want. Thanks for help !
water Posted September 12, 2012 Posted September 12, 2012 Welcome to AutoIt and the forum! What application do you want to automate? Maybe there is a simpler way of doing what you want. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Mechaflash Posted September 12, 2012 Posted September 12, 2012 What water said. And why do you have such random values for the Sleep() argument? Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”
pawel054 Posted September 12, 2012 Author Posted September 12, 2012 (edited) Nah there isn't simpler way. In one game we shooting with cannons. When we press a key for shoot for ex. all 4 cannons will shoot in this same time. I can also fire that cannons using 3,4,5,6. When i shot using 3456, i create something like 'chain fire'. This isn't any kind of piracy, a lot of players use it ( admins agreed that it isn't any kind of cheat, because it won't add damage etc ) so i wanted to do my own program. So i did that when i click num1 i have my macro, and when i stop it by num0 i can also run another by num2, but i want to run and stop using only rmb, and choose delay what i want ( if it's possible ). There aren't any random values trust me I spend a lot of time to find the best one. So in short - I want use delay 51. - I click num1 - I click rbm - macro starts, and holding one of the letter starts too - i click rbm again - macro stops For 71 i want this same but i need to click num2 Edited September 12, 2012 by pawel054
water Posted September 12, 2012 Posted September 12, 2012 I stopped reading when I came to "game".Please read the forum rules and you will understand why you won't get help on your subject. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
pawel054 Posted September 12, 2012 Author Posted September 12, 2012 @water So read all. It's only macro script -.-
MrMitchell Posted September 12, 2012 Posted September 12, 2012 @waterSo read all.It's only macro script -.-You need to read all the forum rules...
Administrators Jon Posted September 12, 2012 Administrators Posted September 12, 2012 Thread closed. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Recommended Posts