[mICQ] micq and crontab !
Luiz Gustavo Sarubi Macchi (Gugui)
gugui_sarubi_macchi at yahoo.com.br
Tue Aug 28 23:47:26 CEST 2007
Hi Jeff, thanks for your help ! it was great !
Could u explain me or an example how to use it with socket 5 ?
I´m trying to find something about this, but there are little docs on
the net...
i saw in $HOME/.micq/micqrc
[General]
# Support for SOCKS5 server
s5_use 0
s5_host "[none]"
s5_port 0
# If you need authentication, put 1 for s5_auth and fill your name/password
s5_auth 0
s5_name "[none]"
s5_pass "[none]"
Should I put my uin and my pass there to authenticate ?
So after that, how to send messages using socks5 ? should i need to use
another program ?
Thanks a lot
Jeff MacLoue escreveu:
> On Mon, 27 Aug 2007, Luiz Gustavo Sarubi Macchi (Gugui) wrote:
>
> LGSMG> Hi all, i need to send a message every day !
> LGSMG>
> LGSMG> how to run micq on crontab ?
> LGSMG>
> LGSMG> i was thinking
> LGSMG>
> LGSMG> a txt file:
> LGSMG>
> LGSMG> !sleep 10 # to wait icq to became on-line
> LGSMG> msg uin message
> LGSMG> !sleep 10 # to wait send the message
> LGSMG> q # to quit micq
> LGSMG>
> LGSMG> so !sleep 10 force a pause and micq stop running for 10 seconds, so it
> LGSMG> cant stay on-line :-(
> LGSMG>
> LGSMG> thanks any help
>
> Why don't you use remote control socket?
>
> mICQ keeps a socket inside its directory, called "scripting" in newer
> releases and "remote-control" (if I am not mistaken) in older ones (or if
> you use old config - check micqrc). Everything written to this socket will
> be executed as it was typed in mICQ command line.
>
> To use this feature you need some way to keep mICQ running - I don't think
> it will like usual '&' as it needs screen output. I think the better way
> is to use "screen" application to emulate the terminal - check if it is
> available in your system.
>
> So, to send a message from an external script you need smth like:
>
> ===
> #!/bin/sh
>
> # Run mICQ in virtual terminal:
>
> screen -d -m micq
>
> # ('-d -m' means detached mode)
>
> # Wait for logon to complete:
>
> sleep 20
>
> # Send the message:
>
> echo 'msg Contact "Hi, friend!"' > $HOME/.micq/scripting
>
> # Wait a while:
>
> sleep 10
>
> # And finally quit mICQ:
>
> echo 'q' > $HOME/.micq/scripting
> ===
>
> I didn't tried this script but I think it will work.
>
>
>
> P.S. A general thought - it would be better to have some "feedback" from
> scripting socket. "sleep" is not the best way to do the things actually,
> and despite Tcl scripting feature can do way better things it is not
> documented fine enough (or I didn't find the docs). I wrote a very basic
> cover of this feature, it's available at
> http://www.macloue.com/micq/micq-Tcl-HOWTO.txt but it needs enhancements
> and editorial I don't have time to perform at the moment. Suggestions,
> fixes and additions are welcome.
>
> --
> jeff
>
--
Luiz Gustavo Sarubi Macchi
Analista/Programador
Emar Plásticos Ltda - www.emar.com.br - suporte at emar.com.br
Cel.......: 17-9131-4855
e-mail....: gugui_sarubi_macchi at yahoo.com.br
ICQ.......: 33463986
MSN.......: gugui_sarubi_macchi at hotmail.com
JABBER....: Gugui at jabber.freenet.de
Linux User: 328883
More information about the mICQ-List
mailing list