Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.lang.javascript > #8103
| Path | csiph.com!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | Lino <lino@net.com> |
| Newsgroups | it.comp.lang.c++, it.comp.lang.javascript, microsoft.public.it.office.excel |
| Subject | Re: Problema script [restart thread] - Risolto - |
| Date | Thu, 24 Nov 2016 14:10:20 +0100 |
| Organization | Aioe.org NNTP Server |
| Lines | 75 |
| Message-ID | <mn.c3527e0bb0d94ed7.142705@net.com> (permalink) |
| References | <mn.bd797e0b5a0b24cc.142705@Kiss-the-Sphinx> |
| NNTP-Posting-Host | hPlHszvYrE9msYmsjUlyaw.user.gioia.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="utf-8"; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Complaints-To | abuse@aioe.org |
| X-Newsreader | MesNews/1.08.06.00-it |
| Face | iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUCAgI2MiZAsvKk1/Dxz pLx1Jrx3KTy57Tz9cfb7fPo8vPx9vP2+PP4+PP///8AAABAWc5lAAAAB3RJTUUH0wsIEyMtDwzr4gA AAd5JREFUeJx11Dtu20AQBuBf8VJaAyaREwgCTyCAF1gDq56F1zUrqmVHlyzZBq58BHVJm8p10qi3F 2AuwDNkZh8yKdoLCBLm4w5n9iGMPABk43yAPgP6vu+yBQxrI5dCsDIPiqDHNSQPWksnPu8qwGAUVg7 6joqQISeBpkRdPxkB/glKNINteMcCEKtSDqgZ/6a+i32IxycwdJIrIxhoIXyF4BAF0Uueizzfha4oG TqJjhNSOM8RgPJ0PIXTfaP4bozrIPlhSGI3YZcFGJqGypG4vSl4Qp5H2DRo21bidFMU+TSVh83d6dl DdoGWR5P+/uFgN16B/fniILvA+siQnv/cFnu4HiLUdX1sU/v6UmB/OQxUbbWuiNLz31NRLKGy6RuVl U0gKZOyrnG2BPtrwDpL7fvpOa6ey2SQlELB2vdf8Uj6bdSCZiQEFmYKQgsBcZ9aezbldgqK4lCWWjP lx0nkk6WVUJkQ9ISaAZho6ynnHHjQBGjMAAHcl5pU5SLK8xLi+BL0NVAPnwFwMBU+AaESU1fCFYF4D UZu7wBDGwLxnc/39mNJDpuO4NhAxrsWAEjMIx2H9ileqbjs+gvQiqGCh5iKF0sdSsBd8/Dn4beeIio cJLJLuS4Q+uKQ+/kf+4Ng9WQ79vEAAAAASUVORK5CYII= |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| Xref | csiph.com it.comp.lang.c++:4527 it.comp.lang.javascript:8103 microsoft.public.it.office.excel:53658 |
Cross-posted to 3 groups.
Show key headers only | View raw
Sembra che Lino abbia detto :
> il thread parte da qua (correggendo lo script in varie parti) prima ho
> fatto un po di confusione a scrivere
> ----------------------------------------------------------
> La domanda originaia era:
> Io avrei un database (in un software) di tanti simboli e lo script sopra da
> in modo di cambiare gli ultimi caratteri[A DESTRA] di un dato testo.
> Se volessi invece cambiarlo e fare in modo di cambiare i >>PRIMI<< (a
> sinistra) come potrei modificare lo script?
> Lo script con la parte modificata:
> [prima era : st.Ticker = StrLeft( ticker, Length-3)+"-TC";]
> Script
> -------------------------------------------
> AB = CreateObject("Broker.Application");
> sts = AB.Stocks();
> Qty = sts.Count;
> for( i = Qty - 1; i >= 0; i = i - 1 )
> {
> st = sts.Item( i );
> Ticker = st.Ticker;
> printf("changing " + Ticker + "\n" );
> Length = StrLen(Ticker );
> if( StrFind(Ticker, ".TO") )
> st.Ticker= "TO:"+StrRight(Ticker,Lenght+3);
> }
> ------------------------------------------------
> Lo script funziona parzialmente ma ci sono 2 problemi:
> (1.) cambia solo 1 simbolo alla vota (forse per un problema del ciclo FOR)
> (2.) Errore più grave:
> Esempio: Io ho i simboli [sotto] -----> e il risultato dato dallo script
> TO:A TC-T:A wrong
> TO:DE TC-:DE wrong
> TO:ASD TC-ASD OK OK OK OK
> TO:AXMA TC-XMA Wrong
> TO:ERJTT TC-JTT wrong
> ...
> ...
> etc..
> Io voglio modificare solo la parte che voglio (in questo caso "TO:")
> lasciando la parte rimamente così come era originariamente.
> spero di essere stato chiaro.
> Grazie per l'eventuale aiuto.
> Lino.
Risolto:
AB = CreateObject("Broker.Application");
sts = AB.Stocks();
Qty = sts.Count;
for( i = Qty - 1; i >= 0; i = i - 1 )
{
st = sts.Item( i );
Ticker = st.Ticker;
printf("changing " + Ticker + "\n" );
Length = StrLen(Ticker );
if( StrFind(Ticker, "BIT:") )
st.Ticker= StrReplace(st.Ticker, "BIT:", "IT_");
}
Back to it.comp.lang.javascript | Previous | Next — Previous in thread | Find similar
Problema script [restart thread] Lino <lino@net.com> - 2016-11-23 23:21 +0100 Re: Problema script [restart thread] - Risolto - Lino <lino@net.com> - 2016-11-24 14:10 +0100
csiph-web