|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I tried using /hadd -m table $date($did(41)) and got an entry like Wed Jan 17 2007
So I tried /hadd -m table $($date($did(41)),0) Which gave me $date($did(41))
I want to store in a hash table an entry like $date(ddd mmm dd yyyy) The format for the date is stored in a dialog edit box.
Basically it looks to me like I need to evaluate the information from the dialog ID, then stick the $date around it, and store that using $(,0)
However, when I tried that, I got exactly the same thing as in my original try (as shown at the top of this post)
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Try:
$date($did(41),ddd mmm dd yyyy)
Don't forget that you need an item name. Right now, your item name will be the first item (in this case, ddd).
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
The dialog ID 41 contains the format for the date per the users preference. Why do I need an item name? I'm using the $date function, which returns the current date in the format specified.
Using $date($did(41),ddd mmm dd yyyy) returns Wed Dec 31 1969, since $did(41) contains ddd mmm dd yyyy
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
Can you give an example of exactly what the dialog text box contains, and exactly what you want the hash table to contain after all commands are done. Example:
Dialog contains: aabbccdd Hash should contain: 11223344
-genius_at_work
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
OP
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Dialog contains: ddd mmm dd yyyy Hash item should return: $date(ddd mmm dd yyyy)
|
|
|
|
Joined: Oct 2005
Posts: 1,741
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
Ok, you should be able to do it like this:
/hadd table item $+($,date,$chr(40),$did(41),$chr(41))
-genius_at_work
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
hadd -m table <item> $!date( $did(41) )
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Exactly. Item names cannot have spaces and you must have one.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
|
|