mIRC Home    About    Download    Register    News    Help

Print Thread
#153875 24/07/06 05:04 AM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
I had a few ideas for Dialogs.. (I use Dialog Studio)
ok..

[*]First of all, I was wondering if there was an option to disable the "X" in dialogs, It would be nice if that was possible.

[*]Second, I was wondering if there were something to add colors to a dialog, sort of like the "CTRL + K" box?

[*]And last, it would also be nice if we could change fonts in dialogs as well.

Anyone think any of these are good ideas? Please give your opinions.


-Kurdish_Assass1n
#153876 24/07/06 05:58 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You can monitor for that first option via your dialog script. Clicking the "X" returns the same ID as your cancel button, or if you don't have one, returns $null

For colors and fonts, I believe (although I haven't used these myself) that DCX & MDX both support these options for dialogs.

#153877 24/07/06 04:04 PM
Joined: Apr 2004
Posts: 218
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
I like the first idea of maybe a mode to hide the "[X]" button on dialogs.


Live to Dream & Dream for Life
#153878 24/07/06 04:09 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Nice ideas, but extra dialog features have been suggested many many times and not much has happened. I wouldn't get your hopes up.

#153879 24/07/06 04:26 PM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
Quote:
You can monitor for that first option via your dialog script. Clicking the "X" returns the same ID as your cancel button, or if you don't have one, returns $null

For colors and fonts, I believe (although I haven't used these myself) that DCX & MDX both support these options for dialogs.

yea, I think it does as well, the problem is that I make dialogs when needed, like, In most cases, I give them out, and, if I wanted to add color, I wouldn't want to have to give the the dll, and the other scripting, because, I tried DCX yesterday, (I think that was it) and it had a few dlls, and a lot of files/folders, and, I wouldn't want to give that out, it also had a lot of custom identifiers, so, it would be nice if we could get that as well.


-Kurdish_Assass1n
#153880 24/07/06 04:43 PM
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
You only need the DCX.dll and copy paste the DCX/XDIALOG/XDID aliases from the dcx_tools.mrc to make DCX work.


$maybe
#153881 24/07/06 09:42 PM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
Quote:
You can monitor for that first option via your dialog script. Clicking the "X" returns the same ID as your cancel button, or if you don't have one, returns $null


Hey Russel, can you please explain this a little more, I'm wanting to disable the 'X' in dialogs.


-Kurdish_Assass1n
#153882 24/07/06 11:04 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
 dialog new_table {
  title "New Project"
  size -1 -1 124 94
  option pixels
  button "OK", 1, 15 15 75 25, ok
  button "Cancel", 2, 15 45 75 25, cancel
}
menu * {
  New Table : dialog $iif(!$dialog(new_table),-md,-ev) new_table new_table
}
on *:dialog:new_table:close:*:{
  echo 4 -a $iif($did,$did,NULL)
}
 

If you click the OK button, then the script echoes 1
If you click the Cancel button, then the script echoes 2
If you click the X, then the script echoes 2

If you remove the line with the Cancel button in it, then run the script and click the X, you'll see NULL

I hope this is sufficient explanation for your requirements.

#153883 25/07/06 01:20 AM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
I'm talking about disabling the 'X'
here's an example:

I'm wanting to do the same thing as the disabled button, to the X button, either that, or hide it, where they can't click it, I hope I explained it better.


-Kurdish_Assass1n
#153884 25/07/06 02:21 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I understand, and while at the moment I can't see an advantage to having that, I also can't see a disadvantage either.

In any case, until (and if) this is implemented, a non-perfect workaround could look like
Code:
 dialog new_table {
  title "New Project"
  size -1 -1 124 94
  option pixels
  button "OK", 1, 15 15 75 25, ok
  button "Cancel", 2, 15 45 75 25, cancel
}
menu * {
  New Table : dialog $iif(!$dialog(new_table),-md,-ev) new_table new_table
}
on *:dialog:new_table:close:*:{
  if !$did {
    dialog -md new_table new_table
  }
}
 

#153885 25/07/06 05:05 AM
Joined: Apr 2006
Posts: 24
A
Ameglian cow
Offline
Ameglian cow
A
Joined: Apr 2006
Posts: 24
Quote:
First of all, I was wondering if there was an option to disable the "X" in dialogs, It would be nice if that was possible.


I think that is a really bad idea. Not giving users a way out is bad. Think of a dialog where there is no button (or a button that does nothing), and thus no way to get rid of it since the X is not there. The malicious use for this is just too high.

#153886 25/07/06 05:29 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Anyone that creates a dialog that doesn't have a way of closing it, shouldn't be coding dialogs for others to use. I, for one, have never seen a dialog that has been scripted for someone else to use that hasn't contained a Cancel button. It's one of the easiest pieces of a dialog to code.

#153887 25/07/06 05:30 AM
Joined: Apr 2006
Posts: 24
A
Ameglian cow
Offline
Ameglian cow
A
Joined: Apr 2006
Posts: 24
You are thinking benevolently. Think maliciously.

#153888 25/07/06 05:42 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I'm thinking realistically based upon my knowledge of dialogs (or as realistically as I can for 1:40 am)

#153889 25/07/06 05:43 AM
Joined: Apr 2006
Posts: 24
A
Ameglian cow
Offline
Ameglian cow
A
Joined: Apr 2006
Posts: 24
Maybe I'm just a bit more paranoid than the average dialog user. /me looks at the RSS feeds of Secunia, Netcraft, SecurityFocus.

#153890 25/07/06 06:51 AM
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
I can not see the harm in having a flag that creates the dialog without the [x] in the corner, but i would definately insist on 1 condition. Using the flag to hide the [x] should NOT render the [esc] key unable to escape out of the dialog.

I know there are other ways people could render a dialog unclosable, but they would require more effort, and to be honest i really dont see much of a reason somebody with mal-intentions would choose to spend their time on such a trivial thing when they could just do whatever they intend in the background.


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
#153891 25/07/06 12:40 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Quote:
The malicious use for this is just too high.


Why? Scripts can run regardless of whether or not there's a close button. Remember that closing the dialog will trigger a script, so what if that is the malicious one?

#153892 25/07/06 08:50 PM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
theres always the alternative of using a dialog framed @window. that can run with no[x]

also, dcx can make dialogs with no titlebar/[x] etc.

btk


billythekid
#153893 25/07/06 09:27 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Alternative to the "malicious" nature (of which i see VERY minimal; as hixxy pointed out, scripts can be done with or without a gui), the ability to remove the [X] perhaps in the presence of a cancel button would be nice.


-KingTomato

Link Copied to Clipboard