Insolence Posted January 11, 2005 Posted January 11, 2005 Declare them first, before you use them. Local $Varname, $Varname At the top before you use them. "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
para Posted January 11, 2005 Author Posted January 11, 2005 (edited) Well.... I cant seem to figure this out, i figured out the declaring part, but now it wont even open the file. Opt("WinTitleMatchMode", 3) Local $var1, $var2, $var3, $var4 $var1 = WinExists("Untitled - Notepad", "!run notepad") $var2 = WinExists("Untitled - Notepad", "!run paint") $var3 = WinExists("Untitled - Notepad", "!run calc") $var4 = WinExists("Untitled - Notepad", "!run cmd") While 1 If $var1 = 1 Then Run("notepad.exe") EndIf If $var2 = 1 Then Run("mspaint.exe") EndIf If $var3 = 1 Then Run("calc.exe") EndIf If $var4 = 1 Then Run("cmd.exe") EndIf WEnd Edited January 11, 2005 by para
Insolence Posted January 11, 2005 Posted January 11, 2005 Make sure you start using ControlGetText GL "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
Insolence Posted January 11, 2005 Posted January 11, 2005 Open what file? Use ControlGetText. "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
para Posted January 11, 2005 Author Posted January 11, 2005 It wont open notepad when I type !run notepad Ok... Here is my edited version, tell me what I did wrong please. Opt("WinTitleMatchMode", 3) Local $var1, $var2, $var3, $var4 $var1 = WinExists("Untitled - Notepad", "!run notepad") $var2 = WinExists("Untitled - Notepad", "!run paint") $var3 = WinExists("Untitled - Notepad", "!run calc") $var4 = WinExists("Untitled - Notepad", "!run cmd") While 1 ControlGetText("Untitled - Notepad", "", 15) If $var1 = 1 Then Run("notepad.exe") EndIf If $var2 = 1 Then Run("mspaint.exe") EndIf If $var3 = 1 Then Run("calc.exe") EndIf If $var4 = 1 Then Run("cmd.exe") EndIf WEnd
Insolence Posted January 11, 2005 Posted January 11, 2005 You're not using ControlGetText right. You're not even setting a variable to return it to, for one. The first variables from winexists and stuff you should ditch.. you're only checking them one time outside the loop, they need to be inside. You didn't add the sleep I said, I give up -.- "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.
para Posted January 11, 2005 Author Posted January 11, 2005 I remeber you saying add sleep, I felt no need to add it yet. I will add that when its a finished product.... How do I set a return value?
para Posted January 11, 2005 Author Posted January 11, 2005 Got it! Thanks so much everyone that helped!
Joel Posted January 14, 2005 Posted January 14, 2005 I haven't read through all of the posts directly, so I'm not sure if this has been stated yet. You might want to implement this as a perl bot. Perl has easy features for communicating with chat interfaces and you could probably couple a few features with autoit. I have several chat bots that I created for Anarchy Online that answer, respond to tells and even send link blogs that show gui popup information while online. If you need some examples, just search google for bots and anarchy online. Hope this helps.. [font="Optima"]"Those who heed life with speculation and contemplation, are the ones stuck home with constipation." - Joel[/font]
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