mIRC Home    About    Download    Register    News    Help

Print Thread
#140158 22/01/06 08:45 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Any way you can "fake" press a button in a dialog? i want to get my dialog to belive i pressed a button with the ID 11, but the user only need to press it one time, then when it needs to be updated i want to be done automatic with a timer, and yes, want it like the button is pressed at XX amount of time.. smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#140159 22/01/06 08:46 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Just put the code you want to call in an alias, then call that alias both when the button is pressed and in the timer.

#140160 22/01/06 08:48 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I tryed that, but get a error.. smirk and if i dont get an error the then some ID get cleared.. so need that ID be activated some way..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#140161 22/01/06 08:49 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
There's no reason you should get an error unless you have some code that will only work from inside the scope of a dialog event. Try posting your code and we can try to help you further.

#140162 22/01/06 09:10 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Are you good on sockets ? if you are, could u help me to gather server info true sockets? i only need the amount of players on xxx.xxx.xx.x .. i dont know how the h*ll i should gather that info.. Unreal Tournament is the game we talking about.. wink


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#140163 22/01/06 09:21 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
I can use sockets but you can't expect me to know every protocol under the sun. If you have some information on the protocol unreal tournament uses and an example server ip I can try to whip something up for you.

#140164 22/01/06 09:21 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Can u allow me to send u a private message? smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#140165 22/01/06 09:21 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Yeah.

#140166 22/01/06 09:32 PM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
A basic code to do this:

Code:
on *:udpread:getplayers: {
  sockread -f &x
}


Issue this command:
//sockudp -k getplayers <ip> <query port> \players\

It will store the result in &x, from there it leaves you to do whatever you want with the info.

For more info take a look here: http://wiki.beyondunreal.com/wiki/UT_Server_Query

#140167 23/01/06 05:09 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I sloved that part, now to a new question.. wink if i open a dialog with:

/dialog -md name table

the the dialog opens as a desktop window.. but if i want to bring it up to foreground when something happens inside the dialog that need the users atention, how would i do that? in the mirc.hlp i found this:

-v makes the dialog the active window

but how would i use that? the dialog is open, so i cant use /dialog -v name table, how to solve this? :P


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#140168 23/01/06 05:54 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
did you try /dialog -v dialogname

#140169 23/01/06 06:03 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
dialog -o dialogname worked


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#140170 23/01/06 06:28 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
there is a difference in how the two work
if you just want to bring the dialog to the front, use -v

after using the -o switch you might want to use -n to unset it

my guess is you really could just use -v


Link Copied to Clipboard