PDA

View Full Version : Automatic text edit (for the people)



adam.88922
2005-09-09, 04:31 PM
Hello friends,

I have been working on a diesel funktion that is killing me.

This is the code:

*^C^C._ddedit;\;;$M=$(getvar,USERI1);setvar;USERI1;$(+,1,$(getvar,USERI1))

I would like to have the "$M=$(getvar,USERI1)" inserted in the text object, but this is the macro trace:
Translation from german: (Befehl: command, Anmerkungsobjekt: object, Unbekannter Befehl: unknown command)

-Begin Macro trace-

Befehl: ._ddedit

Anmerkungsobjekt wählen oder [Zurück]: (I select Object)
Anmerkungsobjekt wählen oder [Zurück]: (I hit esc.)

Befehl: Eval: $(GETVAR, USERI1)
===> 136
Eval: $(+, 1, $(getvar,USERI1))
Eval: $(GETVAR, USERI1)
===> 136
===> 137
136
Unbekannter Befehl "136". Drücken Sie F1-Taste für Hilfe.

Befehl: setvar
Variablenname eingeben oder [?] <USERI1>: USERI1

Neuen Wert für USERI1 eingeben <136>: 137
Befehl:

-end Macro trace-

Anyone know how I can get the "$M=$(getvar,USERI1)" in there?

Any help is greatly appreciated. As you can see, my USERI1 var is @ 137. So 137th try...
Reaching Hair-pullout mode...

Thanks,

Adam

P.S. LT 2006, so no vba or lisp :-(

Mike.Perry
2005-09-11, 05:15 PM
Hi

Try the following -


*^C^C_.Change;\;;;;;;$M=$(getvar,USERI1);_.Setvar;USERI1;$(+,1 ,$(getvar,USERI1))Have a good one, Mike

adam.88922
2005-09-11, 08:09 PM
Thank you very much, Mike. Hadn't thought about that approach yet.

As you can imagine, it worked.

Take care

Adam