|
gmueller Apprentice
Joined: 06 Apr 2004 Posts: 173
|
Posted: Mon Oct 11, 2004 3:30 am
temp trigger parsing question |
inside an alias i create a temp trigger that is supposed to look at the next line of text, and perform an option with it...but it seems to be parsing wierd and i cant fix it...any help would be appreciated.
#ALIAS where {#IF {"%1"="more"} {more} {#IF ("%1"="") {#ECHO WHERE FAILED};honors "%1";#TEMP {^(*).$} {where_name="~%1"}}}
Ex: where gilbert
this will create a new trigger that should be like:
#TEMP {^(*).$} {where_name="%1"}
but instead it creates:
#TEMP {^(*).$} {where_name="~"}
any help would be appreciated |
|
|
|
jessew Apprentice
Joined: 03 Mar 2003 Posts: 141
|
Posted: Mon Oct 11, 2004 5:56 am |
When you create the temporary trigger don't use ~%1 use %%1
That should do it
Cheers |
|
_________________ I love deadlines. I like the whooshing sound they make as they fly by. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Oct 11, 2004 3:12 pm |
It appears that you want to get %1 from the #TEMP trigger, but #ALIAS and #IF also use %1-%99 so I don't think your alias will work the way you intended. As it's written now,
'where more' will send 'more',
'where' will echo WHERE FAILED but send 'honors' and create a #TEMP trigger anyway
'where gilbert' will send 'honors gilbert' and create a #TEMP trigger
'where gilbert mueller' will also send 'honors gilbert' and create a #TEMP trigger
The #TEMP triggers will always set @where_name to "".
I suspect this is closer to what you actually intended:
#AL where {#VAR where_name "";#TEMP {(*).} {#IF ("%%1" = more) {more} {#IF ("%%1" = "") {#ECHO WHERE FAILED} {where_name = %%1}}};honors %1} |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
gmueller Apprentice
Joined: 06 Apr 2004 Posts: 173
|
Posted: Tue Oct 12, 2004 3:58 am |
i only had an outline of what i was coding...the thing im debuggin is the part i mentioned...
|
|
|
|
gmueller Apprentice
Joined: 06 Apr 2004 Posts: 173
|
Posted: Tue Oct 12, 2004 3:59 am |
thanks lightbulb for the suggestions though
|
|
|
|
|
|