Trojan55 Posted August 11, 2013 Share Posted August 11, 2013 Hi Guys, i've read the rules so i can post that, I wanna make a Skype Chat Bot (not GUI) (Hotkey) if $text on skype then say example if $text == hi then send("hi") Here is my source currently : HotKeySet("$","Begin") Func Begin() $get = PixelSearch(195,264,1027,656,0x997420) if IsString($get) = "hi" then Send("hi") Begin() EndIf EndFunc While 1 WEnd Thanks for help ^^ Link to comment Share on other sites More sharing options...
FireFox Posted August 11, 2013 Share Posted August 11, 2013 Hi, Take a look at my Skype UDF (link in my signature). Br, FireFox. Link to comment Share on other sites More sharing options...
kylomas Posted August 11, 2013 Share Posted August 11, 2013 Trojan55, Whether or not this code is in violation of the rules is for a Mod to decide. Have you tried to run the code that you posted? kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Trojan55 Posted August 11, 2013 Author Share Posted August 11, 2013 (edited) FireFox : KK kylomas : I did read the rules carefully, and i tested the code Edited August 11, 2013 by Trojan55 Link to comment Share on other sites More sharing options...
Trojan55 Posted August 11, 2013 Author Share Posted August 11, 2013 FireFox : I didn't find something good Link to comment Share on other sites More sharing options...
FireFox Posted August 11, 2013 Share Posted August 11, 2013 But you can do what you're looking for with the UDF Link to comment Share on other sites More sharing options...
kylomas Posted August 11, 2013 Share Posted August 11, 2013 and i tested the code Did it work? If not, what is not working as expected? kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
FireFox Posted August 11, 2013 Share Posted August 11, 2013 (edited) AFAIK in this world, PixelSearch does not return the text read from a pixel and neither IsString. Edited August 11, 2013 by FireFox Link to comment Share on other sites More sharing options...
kylomas Posted August 11, 2013 Share Posted August 11, 2013 (edited) Trojan55, Let me explain what your code is doing. You need to understand some fundamentals before moving on. See comments in the code. ; so far, so good... HotKeySet("$","Begin") Func Begin() ; $get will contain an array of coordinates $get = PixelSearch(195,264,1027,656,0x997420) ; this is a little more involved ; you are running isstring on an array. the return will be 0 (fail) ; then you are trying to compare the 0 against a string. Since the string is not a number the return will be 0 (fali again) ; the net result is that you are inadvertently comparing 0 to 0 which is true and the Send runs if IsString($get) = "hi" then Send("hi") ; now you are recursing the Begin function with no way to break out without terminating the script ; "hi" is being written in a tight loop to whatever is active on your PC Begin() EndIf EndFunc While 1 WEnd kylomas edit: Using FireFox's UDF is the correct approach, however, this code indicates that your time is better spent in the Help file. Edited August 11, 2013 by kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
FireFox Posted August 11, 2013 Share Posted August 11, 2013 @kylomas "fali" is indeed a fail. Link to comment Share on other sites More sharing options...
kylomas Posted August 11, 2013 Share Posted August 11, 2013 "fali" is indeed a fail. Yes, fingers are on strike... Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
FireFox Posted August 11, 2013 Share Posted August 11, 2013 The fail is better in the comments than in the script Link to comment Share on other sites More sharing options...
Trojan55 Posted August 12, 2013 Author Share Posted August 12, 2013 Bukh ... Anyway I'l stop this project Link to comment Share on other sites More sharing options...
Trojan55 Posted August 13, 2013 Author Share Posted August 13, 2013 The community should help us. :/ Come on AutoIt... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 13, 2013 Moderators Share Posted August 13, 2013 Trojan55,No-one here is under any obligation to help anyone else. Please remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. You will just have to wait until someone who knows something about your particular problem, and is willing to help, comes online. 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...
FireFox Posted August 13, 2013 Share Posted August 13, 2013 Bukh ... Anyway I'l stop this projectThe community should help us. :/ Come on AutoIt...I see a contradiction here. Link to comment Share on other sites More sharing options...
kylomas Posted August 13, 2013 Share Posted August 13, 2013 Trojan55, The best help you can get right now is from yourself. Look and understand what has been posted and read the Help file, at least those sections that pertain to you. You will recieve help to the extent that you are willing to help yourself. Good Luck, kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Trojan55 Posted August 14, 2013 Author Share Posted August 14, 2013 I wanna get the currently text from a program , example script? Link to comment Share on other sites More sharing options...
FireFox Posted August 14, 2013 Share Posted August 14, 2013 @Trojan55 I reproduced a simple Skype with the Skype UDF, you can dig into it and find the functions you need. e.g: The function triggered when you receives a message and the one used to send a message, really easy. To make it work for your level it's another thing, take those things out and if it does not work post it here and I will guide you Br, FireFox. Link to comment Share on other sites More sharing options...
Trojan55 Posted November 15, 2013 Author Share Posted November 15, 2013 I'm back to autoit, I'm testing this but doesn't work where is the $oChat variable? :/ #include <Skype.au3> Dim $oChat = $oChat.Skype_GetMessages() While 1 $msg = _Skype_ChatGetMessages($oChat) If $msg <> "" Then MsgBox(0,"","$msg : "&$msg) EndIf WEnd Thanks for help. 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