ZenMastah Posted July 27, 2012 Share Posted July 27, 2012 Hi, Good morning, good after and good night, I would appreciate it if someone could give me a crash course(tutorial) on how to make a script that presses keys on a timer and then releases that key and presses another and then a timer that waits to press another key and so forth. Example: start script w key gets pressed for 25 seconds w key gets released after 25 seconds once w key is released after 25 seconds the u key gets pressed for 1 second after u is pressed for 1 second the number 1 key gets pressed for 0.5 seconds after the number 1 key gets pressed for 0.5 seconds timer starts and waits 25 seconds after 25 seconds the whole process starts again but this time instead of w being pressed, the letter s is pressed instead I have another program that can create it but for some reason it wont run on this PC, only on my other PC. I can open it but it goes invisible once it opens. That creates the script I am after like so below *w,25000,-w,*u,1000,-u,25000 *s,25000,-s,*u,1000,-u,25000 I need a script that runs on an AutoIt script that does the same thing as the program i mentioned above does but I would also like to know if I can assign the script to a specific window so i can continue browsing the web while the script does its own thing in the background. Can someone please help me out, Thank you in advance Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 27, 2012 Moderators Share Posted July 27, 2012 Hi, ZenMastah. Just out of curiosity, what application are you trying to interact with? There are quite often easier ways of doing what you want, with ControlSend or some other function, depending on the program itself. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
jdelaney Posted July 27, 2012 Share Posted July 27, 2012 Agreed with JLogan3o13, but an easy way to do so, would be to create a 2d array, with the miliseconds to press, and key to press. Then loop through it.in the loop you can modify:AutoItSetOption() to set the array value for milliseconds to press (no need to release) SendKeyDownDelay Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses you may need to raise this value from the default. A value of 0 removes the delay completely. Time in milliseconds to pause (default=5). IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
ZenMastah Posted July 27, 2012 Author Share Posted July 27, 2012 (edited) Hi, ZenMastah. Just out of curiosity, what application are you trying to interact with? There are quite often easier ways of doing what you want, with ControlSend or some other function, depending on the program itself.The progam is actually a game called dekaron and I need a script to work with it. All i need is a script like what i described in my first postw gets pressed for 25000msafter the 25000ms U gets pressedafter U is pressed the number 1 above the Q button gets pressedafter the Number 1 button gets pressed a timer waits 25000msafter the 25000ms S gets pressed for 25000msafter the 25ms U gets pressedafter U is pressed the number 1 above the Q button gets pressedafter the Number 1 button gets pressed a timer waits 25000msthen after the 2nd 25000ms timer it starts all over again in a loop.This script in the game makes me run up using w for 25 seconds, selects a monster, attacks it with number 1, waits 25 seconds then makes me run back down using S for 25 seconds returning back tot he same spot I started pressing W at and selecting a monster and attacking it with number 1 again. Then that gets looped continuosly until I stop the script.But i also need it to be assinged to the window/process so i can continue with my work so it runs in the background wihtout affecting my work. Edited July 27, 2012 by ZenMastah Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 27, 2012 Moderators Share Posted July 27, 2012 The progam is actually a game called dekaron and I need a script to work with it.You don't seem to have learned much since Melba locked your last post about this game. Game automation is not allowed on this forum, and you are not going to receive any help. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 27, 2012 Moderators Share Posted July 27, 2012 ZenMastah,You have only started 2 threads - both have been about game automation. If you continue in this vein you will not have a long stay here. I suggest you take the next 3 days to read the Forum Rules and follow them in future. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts