Jump to content

Chat Bot Skype


Recommended Posts

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

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 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

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

@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

  • 3 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...