critan Posted March 10, 2009 Share Posted March 10, 2009 I am new to the program and i need help on making a simple(well not to me lol) script that loops Send(1) and on the side loops send(2) at in interval of some seconds(like 30sec) any help would be appreciated =D Link to comment Share on other sites More sharing options...
bo8ster Posted March 10, 2009 Share Posted March 10, 2009 try looking at the help file for things like Send, Sleep and Loop Statements. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
critan Posted March 10, 2009 Author Share Posted March 10, 2009 try looking at the help file for things like Send, Sleep and Loop Statements.I have done that, I tried and didn't work for me probably did it wrong or something i would like to have help on this still please. Link to comment Share on other sites More sharing options...
EndFunc Posted March 10, 2009 Share Posted March 10, 2009 I have done that, I tried and didn't work for me probably did it wrong or something i would like to have help on this still please.Can you paste the code of what you tried? If you have something to work with that might help. EndFuncAutoIt is the shiznit. I love it. Link to comment Share on other sites More sharing options...
critan Posted March 10, 2009 Author Share Posted March 10, 2009 Can you paste the code of what you tried? If you have something to work with that might help.alright here is what i have(just to let u know i have no idea what i am doing)DoSend(1) ContinueLoopDosleep(30)send(2)ContinueLoop Link to comment Share on other sites More sharing options...
TerarinK Posted March 10, 2009 Share Posted March 10, 2009 First did you read how to use sleep? That will tell you it is in milliseconds 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
critan Posted March 10, 2009 Author Share Posted March 10, 2009 First did you read how to use sleep? That will tell you it is in millisecondsyeh i know its just and example i just want it to work b4 i change that Link to comment Share on other sites More sharing options...
TerarinK Posted March 10, 2009 Share Posted March 10, 2009 This is all you need to do what you want: While 1 Send("1") Sleep(30000) Send("2") WEnd Why do you have two loops anyhow will no ending? Anyways you have to have a variable or else it is a string with "" around there to send it. 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
critan Posted March 10, 2009 Author Share Posted March 10, 2009 This is all you need to do what you want: While 1 Send("1") Sleep(30000) Send("2") WEnd Why do you have two loops anyhow will no ending? Anyways you have to have a variable or else it is a string with "" around there to send it. it has no ending cuz i want it to keep doing send(1) while in the other hand another loop that waits(so many sec) then do send(2) and loops that loop seperatly Link to comment Share on other sites More sharing options...
TerarinK Posted March 10, 2009 Share Posted March 10, 2009 else if you like from what I read: While 1 Send("1") For $i = 1 To 5 Sleep(300) Send("2") Next WEnd This can be changed in any way to get what you would like. Just for a sample view of the possible loops look at the Continueloop of Exitloop functions 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
TerarinK Posted March 10, 2009 Share Posted March 10, 2009 you still need a ending to return false everytime on a Do Until if you want it to run forever Do Send("1") Sleep(300) Send("2") Until False 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
critan Posted March 10, 2009 Author Share Posted March 10, 2009 you still need a ending to return false everytime on a Do Until if you want it to run forever Do Send("1") Sleep(300) Send("2") Until False i did this Do Send(1) until False Do Sleep(300) Send(2) Until False but it doesnt send(2) also Link to comment Share on other sites More sharing options...
Aceguy Posted March 10, 2009 Share Posted March 10, 2009 Because until false will never be false [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
TerarinK Posted March 10, 2009 Share Posted March 10, 2009 That is because you send 1 forever you need to in corporate the 2 inside the function else you need a escape from the function whatever it is Do Send(1) Sleep(300) Send(2) Until False Just watch out for the second one as the whole thing needs to be inside a loop if you want to keep repeating the pattern. Also use $Something as more elaborate then that with say turn true 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
TerarinK Posted March 10, 2009 Share Posted March 10, 2009 Because until false will never be false Your sadly wrong on that, as it will always remain False forever those repeating the pattern till the end of time. I guessing you never test out any scripts that you talk about? 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
critan Posted March 10, 2009 Author Share Posted March 10, 2009 so its impossible to do 2 seperate loops within the same loop? send (1) loops , then another loop send (2) at same time? i need them seperate. if that makes any sense??? Link to comment Share on other sites More sharing options...
TerarinK Posted March 10, 2009 Share Posted March 10, 2009 It is impossible to do the threaded this is a single-thread app. Your best bet would to be doing them in two different apps and executing them both, that would be the only way to execute them both at the same time. What kinda game is this for anyways? Because almost every game I know of only executes one command at a time. 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
critan Posted March 10, 2009 Author Share Posted March 10, 2009 It is impossible to do the threaded this is a single-thread app. Your best bet would to be doing them in two different apps and executing them both, that would be the only way to execute them both at the same time. What kinda game is this for anyways? Because almost every game I know of only executes one command at a time.uh its for aeria games: Shin Megami Tensei:Imagine(aka MegaTen) http://megaten.aeriagames.com/oh ok ill do that then and ty for the help =) Link to comment Share on other sites More sharing options...
bogQ Posted March 10, 2009 Share Posted March 10, 2009 (edited) AdlibEnable("myadlib",5000) While 1 ToolTip("hi",0,0) WEnd Func myadlib() ToolTip("how r y?",0,0) Sleep(1000) EndFunc I still dont understand what r y trying to say but i hope this helps or try TimerDiff Edited March 10, 2009 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
TerarinK Posted March 10, 2009 Share Posted March 10, 2009 ahhh, you should get whatever you do and incorporate it into the function else you'll be sending mass amounts of data the the game will trash and then flag for you spamming. You'll get most likely BAN from the game most game have a least a second wait till whatever. Do Sleep(1000) Send(1) Until False Do Sleep(30000) Send(2) Until FalseoÝ÷ Øz0z÷«¶¬©j[(v¬¶¨ç(f§uú+{ºØ¨©ÝÁ¨±ú+¶ºw-í¡ø§È[yú+yì^rëbazw±´w«z+mëmzº'zÇ+_¢¹®¬¨¹Æ§ºÇ¢·±yËx-+ºÚ"µÍÌÍÝ[YHH[Y[] BÌÍÝ[YH[Y[] BÚ[HBRY[YY ÌÍÝ[YJH ÝÏHL[BTÙ[ ][ÝÌI][ÝÊBBIÌÍÝ[YHH[Y[] BQ[YRY[YY ÌÍÝ[YH ÝÏHÌ[BTÙ[ ][ÝÌ][ÝÊBBIÌÍÝ[YH[Y[] BQ[YÑ[ 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E 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