On 8=A4=EB29=A4=E9, =A4=C8=AB=E17:45, wre <wre.gro...@[EMAIL PROTECTED]
> wrote:
> On Aug 27, 3:59 am, bu-bu <bedo...@[EMAIL PROTECTED]
> wrote:
>
> > ~ how to make a script resident in memory ?
> > i have a script that i want to use every time. I would like to make it
> > resident in memory, to avoid to click my buttons many times a day.
>
> If you want to run a script every few seconds you could do this.
>
> hiRegTimer( "yourfunction( \"your input\")" 10)
>
> I use this in a showproperties function which shows the w and l of
> the
> current selected transistor or resistor for example. I implemented
> a value input to start, stop or repeat the function. This enables
> you to stop it from repeat mode. Sample code to get the idea:
>
> procedure( wrShowProperties( @[EMAIL PROTECTED]
value instance)
>
> let( ( all internal vars ...)
>
> wrText =3D nil
> unless( boundp( 'wrShowPropertiesValue)
> wrShowPropertiesValue =3D "start"
> wrShowPropertiesTextPrev =3D ""
> )
>
> if( null( value) && null( instance)
> then
> if( wrShowPropertiesValue =3D=3D "repeat"
> then
> wrShowPropertiesValue =3D "stop"
> else
> wrShowPropertiesValue =3D "repeat"
> )
> )
>
> case( wrShowPropertiesValue
> ( "stop"
> wrText =3D "stopped"
> instancepointerPrev =3D nil
> )
> ( t
> ...
> code to get interesting properties to show
> ...
> if( wrShowPropertiesValue =3D=3D "repeat" && null( instance)
> then
> hiRegTimer( "wrShowProperties( \"repeat\")" 10)
> )
> if( wrShowPropertiesValue =3D=3D "stop"
> then
> wrText =3D "stopped"
> )
> )
> ) ;; case
> if( wrDecodeBindKeysText =3D=3D " Alt-q Alt-q"
> then
> wrTextStop =3D" (Alt-q to stop)"
> else
> wrTextStop =3D" (Alt-q Alt-q to stop)"
> )
> if( stringp( wrText) && wrText !=3D wrShowPropertiesTextPrev &&
> wrWriteModeTxt =3D=3D wrWriteModeTxtPrev
> then
> wrWindowName( strcat( wrWriteModeTxt "wrShowProperties: " wrText
> wrTextStop))
> wrShowPropertiesTextPrev =3D wrText
> )
> ) ;; let
> ;; test: wrShowProperties( )
> )
>
> see my blog for more details:http://relyveld.wordpress.com/
>
> Greetings, William.
Hello All,
thanks a lot for your answers. I will study the code you gave me :)
regards,
b.


|