mIRC Home    About    Download    Register    News    Help

Print Thread
#97401 12/09/04 04:32 AM
Joined: Mar 2003
Posts: 36
B
bugx Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Mar 2003
Posts: 36
I put this post here too because maybe not all the people read the "Feature Suggestions" topic and maybe because somebopdy can help me with this

---

I want to make a traducer addon.. etc... the problem is when i try this

: otro1
sockread %texto
if %traducir.idioma !isin %texto { goto otro1 }

The "if" sentence is ok, but not work, it cycles

Why i know than is ok ? Because if i put an "echo -s %texto" it works (after the "sockread")

I think than needs a pause, a kind of "delay N" or "pause N" (simulates the time than do when try the echo)

I try to call a cicle 1 - 1000 and still not work

I try too with a while and not work too (instead the "goto")

Sorry but my English is not good at all =P

#97402 12/09/04 11:01 AM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
I've absolutely no idea what you are trying to ask, *confused*.

However, if your simply trying to do something like;

On *:Sockread:name:{
:start
sockread %var
[color:red]do commands

goto start
}
[/color]
The SOCKREAD triggers EVERY time you recieve some data, as a result no loop is even required.. simply;

On *:Sockread:name:{
sockread %var
if ([color:red]something
isin %var) { commands }
}
[/color]
Eamonn.

#97403 12/09/04 02:27 PM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
"I put this post here too because maybe not all the people read the "Feature Suggestions" topic and maybe because somebopdy can help me with this"

There's no need to cross post, regulars generally read all of the forums. This doesn't look like a feature suggestion, so use this thread for answers.

It might help people help you (if the above hasn't helped) if you explain what a 'traducer' addon is. What does traducer mean?

I also saw you mention 'pause' - perhaps Online's /sleep alias might help you?

Regards,


Mentality/Chris
#97404 12/09/04 09:04 PM
Joined: Mar 2003
Posts: 36
B
bugx Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Mar 2003
Posts: 36
Yep, normally works with this..

Code:
 On *:Sockread:name:{
:start
sockread %var
do commands
goto start
}
 


But, look.. the webpage returns something like this :

hello
my name
im from
<td>
</tr>
<etc>

(just test)

When i read "my name" i know than 2 lines more ago is the line than i whant.. for this, i need a cycle than reads with sockread until found "my name", then i need another cycle to read with sockread until i found "<etc>"

The problem is if i do this, with "goto" or "do", the sockread no return nothing, but if after the sockread i put a echo works fine.. i mean, needs than do a command, otherwise not work, but the echo is not good idea to me

...

When i say "traducer" i want to mean "traductor".. spanish to english and english to spanish. I read the strings from babelfish.altavista.com

Again, sorry but my english is very bad.. wink


Link Copied to Clipboard