|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
i have on dialog EMPTY text box in which is displayed my "idle time" this is code invoked on dialog init: alias idler { timeridle 0 1 if ($dialog(setup)) did -o setup 33 1 $!duration($idle) } textbox ID is 33 dialog name is "setup" problem is that idle time resets when i call dialog so i never actually see my true idle time.... anyone can modify this ? or it cannot be done at all?
Last edited by raZOR; 20/02/06 12:43 PM.
IceCapped
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
While this isn't what you asked for, I have an idle time display incorporated in my snippet located here The snippet has a lot more than the idle time, but it is included.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
IceCapped
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
Have you looked at what is actually being done by the timer? Try doing /timer to view what commands the timer is executing when it goes off. You have prefixed the $!duration identifier, but you haven't prefixed the $dialog(setup) identifier. The timer may actually be executing: if ($false) did..etc
-genius_at_work
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
i have no ide what you said now
IceCapped
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
@russel your dialog show idle time on whois =) but i just want to find MY idle time without using whois on me...
so is it possible ?
IceCapped
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
This works in 6.03 and above. Note this is your idle time as of the initialization of the dialog. It does not update automatically. dialog idle_time {
title "My Idle Time"
size -1 -1 60 20
option dbu
edit "", 1, 5 5 50 10, read
button "Button", 3, 5 3 37 12, hide default ok cancel
}
menu * {
&My Idle Time : dialog -m idle_time idle_time
}
on *:dialog:idle_time:init:*:{
did -ra $dname 1 $duration($idle)
}
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
now i will bug you even more =) ofcourse you dont have to do it if you dont want to...
1. can that update be done for just 1 control (like i posted for text box) and not whole dialog
2. can you make it update per second ?
IceCapped
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
It's only using one control, the only reason it's using the entire dialog is because the dialog only has two controls, the display and a hidden OK/Cancel button.
As to the second request, I can get it to update, but I can't guarantee it'll match second to second. Can't code it right now, but I'll do it when I get home from work.
If you want me to incorporate the changes to code you already have, post the code, and don't forget to use the Code Tags
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
well since you also use txt control then i dont think posting mine code (which is mega huge) is needed, altho if you are willing then i shall ask you kind if you could make an updater
IceCapped
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
ok...here's a combination of my code that works and the code that you started with..I've changed my code to use the ID and dialog name from your original post dialog setup {
title "My Idle Time"
size -1 -1 60 20
option dbu
edit "", 33, 5 5 50 10, read
button "Button", 999, 5 3 37 12, hide default ok cancel
}
menu * {
&My Idle Time : dialog -m setup setup
}
on *:dialog:setup:init:*:{
.timeridle 0 1 did -ra $dname 33 $duration($idle)
}
You'll have to make appropriate changes to your actual code so that the item shows up in the correct location. If you already have an OK and/or Cancel buttons, then you can delete the button that's in the above code. If you've written a mega huge script already, you should have no problems incorporating what I have above into your code.
Last edited by RusselB; 20/02/06 11:47 PM.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
doesnt show anything and got errors
* /did: 'idler' invalid id '1' - * /did: invalid parameters
i renamed dialog name to "idler" because "setup" was interfering with original dialog
so i thought my script causes errors so i tried in clean 6.16 and it still is buggy
IceCapped
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Simple mistake, I forgot to change the ID in the /did command (which is part of the /timer command). That error has been corrected. You may still want to use the Idler name, rather than Setup, as you say it's causing problems in your Setup dialog. I don't know how long the dialog setup is, (ie: the section in the script that starts with /dialog <dialog name>), but if it's not too long, and you want to post that part, I can probably incorporate my script to your Setup dialog.
That's what I was actually referring to earlier, not the whole entire script.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
now it updates only when i run dialog and on close i get
* /did: invalid parameters
~edit~
that script (i have) has 350 rows =) you really dont wanna me to post it =)
Last edited by raZOR; 21/02/06 12:00 AM.
IceCapped
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
add to the dialog on *:dialog:<dialog_name>:close:*:{
.timeridle off
}
Replace <dialog_name> with the actual name of the dialog. That'll take care of that error message. Regarding it not updating while displaying...:( Sorry, I thought it would work I'll test the code when I get a chance and see what I can do. 350 rows just for the layout? yikes...you're right, but I can only work with what I've got, so if you want it to work in conjunction with you other script, you're going to have to do the merging yourself, as I can't tell what would work where
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
it works now (updates and no errors) but still update is only when dialog is re-opened
well i think your way is simplier, then i'll just merge it to dialog
as for 350 rows, well it contains full code for "control panel" because i have 1 dialog with 5 tabs and each tab has bunch of controls =)
anyways dont be sorry, you helping me remember? and i apreciate ANY help i can get so any try is gift =)
Last edited by raZOR; 21/02/06 02:49 AM.
IceCapped
|
|
|
|
Joined: Jun 2003
Posts: 994
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 994 |
I refuse to engage in a battle of wits with an unarmed person.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
IceCapped
|
|
|
|
Joined: Feb 2006
Posts: 6
Nutrimatic drinks dispenser
|
Nutrimatic drinks dispenser
Joined: Feb 2006
Posts: 6 |
i have on dialog EMPTY text box in which is displayed my "idle time" this is code invoked on dialog init: alias idler { timeridle 0 1 if ($dialog(setup)) did -o setup 33 1 $!duration($idle) } textbox ID is 33 dialog name is "setup" problem is that idle time resets when i call dialog so i never actually see my true idle time.... anyone can modify this ? or it cannot be done at all? you do know that your idle time, for mIRC resets once you do a command as well that seems to be the main problem if you set the dialog to an FKEY, it won't reset your idle time hope that helps
|
|
|
|
|