mIRC Home    About    Download    Register    News    Help

Print Thread
#128894 30/08/05 11:56 PM
Joined: Jun 2005
Posts: 44
B
BNX Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jun 2005
Posts: 44
;type "/window1" to start

alias window1 {
dialog -ma window1 window1
}

dialog window1 {
title "Window 1"
size -1 -1 100 100
option dbu

button "Open 2",1, 5 5 40 10
}

on 1:dialog:window1:sclick:1: {
dialog -ma window2 window2
}

dialog window2 {
title "Window 2"
size -1 -1 100 100
option dbu
edit "", 1, 5 5 100 10, autohs %spamme
button "Submit",2, 20 20 40 10, ok
}

on 1:dialog:window2:sclick:2: {
echo [ %spamme ]
}


How can I make this so I wont have to close Window1 when I want to enter a text in to the window2 edit box a SECOND time?

Last edited by BNX; 31/08/05 12:33 AM.
#128895 31/08/05 12:19 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Sorry dude you lost me, any examples or such? smile

-Andy

#128896 31/08/05 12:32 AM
Joined: Jun 2005
Posts: 44
B
BNX Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jun 2005
Posts: 44
that script was the example...

Try it and you will see what I mean.

Enter the text and click submit... it will work...

Do it again with a different text and it will return the old text

Enter Moo
output: Moo
Enter: Meow
output Moo

Last edited by BNX; 31/08/05 12:34 AM.
#128897 31/08/05 01:27 AM
Joined: Jun 2005
Posts: 44
B
BNX Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jun 2005
Posts: 44
- Solved -

Thanks to a fellow IRCer

replace on 1:dialog:window2:sclick:2: with on 1:dialog:window2:close:0:

#128898 31/08/05 01:36 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
on 1:dialog:window2:edit:1: { set %spamme.temp $did($dname,$did) }
on 1:dialog:window2:sclick:2: { echo %spamme.temp }


The %spamme value dos not get loaded with the value of the editbox UNTIL the dialog is submited (and closed?) so when you echoed it it still had the OLD value in pre submit, this can be shown using from the command line /timer 0 1 echo -st spamme = %spamme
then running the /window1

it doesnt change when u type in the editbox, only after the submit is carried out
So instead i stored the current editbox value and displayed that. I didnt store it in %spamme as if you pressed the [x] you would not expect the value to be updated.


Link Copied to Clipboard