botanic Posted December 12, 2006 Share Posted December 12, 2006 (edited) here is the script it says "syntax error" im trying to make it so that it takes the text and makes the $clip variable off of an input I also think that i need 2 ways to stop it because of there isn't then it just makes a loop... If $inimode = "BOTH" then _sendMessage("What do you want to do?", "", "") sleep(100) _sendMessage("Please Type buy or sell", "", "") sleep(500) _sendMessage("Please Type it now.", "", "") sleep(5000) MouseClick("left", 790, 684, 2, 0) sleep(50) send("^c") sleep(50) $string = "^v" while StringRight($string, 4) = "now." MouseClick("left", 790, 684, 2, 0) send("^c") sleep(300) $string = "^v" $clip = StringInStr($string, "buy" or "sell") sleep(300) if $clip = "buy" or $clip = "sell" then WEnd _HandleWindows(0) If $WITHDRAW = "YES" Then Return wend Edited December 12, 2006 by botanic Link to comment Share on other sites More sharing options...
HardCopy Posted December 12, 2006 Share Posted December 12, 2006 (edited) here is the script it says "syntax error" im trying to make it so that it takes the text and makes the $clip variable off of an input Botanic the code you provide here and in your other post , is not the complete code. For people to be able to help you, Always best to submit FULL Code. Without it, very hard to comprehend what you are tryin to achieve, also difficult to know what variables contain what values. I understand you are probably new to coding, but as you are making an effort to provide code, i am prepared to help where i can. try this: If $inimode = "BOTH" Then _sendMessage ("What do you want to do?", "", "") Sleep(100) _sendMessage ("Please Type buy or sell", "", "") Sleep(500) _sendMessage ("Please Type it now.", "", "") Sleep(5000) MouseClick("left", 790, 684, 2, 0) Sleep(50) Send("^c") Sleep(50) $string = "^v" While StringRight($string, 4) = "now." MouseClick("left", 790, 684, 2, 0) Send("^c") Sleep(300) $string = "^v" $clip = StringInStr($string, "buy" Or "sell") Sleep(300) If $clip = "buy" Or $clip = "sell" Then _HandleWindows(0) ExitLoop ;;; use this to exit your loop EndIf If $WITHDRAW = "YES" Then Return WEnd goodluck HardCopy Edited December 12, 2006 by HardCopy Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad Link to comment Share on other sites More sharing options...
1905russell Posted December 12, 2006 Share Posted December 12, 2006 (edited) $string = "^v" has to be $string = Send ("^v") (Send() has no return value so this is wrong - see below) Edited December 12, 2006 by 1905russell Link to comment Share on other sites More sharing options...
HardCopy Posted December 12, 2006 Share Posted December 12, 2006 $string = "^v"has to be$string = Send ("^v")heh, probablyMore reason why full code should be submitted, so we are able to test it works. Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad Link to comment Share on other sites More sharing options...
1905russell Posted December 12, 2006 Share Posted December 12, 2006 (edited) heh, probablyMore reason why full code should be submitted, so we are able to test it works.Actually I'm wrong Send does not return the string. Will look up and get back.No need for ^V$string = ClipGet() Edited December 12, 2006 by 1905russell Link to comment Share on other sites More sharing options...
botanic Posted December 13, 2006 Author Share Posted December 13, 2006 (edited) i would submit the full code but it is like 2 months worth of work and like 3500+ lines worth of script and well i dot want ppl stealing that much work of mine and i dont know of any way that i can send it without that problem... if you do really need to see the whole thing i guess i could post it but like i said i want to avoid that as much as possible. I generaly can figure out most things im just doing touchups and since i taught myself autoit (this is my first script) I dont always know what the proper syntax is and the posts above still dont work for me... im trying to get it so that the input "buy" or "sell" becomes the variable $clip. this is for a chatroom thing in the chatroom, the mouseclick will select a whole line of text. I just cant get it to detect the imput variables because the chatroom when i copy it pasts something like" 4:39 botanic: Please Type it now." and i dont know how strings work and the help file isnt helping me neither. I would use get pixel color the only problem is that i need it to run that loop searching for the input untill there is a correct input of the "buy" or "sell" variety because then the bot could error off a false positive and cause a whole slew of problems. the variables are as follows $inimode is a cut from an inifile in this it is = to "BOTH" $string is just for this function $clip is later a variable that decides what messages to send as well as what amount to take, give ect _HandleWindows(0) If $WITHDRAW = "YES" Then Return that is used to decide if they leave the trade to break operation when i try to run this it does the function once then just stops everything. it doesnt move anymore or do anything... Edited December 13, 2006 by botanic 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