mIRC Home    About    Download    Register    News    Help

Print Thread
an update to tooltips... #238420 25/07/12 09:21 PM
Joined: Mar 2004
Posts: 526
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
the current format for $tip includes 'iconfn'

$tip(name,title,text,delay,iconfn,iconpos,alias,wid)

is there any way that it could also accept the data as used
in $input... ie:

iqwh - show the info, question, warning, and halt icons respectively.

while the icons displayed in $input are of a different size
than would be needed for $tips, having the basic icons
available via a letter (and not having to have seperate
.ico files, as i now have) for tips would be a nice
addition.





Last edited by HorseC; 25/07/12 09:23 PM.

Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
Re: an update to tooltips... [Re: HorseC] #238424 26/07/12 12:02 PM
Joined: Jul 2006
Posts: 3,574
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,574
I like the idea, but since each letter of "iqwh" is a valid filename, you would need a special way to tell the difference, maybe using the iconpos value.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: an update to tooltips... [Re: Wims] #238425 26/07/12 05:38 PM
Joined: Mar 2004
Posts: 526
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
Originally Posted By: Wims
I like the idea, but since each letter of "iqwh" is a valid filename, you would need a special way to tell the difference, maybe using the iconpos value.


Great point wims, and thanks.


Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
Re: an update to tooltips... [Re: Wims] #238426 26/07/12 06:31 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
It would be pretty unintuitive to use iconpos since you would still be required to specify iconfn when passing in these switches.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: an update to tooltips... [Re: argv0] #238427 26/07/12 07:03 PM
Joined: Jul 2006
Posts: 3,574
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,574
It was just an example, you could pass $null for iconfn and use the letter in iconpos


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: an update to tooltips... [Re: Wims] #238429 27/07/12 07:04 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Originally Posted By: Wims
you could pass $null for iconfn and use the letter in iconpos


This is exactly what would be unintuitive.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: an update to tooltips... [Re: argv0] #238430 27/07/12 07:36 AM
Joined: Jul 2006
Posts: 3,574
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,574
It doesn't seem that unintuitive to me, it's related to the icon after all and we can already pass $null there.
The syntax doesn't really matter anyway.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: an update to tooltips... [Re: Wims] #238432 27/07/12 09:27 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
This isn't a matter of syntax, it's a matter of semantics. The syntax isn't in question, the semantics of forcing the user to pass an empty value to get to the next useful parameter is the issue. "we can already pass $null there" is easy for someone who knows the API to say. Please tell me how you would explain this to someone who has never used $tip before, and potentially doesn't know what $null is. I can't think of any way this can be documented without seeming insanely confusing to a user who doesn't know the language extremely well.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: an update to tooltips... [Re: argv0] #238433 27/07/12 10:18 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
True, but in many cases, we're already passing $null in $tip, so it's not really any different. That said, I think custom icons are better than default ones anyhow.


Invision Support
#Invision on irc.irchighway.net
Re: an update to tooltips... [Re: argv0] #238437 28/07/12 02:32 AM
Joined: Jul 2006
Posts: 3,574
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,574
Quote:
the semantics of forcing the user to pass an empty value to get to the next useful parameter is the issue. "we can already pass $null there" is easy for someone who knows the API to say. Please tell me how you would explain this to someone who has never used $tip before, and potentially doesn't know what $null is
Keep in mind it's not just because you dislike very much the semantic in place that it will prevent its usage.
I undertand your concern and I agree this is far from being the best choice but the semantic is already there everywhere in mIRC (passing $null isn't just something you do in $tip), imo it's a good enough reason to keep going with it, no matter how bad you think it is.
Your example was an extreme, you don't start using the scripting language with $tip but I wouldn't help someone with $tip knowing he doesn't know what $null is, pretty simple.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: an update to tooltips... [Re: Wims] #238438 28/07/12 05:15 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Originally Posted By: Wims
passing $null isn't just something you do in $tip


But it is. There are actually very few places in the language where $null is ever used as a parameter unless you're doing something very weird. It's mostly used in if conditions, but not command arguments. This is why it's so confusing and unintuitive.

Originally Posted By: Wims
Your example was an extreme, you don't start using the scripting language with $tip but I wouldn't help someone with $tip knowing he doesn't know what $null is, pretty simple.


Please don't assume to know how scripters start out. People start scripting for whatever their needs may be. Scripting something that pops up custom information triggered by an event is a perfectly valid "first script" project. Note that I did not say "never programmed before"; there are plenty of people who can program and want to do X in mIRC but aren't comfortable with the API. It would not be easy to explain this to new or knowledgable programmers.

I would say that + should be used as a prefix in iconfn to indicate that the parameter is a set of switches. There is precedent for prefixing switches with +, albeit in /commands, but it would be easier to explain.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: an update to tooltips... [Re: argv0] #238439 29/07/12 06:28 AM
Joined: Mar 2004
Posts: 526
HorseC Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
actually this whole issue could be resolved if the icons that are internally built in mIRC (used in $input) were made available. Then anyone could just use them in $tip



Help others! It makes the world a better place, Makes you feel good, and makes you Healthy!
Re: an update to tooltips... [Re: HorseC] #238440 29/07/12 11:27 AM
Joined: Jun 2003
Posts: 81
T
TRT Offline
Babel fish
Offline
Babel fish
T
Joined: Jun 2003
Posts: 81
Those are standard Windows icons, you can already find them in shell32

Re: an update to tooltips... [Re: TRT] #238441 29/07/12 04:23 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
For convenience though, resembling open sourced icons could possibly be added to the 64 mircexe icons...