mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2005
Posts: 5
J
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
J
Joined: Apr 2005
Posts: 5
I created a dialog and in the init event I put this command to set the focus to the 2nd tab: did -f $dname 62

The dialog loads but the focus is on the first tab which shows that the did -f command doesn't work

I am using Mirc 6.16

This is code that can be used to duplicate the problem. After pasting it in remotes do /dialog -m Test Test. The echo command in init confirms that the init is in fact executing.

dialog Test {
title Test Dialog
size -1 -1 200 175
option dbu
button "Ok", 5, 65 160 30 12, ok
button "Cancel", 6, 102 160 30 12, default cancel
tab "Tab 1" ,60,5 5 190 145
tab "Tab 2" ,61,5 5 190 145
tab "Tab 3" ,62,5 5 190 145
tab "Tab 4" ,63,5 5 190 145
tab "Tab 5" ,64,5 5 190 145
tab "Tab 6" ,65,5 5 190 145
tab "Tab 7" ,66,5 5 190 145
tab "Tab 8" ,67,5 5 190 145
tab "Tab 9" ,68,5 5 190 145
}

on *:dialog:Test:init:0: {
echo -a in init
did -f $dname 62
}

Joined: Apr 2005
Posts: 5
J
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
J
Joined: Apr 2005
Posts: 5
NM I found a solution that works by using a timer like this:
.timer 1 0 did -fu $dname <TabID>

See
https://forums.mirc.com/s...true#Post119130

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
the question is, is that a solution or a workaround


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Aug 2005
Posts: 128
S
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
Posts: 128
Well, It's not a big bug, since it can be avoided by using timer, but it should be fixed anyway

crazy

Joined: Dec 2002
Posts: 83
D
Babel fish
Offline
Babel fish
D
Joined: Dec 2002
Posts: 83
I had the same problem and I think it is because during the init event the dialog is not again opened. So, the switch f which works only on a open dialog can't be used it unless using a timer.

I advice a timer -m 1 1 which permits to execute the switch f without delay on a display.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
If you really want a timer that will execute once, and with no delay, use /timer 1 0

Joined: Oct 2003
Posts: 214
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
You can also do it without timers, using a /signal
Code:
on *:dialog:Test:init:0: { .signal test did -f $dname 62 } 
on *:signal:test:{ $1- }

this works because the signal will be executed after the init event, if you use /signal -n test did -f $dname 62 it won't work wink

Anyway its a small bug that should be fixed

I'm waiting for a new mIRC version :\


one step closer to world domination

Link Copied to Clipboard