topic
stringlengths
1
63
text
stringlengths
1
577k
AutoRun HTML !!!
Get ready to blow your mind... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> This code is a "loader" that automatically turns any HTML into a self-executable mod_harbour app... without having to install mod_harbour !!! autorun.html [img:11j3umux]https&#58;//github&#46;com/FiveTechSoft/screenshots/blob/master/autorun_modharbour&#46;JPG?raw=true[/img:11j3umux]
AutoRun HTML !!!
Dear Antonio, what do we use autorun for. Best regards Otto
AutoRun HTML !!!
You could save these pages in a place like GitHub or a host where there is no way to install mod_harbour, but using the auto loader, it connects to a remote "harbour server" and starts working <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> This opens the idea of providing "Harbour servers" for xbase development on the web
AutoSize oSay
Is there an autosize property in the say object? Thanks in advance Otto
AutoSize oSay
If you omit the SIZE clause then the SAY object is autosize. EMG
AutoSize oSay
How can I do this with workshop? regards, Otto
AutoSize oSay
You have to calculate the width of the text using GetTextWidth() function and then to use the Move() method to resize the SAY object. EMG
Autocad
Hola a todos. Creo recordar algo sobre una clase para manejar archivos de Autocad. ¿Alguien sabe algo de esto? En concreto necesito imprimir desde mi aplicación archivos DWG. Creo que con Autocad se puede hacer una conexión OLE, pero no todos los puestos desde donde se van a imprimir los planos tienen el Autocad. Estoy mirando VoloView y otras utilidades parecidas, pero de momento ando un poco perdido. Saludos
Autocad
Hola Sebastian: Tomado del foro anterior: Salu2Willi Hola Foro Aqui les tengo un cad completo hecjo con FWH pueden bajarlo de <!-- m --><a class="postlink" href="http://www.hechoenbolivia.com/quark">http://www.hechoenbolivia.com/quark</a><!-- m --> saludos Arturo Tamayo Daza
Autocad
Gracias Willi, le hecharé un vistazo. Saludos
Autocad
Hello Could you tell me how to display AutoCAD file type .DWG? I want to display .DWG into my Resource Dialog or windows? Thank you. Richard
Autocierre del programa
Alguien sabe si un programa fivewin puede autofinalizar pasado algun tiempo de no utilizarse. Mucha gente se olvida de cerrar su ordenador y puede perfectamente quedar varios dias con el programa y las bases de datos abiertas. el servidor depende de otro departamento y muchas veces cuando quiero desconectar los procesos tengo que llamarles y amenudo no les pillo puesto que funcionamos con turnos diferentes. Habia pensado en un timer, pero como se cuando el programa utiliza el ordenador o sencillamente existe la posibilidad de terminar el programa sin la colaboracion del usuario. Alguna idea?
Autocode
[img:2vf2n2mr]https&#58;//mybergland&#46;com/fwforum/button&#46;gif[/img:2vf2n2mr]
Autocode show
Hello, AUTOCODE visual editing of Fivewin classes. Best regards, Otto [url:580tvqp2]http&#58;//www&#46;bergland&#46;info/fw/Autocode&#46;mp4[/url:580tvqp2]
Autocode show
Otto, congratulations It is a wonder, great work
Autocode show
Cristobal, thank you. The sad thing about no one is using it. Best regards, Otto
Autocode show
Otto Where I downloaded the latest version?
Autocode show
Cristobal, please send me an email. otto [at-sign] atzwanger [.]com Best regards, Otto
Autocode show
Sent, thanks
Autocode show
Sent mail, thanks
Autocode show
Otto, Have considered to host it at bitbucket ? All FiveTech tools are stored there
Autocode show
This is really a wonderful tool. 1. It never gets obsolete, because it uses *.ch files in fwh\include folder. So it always helps us with the latest syntax. 2. We never go wrong or commit syntax errors if we use it. If we really start using it, it becomes an addiction.
Autocode show
Where can I get it? Does it work wit any editor?
Autocode show
Hello Otto; How are you? Will AutoCode work with resources? For example, this code does not seem to be understood by AutoCode: [code=fw:1qh7deqj]<div class="fw" id="{CB}" style="font-family: monospace;"><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> ::<span style="color: #000000;">oDlg</span> <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"Patient"</span> <span style="color: #0000ff;">TITLE</span> cTitle <span style="color: #0000ff;">OF</span> ::<span style="color: #000000;">oOwner</span> TRANSPARENT ;<br />      <span style="color: #0000ff;">COLOR</span> CLR_BLUE, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">240</span>,<span style="color: #000000;">240</span>,<span style="color: #000000;">240</span><span style="color: #000000;">&#41;</span> ;<br />        GRADIENT <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">1</span>, nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">217</span>, <span style="color: #000000;">227</span>, <span style="color: #000000;">234</span> <span style="color: #000000;">&#41;</span> , nRGB<span style="color: #000000;">&#40;</span> <span style="color: #000000;">237</span>, <span style="color: #000000;">242</span>, <span style="color: #000000;">248</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /> </div>[/code:1qh7deqj] Reinaldo.
Autocode show
Look [url=http&#58;//postimage&#46;org/:1fqksyur][img:1fqksyur]http&#58;//s27&#46;postimg&#46;org/d9ymk1h4z/Title230&#46;png[/img:1fqksyur][/url:1fqksyur]
Autocode show
Hey Cristóbal, I tried two different virtual windows machines. There must be some editor problems or configuration that I'm missing. It just doesn't work on my end but I'll keep searching see if I find what's wrong. Thank you, Reinaldo.
Autocompletar mail
Desde el sistema informático envío mail's. Tengo una casilla memo donde rellenan los destinatarios del correo. Estoy intentando diseñar la captura de los destinatarios al estilo outlook [url=http&#58;//imageshack&#46;us/photo/my-images/27/outlookp&#46;png/:3dne6cjx][img:3dne6cjx]http&#58;//img27&#46;imageshack&#46;us/img27/1222/outlookp&#46;png[/img:3dne6cjx][/url:3dne6cjx] Uploaded with [url=http&#58;//imageshack&#46;us:3dne6cjx]ImageShack.us[/url:3dne6cjx] Existe alguna posibilidad?, alguien a realizado algo parecido?
Autocompletar mail
Saludos fgondi; revisate [url:1m5eo8rx]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=21772&hilit=autocomplete[/url:1m5eo8rx] lo unico que veo distinto es seguir llenando en el get.
Autocompletar mail
Saludos, Muchas gracias. Ya había visto la clase AutoGet pero: 1.- Sirve para un Get no para un Memo (aunque se podría adaptar) 2.- No muestra una lista desplegable con la opciones. También he revisado de James Bott: [url:8aybdibo]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=22106&hilit=autoget[/url:8aybdibo] Que se acerca mas a lo que quiero. Pero esta opción no permitiría seguir llenando el get (mas de una captura en la misma casilla)
Autocomplete in tGet
Hi,I know that is question has been asked before, but is there a class for autocomplete like in Internet-Explorer. So you type something, and the autocomplete will be in blue-reverse.I use to have a class in FW16bit, but it doesn't work anymore in FWH.In that class I specified the get-field and an array with all the valid get-values.Thanks,Regards,Marc
Autocomplete in tGet
Mark,I found this class from Maurilio Viana[code:3la4taf0]// TAutoGet&#46;prg // Auto complete text in get features // By&#58; Maurilio Viana, mouri_ryo@hotmail&#46;com // Date&#58; 4/25/2007 // New features, bug fixes and enhancements are welcome &#58;-&#41; // Please, let me now when you include new features, bug fixes etc in this class // // ToDo&#58; Show drop down window with possible options when typing // /* Revisions 4/25/2007 10&#58;49AM by James Bott Method AutoFill&#58; nKey was not defined as a LOCAL&#46; Fixed&#46; Method AutoFill&#58; nLength was mispelled &#40;as nLenght&#41;&#46; Fixed&#46; Method AutoFill&#58; &#58;&#58;Cargo changed to &#58;&#58;lAuto &#40;see reason below&#41; Method AutoFill&#58; Changed to using vkey&#46;ch manifest constants instead of numbers&#46; Method Redefine&#58; Was passing aItems to the parent method &#40;not needed&#41;&#46; Method LostFocus&#58; Added this method&#46; Methos New&#40;&#41; and Redefine&#40;&#41;&#46; Was passing bChanged, and then &#58;&#58;bChange to parent&#46; Fixed&#46; It is not a good idea to use &#58;&#58;Cargo, &#58;&#58;bPostKey, or &#58;&#58;bLostFocus in the class since these then cannot be used by the programmer&#46; It would be better to subclass the needed methods and add whatever functionality needed&#46; So, &#58;&#58;Cargo and &#58;&#58;bLostFocus were eliminated&#46; Unfortuneately, not using &#58;&#58;bPostKey is somewhat of a challenge&#46; We can subclass KeyDown&#40;&#41; and KeyChar&#40;&#41; but some of each method will have to be copied into the new methods and thus if there are any changes to these sections of code in future versions of TGET, then this method in TAutoGet will have to be updated also&#46; Bug?&#58; If the items in &#58;&#58;aArray are in proper case, e&#46;g&#46; "Mauro," they are automatically converted to proper case when autofilled, however, if you backspace they are converted to all lower case&#46; */ #include "fivewin&#46;ch" //---------------------------------------------------------------------------// CLASS TAutoGet FROM TGet DATA aItems AS ARRAY DATA lAuto AS LOGICAL METHOD New&#40; nRow , nCol , bSetGet , oWnd , nWidth , nHeight,; cPict , bValid , nClrFore , nClrBack , oFont , lDesign,; oCursor , lPixel , cMsg , lUpdate , bWhen , lCenter,; lRight , bChanged, lReadOnly, lPassword, lNoBorder, nHelpID,; lSpinner, bUp , bDown , bMin , bMax , aItems &#41; CONSTRUCTOR METHOD ReDefine&#40; nID , bSetGet , oWnd , nHelpId , cPict, bValid ,; nClrFore, nClrBack, oFont , oCursor , cMsg , lUpdate,; bWhen , bChanged, lReadOnly, lSpinner, bUp , bDown ,; bMin , bMax, aItems &#41; CONSTRUCTOR METHOD SetItems&#40; aItems &#41; METHOD AutoFill&#40;&#41; METHOD LostFocus&#40; hWndGetFocus &#41; inline &#58;&#58;SetPos&#40;1&#41;, &#58;&#58;lAuto &#58;= Nil, &#58;&#58;super&#58;LostFocus&#40; hWndGetFocus &#41; END CLASS //---------------------------------------------------------------------------// METHOD New&#40;nRow , nCol , bSetGet , oWnd , nWidth , nHeight , cPict ,; bValid , nClrFore , nClrBack, oFont , lDesign, oCursor , lPixel ,; cMsg , lUpdate , bWhen , lCenter , lRight , bChanged, lReadOnly,; lPassword, lNoBorder, nHelpId , lSpinner, bUp , bDown , bMin ,; bMax , aItems&#41; CLASS TAutoGet local nLen, i Super&#58;New&#40;nRow , nCol , bSetGet , oWnd , nWidth , nHeight,; cPict , bValid , nClrFore , nClrBack , oFont , lDesign,; oCursor, lPixel , cMsg , lUpdate , bWhen , lCenter,; lRight , bChanged, lReadOnly, lPassword, lNoBorder, nHelpId,; lSpinner, bUp , bDown , bMin , bMax &#41; if&#40;aItems == Nil, aItems &#58;= &#123;&#125;, &#41; &#58;&#58;aItems &#58;= aItems &#58;&#58;bPostKey &#58;= &#123;|oGet, cBuffer| &#58;&#58;AutoFill&#40;&#41; &#125; return&#40; Self &#41; //---------------------------------------------------------------------------// METHOD ReDefine&#40;nID , bSetGet , oWnd , nHelpId, cPict , bValid, nClrFore,; nClrBack , oFont , oCursor, cMsg , lUpdate, bWhen , bChanged,; lReadOnly, lSpinner, bUp , bDown , bMin , bMax , aItems &#41; CLASS TAutoGet Super&#58;ReDefine&#40;nID , bSetGet , oWnd , nHelpId, cPict , bValid, nClrFore ,; nClrBack , oFont , oCursor, cMsg , lUpdate, bWhen , bChanged,; lReadOnly, lSpinner, bUp , bDown , bMin , bMax &#41; if&#40;aItems == Nil, aItems &#58;= &#123;&#125;, &#41; &#58;&#58;aItems &#58;= aItems &#58;&#58;bPostKey &#58;= &#123;|oGet, cBuffer| &#58;&#58;AutoFill&#40;&#41; &#125; return&#40; Self &#41; //---------------------------------------------------------------------------// // Set items of AutoGet //---------------------------------------------------------------------------// METHOD SetItems&#40; aItems &#41; CLASS TAutoGet if&#40;aItems == Nil, aItems &#58;= &#123;&#125;, &#41; &#58;&#58;aItems &#58;= aItems return&#40; Nil &#41; //---------------------------------------------------------------------------// // Auto fill text when typed based on aItems // Return&#58; Always returns &#46;T&#46; //---------------------------------------------------------------------------// METHOD AutoFill&#40;&#41; CLASS TAutoGet local nPosItem &#58;= 0 // Text position into &#58;&#58;aItems local nPosCursor &#58;= &#58;&#58;nPos // Current cursor position local nLength &#58;= len&#40;&#58;&#58;cText&#41; // Text length local cStartTxt &#58;= left&#40;&#58;&#58;cText, nPosCursor-1&#41; // Start text &#40;position 1 to cursor position -1&#41; local cItem &#58;= "" local nKey &#58;= 0 if len&#40;&#58;&#58;aItems&#41; = 0 // We have no items to search in this GET return&#40;&#46;T&#46;&#41; endif //------------------------------------------------------------------------- // We use &#58;&#58;lAuto to control when we must search in &#58;&#58;aItems for typed text // We must seek in &#58;&#58;aItems when GET is blank or when user clear it //------------------------------------------------------------------------- if valtype&#40;&#58;&#58;lAuto&#41; != "L" // Cargo isn't logical yet -> GET received focus now if ! empty&#40;&#58;&#58;Value&#41; // GET isn't empty &#58;&#58;lAuto &#58;= &#46;F&#46; // We don't use autofill else // GET is empty &#58;&#58;lAuto &#58;= &#46;T&#46; // Use autofill endif else // We are controlling if use or no autofill if empty&#40;&#58;&#58;Value&#41; // User could cleaned the GET text &#58;&#58;lAuto &#58;= &#46;T&#46; // Use autofill endif endif if ! &#58;&#58;lAuto // If don't control autofill return&#40;&#46;t&#46;&#41; endif nKey &#58;= &#58;&#58;nLastKey do case case nKey == VK_TAB &#46;or&#46; ; nKey == VK_RETURN &#46;or&#46; ; nKey == VK_DELETE &#58;&#58;Assign&#40;&#41; // Assign typed text case nKey >= 32 &#46;and&#46; nKey <= 256 FOR EACH cItem IN &#58;&#58;aItems nPosItem += 1 if ToUpper&#40; cItem &#41; = ToUpper&#40;cStartTxt&#41; nLength &#58;= len&#40; rtrim&#40; cItem &#41; &#41; cItem += space&#40; nLength - len&#40;cItem&#41; &#41; &#58;&#58;SetText&#40; cItem &#41; &#58;&#58;SetSel&#40; nPosCursor -1, nLength&#41; // Select found text &#58;&#58;oGet&#58;Buffer = Pad&#40; cItem, Len&#40; &#58;&#58;oGet&#58;Buffer &#41;&#41; // add by&#58;ss-bbs return&#40;&#46;t&#46;&#41; endif NEXT &#58;&#58;HideSel&#40;&#41; // Text not found -> Undo selected text endcase return&#40; &#46;T&#46; &#41; //---------------------------------------------------------------------------// // Convert latin characters to ANSI upper case // &#40;for some reason AnsiUpper causes a GPF with Commercial xHB&#41; //---------------------------------------------------------------------------// STATIC function ToUpper&#40; cString &#41; cString &#58;= upper&#40; cString &#41; cString &#58;= strtran&#40;strtran&#40;strtran&#40;strtran&#40;cString,"á","Á"&#41;,"à","À"&#41;,"ã","Ã"&#41;,"â","Â"&#41; cString &#58;= strtran&#40;strtran&#40;cString,"é","É"&#41;,"ê","Ê"&#41; cString &#58;= strtran&#40;cString,"í","Í"&#41; cString &#58;= strtran&#40;strtran&#40;strtran&#40;cString,"ó","Ó"&#41;,"õ","Õ"&#41;,"ô","Ô"&#41; cString &#58;= strtran&#40;strtran&#40;strtran&#40;cString,"ú","Ú"&#41;,"ñ","Ñ"&#41;,"ç","Ç"&#41; return&#40; cString &#41; //---------------------------------------------------------------------------// // --- EoF --- [/code:3la4taf0] [code:3la4taf0]/*----------------------------------------------------------------------------// !short&#58; AUTOGET */ #xcommand REDEFINE AUTOGET &#91; <oGet> VAR &#93; <uVar> ; &#91; ID <nId> &#93; ; &#91; <dlg&#58; OF, WINDOW, DIALOG> <oDlg> &#93; ; &#91; <help&#58;HELPID, HELP ID> <nHelpId> &#93; ; &#91; VALID <ValidFunc> &#93; ; &#91; <pict&#58; PICTURE, PICT> <cPict> &#93; ; &#91; <color&#58;COLOR,COLORS> <nClrFore> &#91;,<nClrBack>&#93; &#93; ; &#91; FONT <oFont> &#93; ; &#91; CURSOR <oCursor> &#93; ; &#91; MESSAGE <cMsg> &#93; ; &#91; <update&#58; UPDATE> &#93; ; &#91; WHEN <uWhen> &#93; ; &#91; ON CHANGE <uChange> &#93; ; &#91; <readonly&#58; READONLY, NO MODIFY> &#93; ; &#91; <spin&#58; SPINNER> &#91;ON UP <SpnUp>&#93; &#91;ON DOWN <SpnDn>&#93; &#91;MIN <Min>&#93; &#91;MAX <Max>&#93; &#93; ; &#91; ITEMS <aItems>&#93; ; => ; &#91; <oGet> &#58;= &#93; TAutoGet&#40;&#41;&#58;ReDefine&#40; <nId>, bSETGET&#40;<uVar>&#41;, <oDlg>,; <nHelpId>, <cPict>, <&#123;ValidFunc&#125;>, <nClrFore>, <nClrBack>,; <oFont>, <oCursor>, <cMsg>, &#46;T&#46;, <&#123;uWhen&#125;>,; &#91; \&#123;|nKey,nFlags,Self| <uChange> \&#125;&#93;, <&#46;readonly&#46;>,; <&#46;spin&#46;>, <&#123;SpnUp&#125;>, <&#123;SpnDn&#125;>, <&#123;Min&#125;>, <&#123;Max&#125;>, <aItems>&#41; #command @ <nRow>, <nCol> AUTOGET &#91; <oGet> VAR &#93; <uVar> ; &#91; <dlg&#58; OF, WINDOW, DIALOG> <oWnd> &#93; ; &#91; <pict&#58; PICTURE, PICT> <cPict> &#93; ; &#91; VALID <ValidFunc> &#93; ; &#91; <color&#58;COLOR,COLORS> <nClrFore> &#91;,<nClrBack>&#93; &#93; ; &#91; SIZE <nWidth>, <nHeight> &#93; ; &#91; FONT <oFont> &#93; ; &#91; <design&#58; DESIGN> &#93; ; &#91; CURSOR <oCursor> &#93; ; &#91; <pixel&#58; PIXEL> &#93; ; &#91; MESSAGE <cMsg> &#93; ; &#91; <update&#58; UPDATE> &#93; ; &#91; WHEN <uWhen> &#93; ; &#91; <lCenter&#58; CENTER, CENTERED> &#93; ; &#91; <lRight&#58; RIGHT> &#93; ; &#91; ON CHANGE <uChange> &#93; ; &#91; <readonly&#58; READONLY, NO MODIFY> &#93; ; &#91; <pass&#58; PASSWORD> &#93; ; &#91; <lNoBorder&#58; NO BORDER, NOBORDER> &#93; ; &#91; <help&#58;HELPID, HELP ID> <nHelpId> &#93; ; &#91; ITEMS <aItems>&#93; ; => ; &#91; <oGet> &#58;= &#93; TAutoGet&#40;&#41;&#58;New&#40; <nRow>, <nCol>, bSETGET&#40;<uVar>&#41;,; &#91;<oWnd>&#93;, <nWidth>, <nHeight>, <cPict>, <&#123;ValidFunc&#125;>,; <nClrFore>, <nClrBack>, <oFont>, <&#46;design&#46;>,; <oCursor>, <&#46;pixel&#46;>, <cMsg>, &#46;T&#46;, <&#123;uWhen&#125;>,; <&#46;lCenter&#46;>, <&#46;lRight&#46;>,; &#91;\&#123;|nKey, nFlags, Self| <uChange>\&#125;&#93;, <&#46;readonly&#46;>,; <&#46;pass&#46;>, &#91;<&#46;lNoBorder&#46;>&#93;, <nHelpId>,,,,,,<aItems> &#41; #command @ <nRow>, <nCol> AUTOGET &#91; <oGet> VAR &#93; <uVar> ; &#91; <dlg&#58; OF, WINDOW, DIALOG> <oWnd> &#93; ; &#91; <pict&#58; PICTURE, PICT> <cPict> &#93; ; &#91; VALID <ValidFunc> &#93; ; &#91; <color&#58;COLOR,COLORS> <nClrFore> &#91;,<nClrBack>&#93; &#93; ; &#91; SIZE <nWidth>, <nHeight> &#93; ; &#91; FONT <oFont> &#93; ; &#91; <design&#58; DESIGN> &#93; ; &#91; CURSOR <oCursor> &#93; ; &#91; <pixel&#58; PIXEL> &#93; ; &#91; MESSAGE <cMsg> &#93; ; &#91; <update&#58; UPDATE> &#93; ; &#91; WHEN <uWhen> &#93; ; &#91; <lCenter&#58; CENTER, CENTERED> &#93; ; &#91; <lRight&#58; RIGHT> &#93; ; &#91; ON CHANGE <uChange> &#93; ; &#91; <readonly&#58; READONLY, NO MODIFY> &#93; ; &#91; <help&#58;HELPID, HELP ID> <nHelpId> &#93; ; &#91; <spin&#58; SPINNER> &#91;ON UP <SpnUp>&#93; &#91;ON DOWN <SpnDn>&#93; &#91;MIN <Min>&#93; &#91;MAX <Max>&#93; &#93; ; &#91; ITEMS <aItems>&#93; ; => ; &#91; <oGet> &#58;= &#93; TAutoGet&#40;&#41;&#58;New&#40; <nRow>, <nCol>, bSETGET&#40;<uVar>&#41;,; &#91;<oWnd>&#93;, <nWidth>, <nHeight>, <cPict>, <&#123;ValidFunc&#125;>,; <nClrFore>, <nClrBack>, <oFont>, <&#46;design&#46;>,; <oCursor>, <&#46;pixel&#46;>, <cMsg>, &#46;T&#46;, <&#123;uWhen&#125;>,; <&#46;lCenter&#46;>, <&#46;lRight&#46;>,; &#91;\&#123;|nKey, nFlags, Self| <uChange>\&#125;&#93;, <&#46;readonly&#46;>,; &#46;f&#46;, &#46;f&#46;, <nHelpId>,; <&#46;spin&#46;>, <&#123;SpnUp&#125;>, <&#123;SpnDn&#125;>, <&#123;Min&#125;>, <&#123;Max&#125;>, <aItems> &#41; [/code:3la4taf0]
Autocomplete in tGet
Thanks stefan,I will try it.Regards,Marc
Autocomplete widget (similar FW combobox)
Hello friends, The jQuery UI Autocomplete widget enables users to quickly find and select from a list of values as they type. If you find the jQuery UI Autocomplete demos and documentation too daunting, here are some examples with explanation to get you started. <!-- m --><a class="postlink" href="https://salman-w.blogspot.com/2013/12/jquery-ui-autocomplete-examples.html">https://salman-w.blogspot.com/2013/12/j ... mples.html</a><!-- m --> We took the demo[u:1di06f8r] using-label-value-pairs.html[/u:1di06f8r]. The data is loaded into the WIDGET using a JSON. [img:1di06f8r]https&#58;//mybergland&#46;com/fwforum/autocompletedata&#46;jpg[/img:1di06f8r] We now read the data from a DBF file into a string and pass this string to HTML. There, we assign the string to a JSON object. [img:1di06f8r]https&#58;//mybergland&#46;com/fwforum/dbf2jsonstring&#46;jpg[/img:1di06f8r] Here you can see the result. Best regards, Otto [img:1di06f8r]https&#58;//mybergland&#46;com/fwforum/autocomplete_collapse&#46;gif[/img:1di06f8r]
Autofill get from first chatacter
Hello, Next code did work with previous versions from fw , now it fails : [code:2pc7jotk] #include "FiveWin&#46;ch" function Main&#40;&#41; LOCAL oDlg , butok LOCAL cCad &#58;= " " DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION @ 1, 2 SAY "Text&#46;&#46;&#58;" OF oDlg @ 1, 6 GET oGet VAR cCad OF oDlg SIZE 60, 10 COLOR "W/G" PICTURE "@K" ; ON CHANGE VulGetAan&#40;oGet , &#123;"E","P"&#125; , &#123;"e-mail","Pakjes"&#125; , ButOk&#41;//tracelog&#40;oGet&#91;3&#93;&#58;nLastKey &#41; @ 3, 7 BUTTON ButOk PROMPT "&Ok" OF oDlg SIZE 30, 12 ACTION oDlg&#58;End&#40;&#41; @ 3, 16 BUTTON "&Cancel" SIZE 30, 12 OF oDlg ACTION oDlg&#58;End&#40;&#41; CANCEL ACTIVATE DIALOG oDlg CENTERED return nil //------------------------------------------------------------------------// PROC VulGetAan&#40;oGet, ArrCode , ArrVal , ButOk&#41; ********************************************** LOCAL x &#58;= CHR&#40;oGet&#58;nLastKey&#41; , i IF x == CHR&#40;13&#41; ButOk&#58;setFocus&#40;&#41; END tracelog&#40;x , oGet&#58;nPos&#41; IF oGet&#58;nPos > 1 RETURN END IF &#40; i &#58;= ASCAN&#40;ArrCode , x&#41; &#41; > 0 oGet&#58;oGet&#58;Buffer &#58;= ArrVal&#91;i&#93; oGet&#58;Assign&#40;&#41; oGet&#58;Refresh&#40;&#41; END RETURN [/code:2pc7jotk] It seems that now oGet:nPos starts with 2 , changing IF oGet:nPos > 1 in oGet:nPos > 2 Then it works Another problem is that the cursor remains on position 1 , i can't move it to the next position. I tryed with oGet:Setpos(3) , oGet:npos := oGet:oGet:npos := 3 , ...... Frank
Autoget Error in FW May 2014 and June 2014
When I try testage5.prg I have this error Error description: Error BASE/1004 No exported method: EVAL Args: [ 1] = U Stack Calls =========== Called from: => (b)EVAL( 0 ) Called from: .\source\classes\AUTOGET.PRG => (b)TGETLIST( 312 ) Called from: .\source\classes\AUTOGET.PRG => TGETLIST:KEYCOUNT( 0 ) Called from: .\source\classes\AUTOGET.PRG => TAUTOGET:CREATELIST( 159 ) Called from: .\source\classes\AUTOGET.PRG => TAUTOGET:OPENLIST( 271 ) Called from: .\source\classes\AUTOGET.PRG => (b)TAUTOGET( 54 ) Called from: .\source\classes\AUTOGET.PRG => TAUTOGET:KEYCHAR( 0 ) Called from: => TWINDOW:HANDLEEVENT( 0 ) Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1733 ) Called from: .\source\classes\TGET.PRG => TAUTOGET:HANDLEEVENT( 589 ) Called from: .\source\classes\WINDOW.PRG => _FWH( 3279 ) Called from: => DIALOGBOXINDIRECT( 0 ) Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 277 ) Called from: TESTAGE5.prg => MAIN( 42 ) Regards Maurizio
Autoget Error in FW May 2014 and June 2014
Maurizio, Please try this change in Class TAutoGet: METHOD KeyCount() INLINE If( ! Empty( ::bKeyCount ), Eval( ::bKeyCount ), 0 )
Autoget Error in FW May 2014 and June 2014
Antonio, now no error , but doesn't work , when I press a letter nothing happens . Thank Maurizio <!-- w --><a class="postlink" href="http://www.nipeservice.com">www.nipeservice.com</a><!-- w -->
Autoget Error in FW May 2014 and June 2014
Maurizio, Class TAutoGet has been developed by Daniel García Gil, I am going to ask him, thanks
Autoget Error in FW May 2014 and June 2014
Hello the integration with DBF is not implemented yet, the sample testage5.prg didn't should be distributed until finish the DBF integration, please use an array or hash instead of DBF sorry my mistake
Autoget Error in FW May 2014 and June 2014
Hello Daniel, Was testage5.prg ever completed? Has anybody got an example of a wild seek using DBFCDX? Regards David
Autoget Error in FW May 2014 and June 2014
Till integration with DBF is completed by Mr Daniel, we can use this sample to use DBF [code=fw:35oi1v4a]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"autoget.ch"</span><br /><br />REQUEST DBFCDX<br /><br /><span style="color: #00C800;">static</span> lSeekWild := .t.<br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;field FIRST<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oGet, cName, cName1, cName2<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oRs, &nbsp;cAlias := <span style="color: #ff0000;">"CUST"</span><br />&nbsp; &nbsp;cName := space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;USE CUSTOMER <span style="color: #00C800;">NEW</span> <span style="color: #0000ff;">ALIAS</span> CUST SHARED VIA <span style="color: #ff0000;">'DBFCDX'</span><br />&nbsp; &nbsp;<span style="color: #0000ff;">INDEX</span> <span style="color: #0000ff;">ON</span> UPPER<span style="color: #000000;">&#40;</span>FIRST<span style="color: #000000;">&#41;</span> TAG FIRST1 <span style="color: #0000ff;">TO</span> TMP MEMORY<br />&nbsp; &nbsp;SET ORDER <span style="color: #0000ff;">TO</span> TAG FIRST1<br />&nbsp; &nbsp;GO TOP<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> oDlg <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Test Autoget"</span> <span style="color: #0000ff;">size</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">480</span> <span style="color: #0000ff;">pixel</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span> autoget oGet <span style="color: #0000ff;">var</span> cName <span style="color: #0000ff;">of</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DATASOURCE <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FILTER CUST-><span style="color: #000000;">&#40;</span> ListFilter1<span style="color: #000000;">&#40;</span> uDataSource, cData, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COLUMN <span style="color: #000000;">1</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;HEIGHTLIST <span style="color: #000000;">100</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">3</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"ok"</span> <span style="color: #0000ff;">OF</span> odlg <span style="color: #0000ff;">ACTION</span> msgalert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Get 1:"</span>+cName<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;@ <span style="color: #000000;">3</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">BUTTON</span> <span style="color: #ff0000;">"close"</span> <span style="color: #0000ff;">OF</span> odlg <span style="color: #0000ff;">ACTION</span> odlg:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">dialog</span> oDlg <span style="color: #0000ff;">centered</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// match case without case sensitive</span><br /><span style="color: #00C800;">function</span> ListFilter1<span style="color: #000000;">&#40;</span> aList, cData, oSelf <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aNewList := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cFor &nbsp; &nbsp; := Upper<span style="color: #000000;">&#40;</span> AllTrim<span style="color: #000000;">&#40;</span> cData <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> bFor<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> lSeekWild<br />&nbsp; &nbsp; &nbsp; cFor &nbsp; &nbsp; := <span style="color: #ff0000;">'"'</span> + cFor + <span style="color: #ff0000;">'" $ UPPER(FIRST)'</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; cFor &nbsp; &nbsp; := <span style="color: #ff0000;">'UPPER(FIRST)="'</span> + cFor + <span style="color: #ff0000;">'"'</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;bFor &nbsp; &nbsp; := &<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"{ ||"</span> + cFor + <span style="color: #ff0000;">"}"</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;aNewList &nbsp; &nbsp;:= FW_DbfToArray<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"FIRST"</span>, bFor <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> aNewList<br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br />&nbsp;</div>[/code:35oi1v4a] You may toggle static variable lSeekWild as .T. or .F.
Autoget de Daniel G. Gil
Hola, Estoy sustituyendo la clase Autoget de Maurilio Viana por la de Daniel G. Gil, y me parece que esta última es mucho más potente. Hay una funcionalidad que me gustaría añadir, que al pulsar space apareciera el desplegable con todos los posibles valores del campo. Si alguien lo ha hecho agradecería que explicara la manera de conseguirlo. Saludos, José Luis
Autoget de Daniel G. Gil
José luis, estoy implementando esta clase y me gustaría cambiar el font de la lista. Alguna idea ?. Muchas gracias.
Autoget desde Recursos
[quote="nageswaragunupudi":1ffierh4][quote:1ffierh4]Mr. NAG, I have not yet defined the xBrowse, if I could put a sample of both options or which one would recommend me? Is for a billing and the data entry will be in an ARRAY and the data source of a MYSQL table ... greetings, thanks ... Shock Google translator: Mr. NAG, I have not yet defined the xBrowse, if I could Put a sample of both options or which one would you recommend me? Is it a billing and the data entry will be in ARRAY and the data source of MYSQL table ... greetings, thanks ...Shock [/quote:1ffierh4] Please look into mariainv.prg in this link <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=33908&p=201499&hilit=mariainv.prg#p201499">viewtopic.php?f=3&t=33908&p=201499&hilit=mariainv.prg#p201499</a><!-- l -->[/quote:1ffierh4] Saludos... nageswaragunupudi escribió: joseluisysturiz escribió: Se puede usar algo como el autoget en una edicion de celda en un xBrowse.? si es asi, algun sample...saludos...gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> Use EDIT_LISTBOX or EDIT_GET_LISTBOX Mr. NAG, aun no he definido el xBrowse, si podria colocar un sample de ambas opciones o cual me recomendaria.? es para una facturacion y la entrada de datos sera en un ARRAY y el origen de los datos de una tabla MYSQL...saludos, gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> Google translator: Mr. NAG, I have not yet defined the xBrowse, if I could put a sample of both options or which one would recommend me? Is for a billing and the data entry will be in an ARRAY and the data source of a MYSQL table ... greetings, thanks... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Autoget desde Recursos
Hola a todos, tengo el siguiente problema con la clase Autoget, defininiendola desde recursos, cuando se tiene extendida la lista asociada, y se pasa el mouse por ella, se pintan los controles que están bajo la lista, una imagen explica mas: [url:3ja7e4u2]https&#58;//app&#46;box&#46;com/s/fwpi8xil1lxmhcsz5xyd65xow26aocxy[/url:3ja7e4u2] No se si estoy haciendo algo mal Saludos Marcelo Vía
Autoget desde Recursos
[quote="Marcelo Via Giglio":lwveuw11]Hola a todos, tengo el siguiente problema con la clase Autoget, defininiendola desde recursos, cuando se tiene extendida la lista asociada, y se pasa el mouse por ella, se pintan los controles que están bajo la lista, una imagen explica mas: [url:lwveuw11]https&#58;//app&#46;box&#46;com/s/fwpi8xil1lxmhcsz5xyd65xow26aocxy[/url:lwveuw11] No se si estoy haciendo algo mal Saludos Marcelo Vía[/quote:lwveuw11] Saludos, no he usado esta clase, es mas, no la conocia, podrias colocar una pantalla de como se ve y como definir el recurso.? es decir un pequeño sample de su uso ya que aun no le veo la funcionalidad, no se si sera algo que ando buscando que es que cuando vaya escribriendo en el GET, me de despliegue como en GOOGLE, las palabras que coincidere voy a escribir, pero imagino eso habria que hacerlo desde un disccionario o desde una tabla que tenga bastante datos, en mi caso lo quiero para buscar coincidencia en busqueda de clientes o de articulos.. y la otra consulta es...se puede usar esta clase con DATASOURCE de MySql.? saludos, gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Autoget desde Recursos
Hola, en la carpeta de samples existen ejemplo todos los testaget.... pero todos los ejemplos son sin recursos Y la fuente de datos puede ser la que quieras, tu defines como filtrar y la fuente Saludos Marcelo Vía
Autoget desde Recursos
Estimados Existe alguna solución para el problema reportado en este chat al usar la clase Autoget desde recursos (estoy probando con FH1706). La característica de esta clase me parece muy interesante y útil, debería completarse el desarrollo. Saludos Fernando Espinoza A.
Autoget desde Recursos
Buen dia, hay algun ejemplo simples para testes? Gracias, saludos.
Autoget desde Recursos
Karinha Aquí un ejemplo para que pruebe; primero el recurso [quote:2zt284el] // RESOURCE SCRIPT generated by "Pelles C for Windows, version 7.00". #include <windows.h> #include <commctrl.h> #include <richedit.h> LANGUAGE LANG_SPANISH,SUBLANG_SPANISH_ECUADOR AUTOGET DIALOGEX DISCARDABLE 6, 18, 210, 142 STYLE DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_CONTEXTHELP|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE CAPTION "Dialog" FONT 8, "Tahoma", 0, 0, 1 { CONTROL "", 101, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 12, 8, 84, 12 CONTROL "OK", IDOK, "Button", WS_TABSTOP, 160, 5, 45, 15 CONTROL "Cancel", IDCANCEL, "Button", WS_TABSTOP, 160, 23, 45, 15 } [/quote:2zt284el] Y el .prg sería este: [quote:2zt284el] #include "FiveWin.ch" #include "AutoGet.ch" static aCountries := {; {"Afghanistan", 'AF'},; {"Åland Islands", 'AX'},; {"Albania", 'AL'},; {"Algeria", 'DZ'},; {"American Samoa", 'AS'},; {"AndorrA", 'AD'},; {"Angola", 'AO'},; {"Anguilla", 'AI'},; {"Antarctica", 'AQ'},; {"Antigua and Barbuda", 'AG'},; {"Argentina", 'AR'},; {"Armenia", 'AM'},; {"Aruba", 'AW'},; {"Australia", 'AU'},; {"Austria", 'AT'},; {"Azerbaijan", 'AZ'},; {"Bahamas", 'BS'},; {"Bahrain", 'BH'},; {"Bangladesh", 'BD'},; {"Barbados", 'BB'},; {"Belarus", 'BY'},; {"Belgium", 'BE'},; {"Belize", 'BZ'},; {"Benin", 'BJ'},; {"Bermuda", 'BM'},; {"Bhutan", 'BT'},; {"Bolivia", 'BO'},; {"Bosnia and Herzegovina", 'BA'},; {"Botswana", 'BW'},; {"Bouvet Island", 'BV'},; {"Brazil", 'BR'},; {"British Indian Ocean Territory", 'IO'},; {"Brunei Darussalam", 'BN'},; {"Bulgaria", 'BG'},; {"Burkina Faso", 'BF'},; {"Burundi", 'BI'},; {"Cambodia", 'KH'},; {"Cameroon", 'CM'},; {"Canada", 'CA'},; {"Cape Verde", 'CV'},; {"Cayman Islands", 'KY'},; {"Central African Republic", 'CF'},; {"Chad", 'TD'},; {"Chile", 'CL'},; {"China", 'CN'},; {"Christmas Island", 'CX'},; {"Cocos (Keeling) Islands", 'CC'},; {"Colombia", 'CO'},; {"Comoros", 'KM'},; {"Congo", 'CG'},; {"Congo, The Democratic Republic of the", 'CD'},; {"Cook Islands", 'CK'},; {"Costa Rica", 'CR'},; {"Cote D'Ivoire", 'CI'},; {"Croatia", 'HR'},; {"Cuba", 'CU'},; {"Cyprus", 'CY'},; {"Czech Republic", 'CZ'},; {"Denmark", 'DK'} } Function Main() LOCAL oDlg, oGet, cName:=Space(20), oBtn1, oBtn2 DEFINE DIALOG oDlg TITLE "Prueba del Augo-Get de FW1706" RESOURCE "AUTOGET" REDEFINE AUTOGET oGet var cName of oDlg ID 101 ; DATASOURCE aCountries; FILTER ListFilter1( uDataSource, cData, Self ); COLUMN 1 ; HEIGHTLIST 100 REDEFINE BUTTON oBtn1 OF oDlg ID 1 ACTION MsgAlert("Get 1:"+cName) REDEFINE BUTTON oBtn2 OF oDlg ID 2 ACTION oDlg:end() ACTIVATE DIALOG oDlg CENTERED Return nil //---------------------------------------------------------------------------// // match case without case sensitive Function ListFilter1( aList, cData, oSelf ) Local aNewList := { } Local uItem For each uItem in oSelf:uOrgData If Lower( SubStr( uItem[ 1 ], 1, Len( cData ) ) ) == Lower( cData ) AAdd( aNewList, uItem ) Endif Next RETURN aNewList [/quote:2zt284el] Saludos Fernando Espinoza A.
Autoget desde Recursos
Perfecto! Gracias. [img:2o9kwarb]http&#58;//i&#46;imgur&#46;com/i1Qvx1R&#46;png[/img:2o9kwarb] Saludos.
Autoget desde Recursos
Cambios: [code=fw:2vltc7cx]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// RESOURCE SCRIPT generated by "Pelles C for Windows, version 7.00".</span><br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><br />LANGUAGE LANG_FRENCH,SUBLANG_FRENCH<br /><br />AUTOGET DIALOGEX DISCARDABLE <span style="color: #000000;">6</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">210</span>, <span style="color: #000000;">142</span><br /><span style="color: #0000ff;">STYLE</span> WS_POPUP|WS_CAPTION|WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"AutoGet Test"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"Tahoma"</span><br /><span style="color: #000000;">&#123;</span><br />CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">12</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">12</span><br />CONTROL <span style="color: #ff0000;">"OK"</span>, IDOK, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">160</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">15</span><br />CONTROL <span style="color: #ff0000;">"Cancel"</span>, IDCANCEL, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">160</span>, <span style="color: #000000;">23</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">15</span><br /><span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:2vltc7cx] [code=fw:2vltc7cx]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"AutoGet.ch"</span><br /><br /><span style="color: #00C800;">static</span> aCountries := <span style="color: #000000;">&#123;</span>;<br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Afghanistan"</span>, <span style="color: #ff0000;">'AF'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Åland Islands"</span>, <span style="color: #ff0000;">'AX'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Albania"</span>, <span style="color: #ff0000;">'AL'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Algeria"</span>, <span style="color: #ff0000;">'DZ'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"American Samoa"</span>, <span style="color: #ff0000;">'AS'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"AndorrA"</span>, <span style="color: #ff0000;">'AD'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Angola"</span>, <span style="color: #ff0000;">'AO'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Anguilla"</span>, <span style="color: #ff0000;">'AI'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Antarctica"</span>, <span style="color: #ff0000;">'AQ'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Antigua and Barbuda"</span>, <span style="color: #ff0000;">'AG'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Argentina"</span>, <span style="color: #ff0000;">'AR'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Armenia"</span>, <span style="color: #ff0000;">'AM'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Aruba"</span>, <span style="color: #ff0000;">'AW'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Australia"</span>, <span style="color: #ff0000;">'AU'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Austria"</span>, <span style="color: #ff0000;">'AT'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Azerbaijan"</span>, <span style="color: #ff0000;">'AZ'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bahamas"</span>, <span style="color: #ff0000;">'BS'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bahrain"</span>, <span style="color: #ff0000;">'BH'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bangladesh"</span>, <span style="color: #ff0000;">'BD'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Barbados"</span>, <span style="color: #ff0000;">'BB'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Belarus"</span>, <span style="color: #ff0000;">'BY'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Belgium"</span>, <span style="color: #ff0000;">'BE'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Belize"</span>, <span style="color: #ff0000;">'BZ'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Benin"</span>, <span style="color: #ff0000;">'BJ'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bermuda"</span>, <span style="color: #ff0000;">'BM'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bhutan"</span>, <span style="color: #ff0000;">'BT'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bolivia"</span>, <span style="color: #ff0000;">'BO'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bosnia and Herzegovina"</span>, <span style="color: #ff0000;">'BA'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Botswana"</span>, <span style="color: #ff0000;">'BW'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bouvet Island"</span>, <span style="color: #ff0000;">'BV'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Brazil"</span>, <span style="color: #ff0000;">'BR'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"British Indian Ocean Territory"</span>, <span style="color: #ff0000;">'IO'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Brunei Darussalam"</span>, <span style="color: #ff0000;">'BN'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bulgaria"</span>, <span style="color: #ff0000;">'BG'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Burkina Faso"</span>, <span style="color: #ff0000;">'BF'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Burundi"</span>, <span style="color: #ff0000;">'BI'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cambodia"</span>, <span style="color: #ff0000;">'KH'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cameroon"</span>, <span style="color: #ff0000;">'CM'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Canada"</span>, <span style="color: #ff0000;">'CA'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cape Verde"</span>, <span style="color: #ff0000;">'CV'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cayman Islands"</span>, <span style="color: #ff0000;">'KY'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Central African Republic"</span>, <span style="color: #ff0000;">'CF'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Chad"</span>, <span style="color: #ff0000;">'TD'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Chile"</span>, <span style="color: #ff0000;">'CL'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"China"</span>, <span style="color: #ff0000;">'CN'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Christmas Island"</span>, <span style="color: #ff0000;">'CX'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cocos (Keeling) Islands"</span>, <span style="color: #ff0000;">'CC'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Colombia"</span>, <span style="color: #ff0000;">'CO'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Comoros"</span>, <span style="color: #ff0000;">'KM'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Congo"</span>, <span style="color: #ff0000;">'CG'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Congo, The Democratic Republic of the"</span>, <span style="color: #ff0000;">'CD'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cook Islands"</span>, <span style="color: #ff0000;">'CK'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Costa Rica"</span>, <span style="color: #ff0000;">'CR'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cote D'Ivoire"</span>, <span style="color: #ff0000;">'CI'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Croatia"</span>, <span style="color: #ff0000;">'HR'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cuba"</span>, <span style="color: #ff0000;">'CU'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cyprus"</span>, <span style="color: #ff0000;">'CY'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Czech Republic"</span>, <span style="color: #ff0000;">'CZ'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Denmark"</span>, <span style="color: #ff0000;">'DK'</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oGet, cName:=Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span>, oBtn1, oBtn2, oFont<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-12</span> BOLD<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Prueba del Augo-Get de FW1701"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"AUTOGET"</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLORS CLR_WHITE, CLR_MAGENTA<br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> AUTOGET oGet <span style="color: #0000ff;">var</span> cName <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DATASOURCE aCountries &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FILTER ListFilter1<span style="color: #000000;">&#40;</span> uDataSource, cData, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLUMN <span style="color: #000000;">1</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEIGHTLIST <span style="color: #000000;">100</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLORS CLR_BLACK, CLR_YELLOW<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">1</span> <span style="color: #0000ff;">OF</span> oDlg &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> MsgAlert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Get 1:"</span>+cName<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oBtn1:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Autoget con Recurso esta perfecto"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">2</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CANCEL<br /><br />&nbsp; &nbsp;oBtn2:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Salir - Exit"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// match case without case sensitive</span><br /><span style="color: #00C800;">Function</span> ListFilter1<span style="color: #000000;">&#40;</span> aList, cData, oSelf <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> aNewList := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> uItem<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">For</span> each uItem in oSelf:<span style="color: #000000;">uOrgData</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> Lower<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> uItem<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">1</span>, Len<span style="color: #000000;">&#40;</span> cData <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == Lower<span style="color: #000000;">&#40;</span> cData <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> aNewList, uItem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Next</span><br /><br /><span style="color: #00C800;">RETURN</span> aNewList<br />&nbsp;</div>[/code:2vltc7cx] Saludos.
Autoget desde Recursos
Holas, autoget da un comportamiento raro, cuando se aplica WindowsXP.Manifest modificando el ejemplo: [code=fw:11l7icp0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><br />LANGUAGE LANG_FRENCH,SUBLANG_FRENCH<br /><br />AUTOGET DIALOGEX DISCARDABLE <span style="color: #000000;">6</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">210</span>, <span style="color: #000000;">142</span><br /><span style="color: #0000ff;">STYLE</span> WS_POPUP|WS_CAPTION|WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"AutoGet Test"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"Tahoma"</span><br /><span style="color: #000000;">&#123;</span><br />CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">12</span>, &nbsp;<span style="color: #000000;">8</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">12</span><br />CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">102</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">12</span>, <span style="color: #000000;">22</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">22</span><br />CONTROL <span style="color: #ff0000;">"OK"</span>, IDOK, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">160</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">15</span><br />CONTROL <span style="color: #ff0000;">"Cancel"</span>, IDCANCEL, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">160</span>, <span style="color: #000000;">23</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">15</span><br /><span style="color: #000000;">&#125;</span><br />&nbsp;<br /><span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"WindowsXP.Manifest"</span><br /><br />&nbsp;</div>[/code:11l7icp0] [code=fw:11l7icp0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"AutoGet.ch"</span><br /><br /><span style="color: #00C800;">static</span> aCountries := <span style="color: #000000;">&#123;</span>;<br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Afghanistan"</span>, <span style="color: #ff0000;">'AF'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Åland Islands"</span>, <span style="color: #ff0000;">'AX'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Albania"</span>, <span style="color: #ff0000;">'AL'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Algeria"</span>, <span style="color: #ff0000;">'DZ'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"American Samoa"</span>, <span style="color: #ff0000;">'AS'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"AndorrA"</span>, <span style="color: #ff0000;">'AD'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Angola"</span>, <span style="color: #ff0000;">'AO'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Anguilla"</span>, <span style="color: #ff0000;">'AI'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Antarctica"</span>, <span style="color: #ff0000;">'AQ'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Antigua and Barbuda"</span>, <span style="color: #ff0000;">'AG'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Argentina"</span>, <span style="color: #ff0000;">'AR'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Armenia"</span>, <span style="color: #ff0000;">'AM'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Aruba"</span>, <span style="color: #ff0000;">'AW'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Australia"</span>, <span style="color: #ff0000;">'AU'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Austria"</span>, <span style="color: #ff0000;">'AT'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Azerbaijan"</span>, <span style="color: #ff0000;">'AZ'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bahamas"</span>, <span style="color: #ff0000;">'BS'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bahrain"</span>, <span style="color: #ff0000;">'BH'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bangladesh"</span>, <span style="color: #ff0000;">'BD'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Barbados"</span>, <span style="color: #ff0000;">'BB'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Belarus"</span>, <span style="color: #ff0000;">'BY'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Belgium"</span>, <span style="color: #ff0000;">'BE'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Belize"</span>, <span style="color: #ff0000;">'BZ'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Benin"</span>, <span style="color: #ff0000;">'BJ'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bermuda"</span>, <span style="color: #ff0000;">'BM'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bhutan"</span>, <span style="color: #ff0000;">'BT'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bolivia"</span>, <span style="color: #ff0000;">'BO'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bosnia and Herzegovina"</span>, <span style="color: #ff0000;">'BA'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Botswana"</span>, <span style="color: #ff0000;">'BW'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bouvet Island"</span>, <span style="color: #ff0000;">'BV'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Brazil"</span>, <span style="color: #ff0000;">'BR'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"British Indian Ocean Territory"</span>, <span style="color: #ff0000;">'IO'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Brunei Darussalam"</span>, <span style="color: #ff0000;">'BN'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Bulgaria"</span>, <span style="color: #ff0000;">'BG'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Burkina Faso"</span>, <span style="color: #ff0000;">'BF'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Burundi"</span>, <span style="color: #ff0000;">'BI'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cambodia"</span>, <span style="color: #ff0000;">'KH'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cameroon"</span>, <span style="color: #ff0000;">'CM'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Canada"</span>, <span style="color: #ff0000;">'CA'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cape Verde"</span>, <span style="color: #ff0000;">'CV'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cayman Islands"</span>, <span style="color: #ff0000;">'KY'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Central African Republic"</span>, <span style="color: #ff0000;">'CF'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Chad"</span>, <span style="color: #ff0000;">'TD'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Chile"</span>, <span style="color: #ff0000;">'CL'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"China"</span>, <span style="color: #ff0000;">'CN'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Christmas Island"</span>, <span style="color: #ff0000;">'CX'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cocos (Keeling) Islands"</span>, <span style="color: #ff0000;">'CC'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Colombia"</span>, <span style="color: #ff0000;">'CO'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Comoros"</span>, <span style="color: #ff0000;">'KM'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Congo"</span>, <span style="color: #ff0000;">'CG'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Congo, The Democratic Republic of the"</span>, <span style="color: #ff0000;">'CD'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cook Islands"</span>, <span style="color: #ff0000;">'CK'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Costa Rica"</span>, <span style="color: #ff0000;">'CR'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cote D'Ivoire"</span>, <span style="color: #ff0000;">'CI'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Croatia"</span>, <span style="color: #ff0000;">'HR'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cuba"</span>, <span style="color: #ff0000;">'CU'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Cyprus"</span>, <span style="color: #ff0000;">'CY'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Czech Republic"</span>, <span style="color: #ff0000;">'CZ'</span><span style="color: #000000;">&#125;</span>,; <br /><span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"Denmark"</span>, <span style="color: #ff0000;">'DK'</span><span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oGet, cName:=Space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span>, oBtn1, oBtn2, oFont<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-12</span> BOLD<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Prueba del Augo-Get de FW1701"</span> ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"AUTOGET"</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLORS CLR_WHITE, CLR_MAGENTA<br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> AUTOGET oGet <span style="color: #0000ff;">var</span> cName <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">ID</span> <span style="color: #000000;">101</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DATASOURCE aCountries &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FILTER ListFilter1<span style="color: #000000;">&#40;</span> uDataSource, cData, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLUMN <span style="color: #000000;">1</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEIGHTLIST <span style="color: #000000;">100</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLORS CLR_BLACK, CLR_YELLOW<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> AUTOGET oGet <span style="color: #0000ff;">var</span> cName <span style="color: #0000ff;">of</span> oDlg <span style="color: #0000ff;">ID</span> <span style="color: #000000;">102</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DATASOURCE aCountries &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FILTER ListFilter1<span style="color: #000000;">&#40;</span> uDataSource, cData, <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span> &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLUMN <span style="color: #000000;">1</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HEIGHTLIST <span style="color: #000000;">100</span> <span style="color: #0000ff;">FONT</span> oFont &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; COLORS CLR_BLACK, CLR_YELLOW<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">1</span> <span style="color: #0000ff;">OF</span> oDlg &nbsp;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span> MsgAlert<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Get 1:"</span>+cName<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oBtn1:<span style="color: #000000;">cToolTip</span> := <span style="color: #ff0000;">"Autoget con Recurso esta perfecto"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">2</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">end</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> CANCEL<br /><br />&nbsp; &nbsp;oBtn2:<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Salir - Exit"</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br />&nbsp; &nbsp;oFont:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// match case without case sensitive</span><br /><span style="color: #00C800;">Function</span> ListFilter1<span style="color: #000000;">&#40;</span> aList, cData, oSelf <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> aNewList := <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">Local</span> uItem<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">For</span> each uItem in oSelf:<span style="color: #000000;">uOrgData</span><br /><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">If</span> Lower<span style="color: #000000;">&#40;</span> <span style="color: #0000ff;">SubStr</span><span style="color: #000000;">&#40;</span> uItem<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>, <span style="color: #000000;">1</span>, Len<span style="color: #000000;">&#40;</span> cData <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> == Lower<span style="color: #000000;">&#40;</span> cData <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;AAdd<span style="color: #000000;">&#40;</span> aNewList, uItem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">Endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Next</span><br /><br /><span style="color: #00C800;">RETURN</span> aNewList</div>[/code:11l7icp0] Al abrir la primera lista y pasar el mouse por ella, se muestran los controles debajo de la misma [url:11l7icp0]https&#58;//app&#46;box&#46;com/s/kvm64tfe9sxmbmy3zi7216zm93d4smio[/url:11l7icp0] Bueno debo aclarar que estoy utiizando FWH15.08 Salidos cordiales Marcelo Vía
Autoget desde Recursos
Marcelo, Intenta ahora: [code=fw:nlb8ovhb]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// RESOURCE SCRIPT generated by "Pelles C for Windows, version 7.00".</span><br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><br />#ifndef __64__<br />&nbsp; &nbsp;<span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"./WinXP/WindowsXP.Manifest"</span><br />#endif<br /><br />#ifdef __64__<br />&nbsp; &nbsp;<span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"WinXP/WindowsXP.Manifest64"</span><br />#endif<br /><br />LANGUAGE LANG_FRENCH,SUBLANG_FRENCH<br /><br />AUTOGET DIALOGEX DISCARDABLE <span style="color: #000000;">6</span>, <span style="color: #000000;">18</span>, <span style="color: #000000;">210</span>, <span style="color: #000000;">142</span><br /><span style="color: #0000ff;">STYLE</span> WS_POPUP|WS_CAPTION|WS_SYSMENU<br />CAPTION <span style="color: #ff0000;">"AutoGet Test"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"Tahoma"</span><br /><span style="color: #000000;">&#123;</span><br />CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">12</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">84</span>, <span style="color: #000000;">12</span><br />CONTROL <span style="color: #ff0000;">"OK"</span>, IDOK, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">160</span>, <span style="color: #000000;">5</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">15</span><br />CONTROL <span style="color: #ff0000;">"Cancel"</span>, IDCANCEL, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">160</span>, <span style="color: #000000;">23</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">15</span><br /><span style="color: #000000;">&#125;</span><br />&nbsp;</div>[/code:nlb8ovhb] Saludos.
Autoget desde Recursos
[img:3frkrtsj]http&#58;//i&#46;imgur&#46;com/WMRlbJO&#46;png[/img:3frkrtsj] Saludos.
Autoget desde Recursos
João, prueba aumentando un get abajo del autoget, cuando se despliega la lista, mueve el mouse por la lista y veras que se muestra el otro get sobre la lista Saludos Marcelo Vía
Autoget desde Recursos
És verdad Marcelo usted está correcto. Saludos.
Autoget desde Recursos
Se puede usar algo como el autoget en una edicion de celda en un xBrowse.? si es asi, algun sample...saludos...gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Autoget desde Recursos
[quote="joseluisysturiz":2jwci7bx]Se puede usar algo como el autoget en una edicion de celda en un xBrowse.? si es asi, algun sample...saludos...gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->[/quote:2jwci7bx] Use EDIT_LISTBOX or EDIT_GET_LISTBOX
Autoget desde Recursos
[quote="nageswaragunupudi":2hsdmfly][quote="joseluisysturiz":2hsdmfly]Se puede usar algo como el autoget en una edicion de celda en un xBrowse.? si es asi, algun sample...saludos...gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->[/quote:2hsdmfly] Use EDIT_LISTBOX or EDIT_GET_LISTBOX[/quote:2hsdmfly] Mr. NAG, aun no he definido el xBrowse, si podria colocar un sample de ambas opciones o cual me recomendaria.? es para una facturacion y la entrada de datos sera en un ARRAY y el origen de los datos de una tabla MYSQL...saludos, gracias... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> Google translator: Mr. NAG, I have not yet defined the xBrowse, if I could put a sample of both options or which one would recommend me? Is for a billing and the data entry will be in an ARRAY and the data source of a MYSQL table ... greetings, thanks... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
Autoget desde Recursos
[quote="Marcelo Via Giglio":2yak6x70]João, prueba aumentando un get abajo del autoget, cuando se despliega la lista, mueve el mouse por la lista y veras que se muestra el otro get sobre la lista Saludos Marcelo Vía[/quote:2yak6x70] Complementando lo que indica Marcelo; aparte de lo indicado, sucede que cuando vuelves a un AutoGet luego de haber seleccionado un valor, borras el contenido inicial y quieres seleccionar un nuevo elemento diferente de la lista, ya no te aparece el cuadro con las coincidencias. Además, me gustaría conocer si es que el array fuente de DATASOURCE pueda ser unidimensional (ese era realmente el problema que tenía inicialmente, por lo cual no funcionaba bien la clase). Saludos Fernando Espínoza A.
Autoget desde Recursos
[quote:ooxi7jly]Mr. NAG, I have not yet defined the xBrowse, if I could put a sample of both options or which one would recommend me? Is for a billing and the data entry will be in an ARRAY and the data source of a MYSQL table ... greetings, thanks ... Shock Google translator: Mr. NAG, I have not yet defined the xBrowse, if I could Put a sample of both options or which one would you recommend me? Is it a billing and the data entry will be in ARRAY and the data source of MYSQL table ... greetings, thanks ...Shock [/quote:ooxi7jly] Please look into mariainv.prg in this link <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=33908&p=201499&hilit=mariainv.prg#p201499">viewtopic.php?f=3&t=33908&p=201499&hilit=mariainv.prg#p201499</a><!-- l -->
Autoget from Daniel G. Gil
Hola, I'm moving from Autoget by Maurilio Viana to autoget by Daniel G. Gil, and I think that the lastest is more powerful. I want to add a feature, when pressing the space key the class shows the list with all the possible values for the field. If anybody has done this, please explan how to do it. Regads, José Luis
Autoget from Daniel G. Gil
Dear Members I would like to know if this class is working well from resources, I am trying to make it work with FWH1706 and I get some error messages. If possible with an example. Regards
Autoget from Daniel G. Gil
Hello, AutoGet Class works fine. I've an old FWH version in which autoget is included and works fine from resources. Yo have several samples in the samples folder. Regards,
Autoget from Daniel G. Gil
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=34359">viewtopic.php?f=6&t=34359</a><!-- l -->
Autoget from Daniel G. Gil
Estimado José Luis Podrías poner un ejemplo usando recursos, estoy probando con la FW1706 y me presenta errores, uno es identico a lo que detalla José Luis Isturiz en el enlace previo. Saludos Fernando Espinoza A.
Autoget test
Can I use autoget with Tget features ? sample x,y AUTOGET ..... Items aNombres ..... BITMAPS "bnt" Action List_nombres() Regards
Autoget test
Silvio, Welcome back to the forums. Lets see this time how it goes... <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
Autoget test
ok Antonio Have you an Idea for this ? [b:19m0qqe5]Not run !![/b:19m0qqe5] I ask also to Maurilio but this guy not work with fwh from 2008 #include "fivewin.ch" #include "TAutoGet.ch" function AutoGet() local oDlg, oGet, cName, aNames cName := space(20) aNames := {"Mauro", "Mauricio", "Maurilio", "Maurizio"} define dialog oDlg title "Test Autoget" @ 2,2 autoget oGet var cName of oDlg items aNames SIZE 130,10 [b:19m0qqe5] oGet:cBmpName:="search.bmp" oGet:bAction:= { | o | MsgInfo( o:GetText() ) } oGet:lAdjustBtn :=.t.[/b:19m0qqe5] activate dialog oDlg centered return nil
Autoget test
Silvio, I don't know what it is AUTOGET, it is not part of FiveWin. Where is it ? Whom does it belong ?
Autoget test
the class i in this forum <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=21772&hilit=autoget">viewtopic.php?f=3&t=21772&hilit=autoget</a><!-- l --> the author is Maurilio Vania [code=fw:wflwaf4r]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"autoget.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #00C800;">FUNCTION</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">LOCAL</span> oDlg, oGet1, cName1, oGet2, cName2, aNames, lOk := .F.<br /><br />&nbsp; &nbsp;cName &nbsp; &nbsp;:= space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cCity &nbsp; &nbsp;:= space<span style="color: #000000;">&#40;</span><span style="color: #000000;">20</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// aCities &nbsp;:= {}</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// aNames &nbsp; := {"RAmeSh", "rAmA rAo", "rAmDev", "rAM kUMAR", "raMADevi", "ramanA"}</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// aCities &nbsp;:= {"HYDERABAD", "SECUNDERABAD", "VIJAYAWADA", "VISAKHAPATNAM", "WARANGAL", "TIRUPATHI"}</span><br />&nbsp; &nbsp;REQUEST DBFCDX<br />&nbsp; &nbsp;rddsetdefault<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"dbfcdx"</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;REQUEST DBFFPT<br />&nbsp; &nbsp;USE CUSTOMER SHARED <span style="color: #00C800;">NEW</span> <br />&nbsp; &nbsp;<span style="color: #0000ff;">index</span> <span style="color: #0000ff;">on</span> field->FIRST &nbsp;TAG I_TEMP &nbsp;<span style="color: #0000ff;">TO</span> TEMP &nbsp;TEMPORARY<br />&nbsp; &nbsp;<span style="color: #0000ff;">XBROWSE</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;dbgotop<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test Autoget"</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//@ 1.2,1.2 SAY oSay1 PROMPT "Enter Name" oF oDlg</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//@ 1.4,5.1 AUTOGET oGet1 VAR cName OF oDlg SIZE 110,12 ITEMS aNames &nbsp;CASE CUPPER &nbsp;ADD ITEMS</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">2.1</span>,<span style="color: #000000;">1.2</span> <span style="color: #0000ff;">SAY</span> oSay1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Enter City"</span> <span style="color: #0000ff;">OF</span> oDlg<br />&nbsp; &nbsp;@ <span style="color: #000000;">2.4</span>,<span style="color: #000000;">5.1</span> AUTOGET oGet2 <span style="color: #0000ff;">VAR</span> cCity <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">110</span>,<span style="color: #000000;">12</span> &nbsp;<span style="color: #00C800;">CASE</span> CPROPER <span style="color: #B900B9;">//ADD ITEMS</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">3.0</span>,<span style="color: #000000;">19</span> &nbsp;<span style="color: #0000ff;">BUTTON</span> oOk <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"&Finish"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">35</span>,<span style="color: #000000;">12</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>lOk := .T., oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br /><br /><br /><br /><br /><br /><span style="color: #B900B9;">// TAutoGet.prg</span><br /><span style="color: #B900B9;">// Auto complete text in get features</span><br /><span style="color: #B900B9;">// By: Maurilio Viana, <!-- e --><a href="mailto:mouri_ryo@hotmail.com">mouri_ryo@hotmail.com</a><!-- e --></span><br /><span style="color: #B900B9;">// Date: 4/25/2007</span><br /><span style="color: #B900B9;">// New features, bug fixes and enhancements are welcome :-)</span><br /><span style="color: #B900B9;">// Please, let me now when you include new features, bug fixes etc in this class</span><br /><span style="color: #B900B9;">//</span><br /><span style="color: #B900B9;">// ToDo: Show drop down window with possible options when typing</span><br /><span style="color: #B900B9;">//</span><br /><br /><span style="color: #B900B9;">/* Revisions 4/25/2007 10:49AM by James Bott<br />Method AutoFill: nKey was not defined as a LOCAL. Fixed.<br />Method AutoFill: nLength was mispelled (as nLenght). Fixed.<br />Method AutoFill: ::Cargo changed to ::lAuto (see reason below)<br />Method AutoFill: Changed to using vkey.ch manifest constants instead of numbers.<br />Method Redefine: Was passing aItems to the parent method (not needed).<br />Method LostFocus: Added this method.<br />Methos New() and Redefine(). Was passing bChanged, and then ::bChange to parent. Fixed.<br />Functin Proper() &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;was added by RAMESH BABU P on 19-06-2011<br />DATA nCase &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;was added by RAMESH BABU P on 19-06-2011<br />DATA lAddNewItems &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; was added by RAMESH BABU P on 20-06-2011<br />FUNCTION AddNewItem(aItems,cText) was added by RAMESH BABU P on 20-06-2011<br /><br />It is not a good idea to use ::Cargo, ::bPostKey, or ::bLostFocus in the class since these<br />then cannot be used by the programmer. It would be better to subclass the needed methods and add<br />whatever functionality needed. So, ::Cargo and ::bLostFocus were eliminated.<br /><br />Unfortuneately, not using ::bPostKey is somewhat of a challenge. We can subclass KeyDown() and<br />KeyChar() but some of each method will have to be copied into the new methods and thus if there<br />are any changes to these sections of code in future versions of TGET, then this method in<br />TAutoGet will have to be updated also.<br /><br />Bug?: If the items in ::aArray are in proper case, e.g. "Mauro," they are automatically converted<br />to proper case when autofilled, however, if you backspace they are converted to all lower case.<br /><br />*/</span><br /><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> TAutoGet <span style="color: #0000ff;">FROM</span> TGet<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> aItems AS ARRAY<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> lAuto AS LOGICAL<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> nCase AS NUMERIC <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">3</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// 1 UPPER CASE, 2 lower case, 3 Proper Case - Added by RAMESH BABU P</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> lAddNewItems AS LOGICAL <span style="color: #0000ff;">INIT</span> .T. &nbsp;<span style="color: #B900B9;">// .T. to Add New Items to aItems, .F. Don't Add - Added by RAMESH BABU P</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> cAlias<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> nRow &nbsp; &nbsp;, nCol &nbsp; &nbsp;, bSetGet &nbsp;, oWnd &nbsp; &nbsp; , nWidth &nbsp; , nHeight,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cPict &nbsp; , bValid &nbsp;, nClrFore , nClrBack , oFont &nbsp; &nbsp;, lDesign,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCursor , lPixel &nbsp;, cMsg &nbsp; &nbsp; , lUpdate &nbsp;, bWhen &nbsp; &nbsp;, lCenter,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lRight &nbsp;, bChanged, lReadOnly, lPassword, lNoBorder, nHelpID,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lSpinner, bUp &nbsp; &nbsp; , bDown &nbsp; &nbsp;, bMin &nbsp; &nbsp; , bMax &nbsp; &nbsp; , aItems ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nCase &nbsp; , lAddNewItems<span style="color: #000000;">&#41;</span> CONSTRUCTOR<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span> nID &nbsp; &nbsp; , bSetGet , oWnd &nbsp; &nbsp; , nHelpId , cPict, bValid ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nClrFore, nClrBack, oFont &nbsp; &nbsp;, oCursor , cMsg , lUpdate,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bWhen &nbsp; , bChanged, lReadOnly, lSpinner, bUp &nbsp;, bDown &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bMin &nbsp; &nbsp;, bMax, aItems, nCase, lAddNewItems <span style="color: #000000;">&#41;</span> CONSTRUCTOR<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> SetItems<span style="color: #000000;">&#40;</span> aItems <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AutoFill<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> Autoseek<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> LostFocus<span style="color: #000000;">&#40;</span> hWndGetFocus <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">inline</span> ::<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span>, ::<span style="color: #000000;">lAuto</span> := .T., <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span>::<span style="color: #000000;">lAddNewItems</span>,AddNewItem<span style="color: #000000;">&#40;</span>@::<span style="color: #000000;">aItems</span>,::<span style="color: #000000;">cText</span><span style="color: #000000;">&#41;</span>,<span style="color: #000000;">&#41;</span> ,::<span style="color: #00C800;">super</span>:<span style="color: #000000;">LostFocus</span><span style="color: #000000;">&#40;</span> hWndGetFocus <span style="color: #000000;">&#41;</span><br /><br />END <span style="color: #00C800;">CLASS</span><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span>nRow &nbsp; &nbsp; , nCol &nbsp; &nbsp; , bSetGet , oWnd &nbsp; &nbsp;, nWidth , nHeight , cPict &nbsp; &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bValid &nbsp; , nClrFore , nClrBack, oFont &nbsp; , lDesign, oCursor , lPixel &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cMsg &nbsp; &nbsp; , lUpdate &nbsp;, bWhen &nbsp; , lCenter , lRight , bChanged, lReadOnly,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lPassword, lNoBorder, nHelpId , lSpinner, bUp &nbsp; &nbsp;, bDown &nbsp; , bMin &nbsp; &nbsp; ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bMax &nbsp; &nbsp; , aItems, &nbsp;nCase, lAddNewItems<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAutoGet<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nLen, i<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> nCase := <span style="color: #000000;">3</span>, lAddNewItems := .T.<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Super</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span>nRow &nbsp; , nCol &nbsp; &nbsp;, bSetGet &nbsp;, oWnd &nbsp; &nbsp; , nWidth &nbsp; , nHeight,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cPict &nbsp;, bValid &nbsp;, nClrFore , nClrBack , oFont &nbsp; &nbsp;, lDesign,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oCursor, lPixel &nbsp;, cMsg &nbsp; &nbsp; , lUpdate &nbsp;, bWhen &nbsp; &nbsp;, lCenter,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lRight , bChanged, lReadOnly, lPassword, lNoBorder, nHelpId,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lSpinner, bUp &nbsp; &nbsp;, bDown &nbsp; &nbsp;, bMin &nbsp; &nbsp; , bMax <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>aItems == <span style="color: #00C800;">Nil</span>, aItems := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">nCase</span> &nbsp; &nbsp; &nbsp; &nbsp;:= nCase &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Added by RAMESH BABU P</span><br />&nbsp; &nbsp;::<span style="color: #000000;">lAddNewItems</span> := lAddNewItems &nbsp; &nbsp;<span style="color: #B900B9;">// Added by RAMESH BABU P</span><br />&nbsp; &nbsp;::<span style="color: #000000;">aItems</span> &nbsp; &nbsp; &nbsp; := aItems<br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//::bPostKey := {|oGet, cBuffer| ::AutoFill()}</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;::<span style="color: #000000;">bPostKey</span> := <span style="color: #000000;">&#123;</span>|oGet, cBuffer| ::<span style="color: #000000;">Autoseek</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span>nID &nbsp; &nbsp; &nbsp;, bSetGet , oWnd &nbsp; , nHelpId, cPict &nbsp;, bValid, nClrFore,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nClrBack , oFont &nbsp; , oCursor, cMsg &nbsp; , lUpdate, bWhen , bChanged,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lReadOnly, lSpinner, bUp &nbsp; &nbsp;, bDown &nbsp;, bMin &nbsp; , bMax &nbsp;, aItems &nbsp;,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nCase, lAddNewItems <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAutoGet<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DEFAULT</span> nCase := <span style="color: #000000;">3</span>, lAddNewItems := .T.<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">Super</span>:<span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">&#40;</span>nID &nbsp; &nbsp; &nbsp;, bSetGet , oWnd &nbsp; , nHelpId, cPict &nbsp;, bValid, nClrFore ,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nClrBack , oFont &nbsp; , oCursor, cMsg &nbsp; , lUpdate, bWhen , bChanged,;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lReadOnly, lSpinner, bUp &nbsp; &nbsp;, bDown &nbsp;, bMin &nbsp; , bMax &nbsp;<span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>aItems == <span style="color: #00C800;">Nil</span>, aItems := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;::<span style="color: #000000;">nCase</span> &nbsp; &nbsp; &nbsp; &nbsp;:= nCase<br />&nbsp; &nbsp;::<span style="color: #000000;">lAddNewItems</span> := lAddNewItems<br />&nbsp; &nbsp;::<span style="color: #000000;">aItems</span> &nbsp; &nbsp; &nbsp; := aItems<br /><br />&nbsp; &nbsp;::<span style="color: #000000;">bPostKey</span> := <span style="color: #000000;">&#123;</span>|oGet, cBuffer| ::<span style="color: #000000;">AutoFill</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Self</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// Set items of AutoGet</span><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> SetItems<span style="color: #000000;">&#40;</span> aItems <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAutoGet<br />&nbsp; &nbsp;<span style="color: #00C800;">if</span><span style="color: #000000;">&#40;</span>aItems == <span style="color: #00C800;">Nil</span>, aItems := <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>, <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;::<span style="color: #000000;">aItems</span> &nbsp; := aItems<br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">Nil</span> <span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">METHOD</span> AutoSeek<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAutoGet<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nPosItem &nbsp; := <span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Text position into ::aItems</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nPosCursor := ::<span style="color: #000000;">nPos</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Current cursor position</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nLength &nbsp; &nbsp;:= len<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cText</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Text length</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cStartTxt &nbsp;:= <span style="color: #0000ff;">left</span><span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cText</span>, nPosCursor<span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Start text (position 1 to cursor position -1)</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cItem &nbsp; &nbsp; &nbsp;:= <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nKey &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//-------------------------------------------------------------------------</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// We use ::lAuto to control when we must search in ::aItems for typed text</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// We must seek in ::aItems when GET is blank or when user clear it</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//-------------------------------------------------------------------------</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> valtype<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">lAuto</span><span style="color: #000000;">&#41;</span> != <span style="color: #ff0000;">"L"</span> <span style="color: #B900B9;">// Cargo isn't logical yet -> GET received focus now</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ! empty<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// GET isn't empty</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">lAuto</span> := .F. &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// We don't use autofill</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// GET is empty</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">lAuto</span> := .T. &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Use autofill</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// We are controlling if use or no autofill</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> empty<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// User could cleaned the GET text</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">lAuto</span> := .T. &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Use autofill</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lAuto</span> &nbsp; &nbsp;<span style="color: #B900B9;">// If don't control autofill</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span>.t.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;nKey := ::<span style="color: #000000;">nLastKey</span><br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nKey == VK_TAB .or. ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nKey == VK_RETURN .or. ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nKey == VK_DELETE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">Assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Assign typed text</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nKey >= <span style="color: #000000;">32</span> .and. nKey <= <span style="color: #000000;">256</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dbseek<span style="color: #000000;">&#40;</span>cStartTxt,.t.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cItem := field->FIRST <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> &nbsp;cItem = ToUpper<span style="color: #000000;">&#40;</span>cStartTxt, ::<span style="color: #000000;">nCase</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// ADDED &nbsp; BY RAMESH BABU P on 19-06-2011</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLength := len<span style="color: #000000;">&#40;</span> rtrim<span style="color: #000000;">&#40;</span> cItem <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cItem &nbsp; += space<span style="color: #000000;">&#40;</span> nLength - len<span style="color: #000000;">&#40;</span>cItem<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> cItem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">SetSel</span><span style="color: #000000;">&#40;</span> nPosCursor <span style="color: #000000;">-1</span>, nLength<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Select found text</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Buffer</span> = Pad<span style="color: #000000;">&#40;</span> cItem, Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Buffer</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// add by:ss-bbs</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span>.t.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">HideSel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">// Text not found -> Undo selected text</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endcase</span><br /><br /><span style="color: #00C800;">Return</span> .t. <br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// Auto fill text when typed based on aItems</span><br /><span style="color: #B900B9;">// Return: Always returns .T.</span><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> AutoFill<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TAutoGet<br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nPosItem &nbsp; := <span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Text position into ::aItems</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nPosCursor := ::<span style="color: #000000;">nPos</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Current cursor position</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nLength &nbsp; &nbsp;:= len<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cText</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// Text length</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cStartTxt &nbsp;:= <span style="color: #0000ff;">left</span><span style="color: #000000;">&#40;</span>::<span style="color: #000000;">cText</span>, nPosCursor<span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Start text (position 1 to cursor position -1)</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> cItem &nbsp; &nbsp; &nbsp;:= <span style="color: #ff0000;">""</span><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> nKey &nbsp; &nbsp; &nbsp; := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> len<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">aItems</span><span style="color: #000000;">&#41;</span> = <span style="color: #000000;">0</span> &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// We have no items to search in this GET</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span>.T.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #B900B9;">//-------------------------------------------------------------------------</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// We use ::lAuto to control when we must search in ::aItems for typed text</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">// We must seek in ::aItems when GET is blank or when user clear it</span><br />&nbsp; &nbsp;<span style="color: #B900B9;">//-------------------------------------------------------------------------</span><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> valtype<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">lAuto</span><span style="color: #000000;">&#41;</span> != <span style="color: #ff0000;">"L"</span> <span style="color: #B900B9;">// Cargo isn't logical yet -> GET received focus now</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> ! empty<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; <span style="color: #B900B9;">// GET isn't empty</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">lAuto</span> := .F. &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// We don't use autofill</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">else</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// GET is empty</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">lAuto</span> := .T. &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Use autofill</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// We are controlling if use or no autofill</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> empty<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">Value</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// User could cleaned the GET text</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">lAuto</span> := .T. &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Use autofill</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lAuto</span> &nbsp; &nbsp;<span style="color: #B900B9;">// If don't control autofill</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span>.t.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;nKey := ::<span style="color: #000000;">nLastKey</span><br />&nbsp; &nbsp;<span style="color: #00C800;">do</span> <span style="color: #00C800;">case</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nKey == VK_TAB .or. ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nKey == VK_RETURN .or. ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nKey == VK_DELETE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">Assign</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">// Assign typed text</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">case</span> nKey >= <span style="color: #000000;">32</span> .and. nKey <= <span style="color: #000000;">256</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">FOR</span> EACH cItem IN ::<span style="color: #000000;">aItems</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nPosItem += <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #B900B9;">//if &nbsp;ToUpper( cItem ) &nbsp;= ToUpper( cStartTxt ) &nbsp; // REMOVED BY RAMESH BABU P on 19-06-2011</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cItem := ToUpper<span style="color: #000000;">&#40;</span> cItem,::<span style="color: #000000;">nCase</span> <span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// ADDED &nbsp; BY RAMESH BABU P on 19-06-2011</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">if</span> &nbsp;cItem = ToUpper<span style="color: #000000;">&#40;</span>cStartTxt, ::<span style="color: #000000;">nCase</span><span style="color: #000000;">&#41;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #B900B9;">// ADDED &nbsp; BY RAMESH BABU P on 19-06-2011</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nLength := len<span style="color: #000000;">&#40;</span> rtrim<span style="color: #000000;">&#40;</span> cItem <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cItem &nbsp; += space<span style="color: #000000;">&#40;</span> nLength - len<span style="color: #000000;">&#40;</span>cItem<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">SetText</span><span style="color: #000000;">&#40;</span> cItem <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">SetSel</span><span style="color: #000000;">&#40;</span> nPosCursor <span style="color: #000000;">-1</span>, nLength<span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// Select found text</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Buffer</span> = Pad<span style="color: #000000;">&#40;</span> cItem, Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">oGet</span>:<span style="color: #000000;">Buffer</span> <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// add by:ss-bbs</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span>.t.<span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">NEXT</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;::<span style="color: #000000;">HideSel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> &nbsp; <span style="color: #B900B9;">// Text not found -> Undo selected text</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endcase</span><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> .T. <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// Convert latin characters to ANSI upper case</span><br /><span style="color: #B900B9;">// (for some reason AnsiUpper causes a GPF with Commercial xHB)</span><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">function</span> ToUpper<span style="color: #000000;">&#40;</span> cString, nCase <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nCase = <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; cString := lower<span style="color: #000000;">&#40;</span> cString <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;elseif nCase = <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; cString := proper<span style="color: #000000;">&#40;</span> cString <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; cString := upper<span style="color: #000000;">&#40;</span> cString <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br />&nbsp; &nbsp;cString := strtran<span style="color: #000000;">&#40;</span>strtran<span style="color: #000000;">&#40;</span>strtran<span style="color: #000000;">&#40;</span>strtran<span style="color: #000000;">&#40;</span>cString,<span style="color: #ff0000;">"á"</span>,<span style="color: #ff0000;">"Á"</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"à"</span>,<span style="color: #ff0000;">"À"</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"ã"</span>,<span style="color: #ff0000;">"Ã"</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"â"</span>,<span style="color: #ff0000;">"Â"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cString := strtran<span style="color: #000000;">&#40;</span>strtran<span style="color: #000000;">&#40;</span>cString,<span style="color: #ff0000;">"é"</span>,<span style="color: #ff0000;">"É"</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"ê"</span>,<span style="color: #ff0000;">"Ê"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cString := strtran<span style="color: #000000;">&#40;</span>cString,<span style="color: #ff0000;">"í"</span>,<span style="color: #ff0000;">"Í"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cString := strtran<span style="color: #000000;">&#40;</span>strtran<span style="color: #000000;">&#40;</span>strtran<span style="color: #000000;">&#40;</span>cString,<span style="color: #ff0000;">"ó"</span>,<span style="color: #ff0000;">"Ó"</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"õ"</span>,<span style="color: #ff0000;">"Õ"</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"ô"</span>,<span style="color: #ff0000;">"Ô"</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;cString := strtran<span style="color: #000000;">&#40;</span>strtran<span style="color: #000000;">&#40;</span>strtran<span style="color: #000000;">&#40;</span>cString,<span style="color: #ff0000;">"ú"</span>,<span style="color: #ff0000;">"Ú"</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"ñ"</span>,<span style="color: #ff0000;">"Ñ"</span><span style="color: #000000;">&#41;</span>,<span style="color: #ff0000;">"ç"</span>,<span style="color: #ff0000;">"Ç"</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span><span style="color: #000000;">&#40;</span> cString <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><span style="color: #B900B9;">// ADDED BY RAMESH BABU P on 19-06-2011</span><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> proper<span style="color: #000000;">&#40;</span>cString<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">LOCAL</span> point,spot,times,char1,char2,char3,char4,char5<br /><br />STORE <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> point,spot,times<br />STORE <span style="color: #ff0000;">" "</span> <span style="color: #0000ff;">TO</span> char1<br />STORE <span style="color: #ff0000;">"."</span> <span style="color: #0000ff;">TO</span> char2<br />STORE <span style="color: #ff0000;">"/"</span> <span style="color: #0000ff;">TO</span> char3<br />STORE <span style="color: #ff0000;">"-"</span> <span style="color: #0000ff;">TO</span> char4<br />STORE <span style="color: #ff0000;">"_"</span> <span style="color: #0000ff;">TO</span> char5<br /><br />* Convert beginning letter <span style="color: #0000ff;">of</span> string <span style="color: #0000ff;">to</span> Upper <span style="color: #00C800;">Case</span> & last letter <span style="color: #0000ff;">to</span> lower <span style="color: #00C800;">case</span><br />cString = UPPER<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">LEFT</span><span style="color: #000000;">&#40;</span>cString,<span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>+LOWER<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">RIGHT</span><span style="color: #000000;">&#40;</span>cString,LEN<span style="color: #000000;">&#40;</span>cString<span style="color: #000000;">&#41;</span><span style="color: #000000;">-1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />* First capitalise every 1st letter in a word after a space and after a dot<br /><span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> point ><span style="color: #000000;">0</span> .AND. times <= <span style="color: #000000;">5</span><br /><br />&nbsp; &nbsp;point = <span style="color: #00C800;">AT</span><span style="color: #000000;">&#40;</span>char1,<span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cString,spot,LEN<span style="color: #000000;">&#40;</span>TRIM<span style="color: #000000;">&#40;</span>cString<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>-spot<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">IF</span> point ><span style="color: #000000;">0</span><br />&nbsp; &nbsp; &nbsp; spot = point + spot<br />&nbsp; &nbsp; &nbsp; cString = STUFF<span style="color: #000000;">&#40;</span>cString,spot,<span style="color: #000000;">1</span>,UPPER<span style="color: #000000;">&#40;</span><span style="color: #0000ff;">SUBSTR</span><span style="color: #000000;">&#40;</span>cString,spot,<span style="color: #000000;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> times = <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;char1 = char2<br />&nbsp; &nbsp; &nbsp; ELSEIF times = <span style="color: #000000;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;char1 = char3<br />&nbsp; &nbsp; &nbsp; ELSEIF times = <span style="color: #000000;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;char1 = char4<br />&nbsp; &nbsp; &nbsp; ELSEIF times = <span style="color: #000000;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;char1 = char5<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp; &nbsp; STORE <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> &nbsp;point,spot<br />&nbsp; &nbsp; &nbsp; times = times + <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">IF</span> times ><span style="color: #000000;">5</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EXIT<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ELSE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LOOP<br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">ENDIF</span><br />&nbsp; &nbsp;<span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">ENDDO</span><br /><br /><span style="color: #00C800;">RETURN</span> cString<br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">FUNCTION</span> AddNewItem<span style="color: #000000;">&#40;</span>aItems,cText<span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">IF</span> ASCAN<span style="color: #000000;">&#40;</span>aItems,<span style="color: #000000;">&#123;</span>|x|UPPER<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span>x<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> == UPPER<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span>cText<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span> = <span style="color: #000000;">0</span><br />&nbsp; &nbsp;AADD<span style="color: #000000;">&#40;</span>aItems,cText<span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//---------------------------------------------------------------------------//</span><br /><br />&nbsp;<br />&nbsp;</div>[/code:wflwaf4r] Antonio , why not implement it on fw Tget class ?
Autoget test
I have this feature running in my programs. See <!-- m --><a class="postlink" href="http://cincomundos.wordpress.com/2008/01/17/306/">http://cincomundos.wordpress.com/2008/01/17/306/</a><!-- m --> and the video on el Puchero page at alanit.com Regards,
Autoget test
josè, I need with Bitmaps...action
Autoget test
I don't know how to include bitmaps on autoget, sorry. Regards,
Autoget test
josé this is strange... Tautoget is from Tget Tget can use Bitmaps...Action But Tautoget not use bitmap..Action .... strange.....!!!
Autoincrement field for DBFCDX
Hello , I made some test with autoincrement field : DBCREATE(cDbfFile , {{"ID","+",10,0}} , "DBFCDX" , .T. ) DBG DbStruct() // gives ID , + , 4 , 0 ? FieldLen("ID") // 4 WHY TRUNCATED TO 4 ????????????????????????? FOR i := 1 TO 10001 DBAPPEND() NEXT ? Recno() , FIELD->ID // 10001 , 10001 FIELD->ID accepts a number with length 5 , DSTRUCT seems to give a wrong result !!! What is the real length ??? maybe 10 ????? How can it be showed ? Frank Demont
Autoincrement field for DBFCDX
Maybe it indicates the number of bytes used for the field? I'm not sure, I never used autoincrement field, sorry. EMG
Autoincrement field for DBFCDX
Frank I saw your post also in the xHarbour forum and almost mentioned my comments there ... however, auto-increment means one thing in the Sql world and another in the xBase world. In the Sql world auto-increment is handled by the database and created automatically .. which in my view is inherently dangerous. If an attacker gained access to a Sql table with the primary key being a "counter" ( auto-increment ) all it would take is a simple add() and update() to inject all sorts of mayhem into your tables. However, since you are creating your auto-increment ( primary key I presume 'UNIQUE' ) by code .. all it would take from an attacker is to scan for the last PK and then add 1 to the count and you have the makings of an un-wanted injection into your database. Perhaps I have missed the intent of your reasoning for the auto-increment ... ? Thanks Rick Lipkin
Autoincrement field for DBFCDX
Rick, I really didn't understand your comment... EMG
Autoincrement field for DBFCDX
Enrico As you know with any RDMS you can create a Primary key as an auto-increment .. for example in MS access: cSql += "[InvDetailEid] COUNTER NOT NULL, " .. .. cSQL += "CONSTRAINT PK_INVOICEDETAIL PRIMARY KEY ( InvDetailEid )" This will create an auto-increment field meaning when you do a oRs:AddNew() you do not have to address the auto-increment field ( InvDetailEid ) by code .. the RDMS automatically assigns the value. That can be a blessing or a curse ... If you assign a PK as auto-increment it just may make it easier for a hacker to inject records into your Sql table and create all kinds of havoc .. I have seen it happen when I worked for State Gov .. came in one morning and someone had penetrated one of our web-sites and auto injected a few rows with garbage.... Rick Lipkin
Autoincrement field for DBFCDX
I don't see how a primary key can facilitate the work of an attacker. If anyone gains access to my database engine then he can do any kind of worst things to my tables. EMG
Autoincrement field for DBFCDX
Enrico I agree .. if an attacker gets access to your Sql Database .. there is nothing they can not get. .. As far as the primary key .. I have been on the receiving end of cleaning up damage caused by attackers who penetrated a web site when I was working for State Government .. They had injected several rows of garbage into a database table... and I had the distinct pleasure of ferreting out and removing all the injected data. Since the Web Developer ( not me ) decided to use a PK that was an auto Increment .. all the attacker needed to do is add records to tables ( inject ) and since the PK was auto incremented, there was nothing to stop the creation of new rows. If the PK were code driven .. meaning the PK was created by the developers code .. it would make it more difficult to inject new rows since the attacker ( in this case ) did not have access to all the field names. However as you mentioned .. if the attacker had gained full access to the Sql Database .. auto-increment or not .. would be irrelevant. Rick Lipkin
Autoincrement field for DBFCDX
[quote="Rick Lipkin":25a4zkt1]Since the Web Developer ( not me ) decided to use a PK that was an auto Increment .. all the attacker needed to do is add records to tables ( inject ) and since the PK was auto incremented, there was nothing to stop the creation of new rows. If the PK were code driven .. meaning the PK was created by the developers code .. it would make it more difficult to inject new rows since the attacker ( in this case ) did not have access to all the field names.[/quote:25a4zkt1] Now I understand. Yes, if the PK were not autoincrement, it would be easier to find the newly added records, without any doubts. EMG
Autoincrement field for DBFCDX
First things first: the real problem is that SOMEONE GOT ACCESS TO THE DB. Saying that autoincremental id fields are an issue is like looking at the finger when somebody points with his finger to the stars. Autoincremental ID is a pretty good thing in SQL world, giving you an unique id and taking the responsability out of the software. There is nothing like good practices in security and a trustworthy backup policy.
Autoincrement field for DBFCDX
[quote="Franklin Demont":zkaxtptu]Hello , I made some test with autoincrement field : DBCREATE(cDbfFile , {{"ID","+",10,0}} , "DBFCDX" , .T. ) DBG DbStruct() // gives ID , + , 4 , 0 ? FieldLen("ID") // 4 WHY TRUNCATED TO 4 ????????????????????????? FOR i := 1 TO 10001 DBAPPEND() NEXT ? Recno() , FIELD->ID // 10001 , 10001 FIELD->ID accepts a number with length 5 , DSTRUCT seems to give a wrong result !!! What is the real length ??? maybe 10 ????? How can it be showed ? Frank Demont[/quote:zkaxtptu] Autoincrement field value is stored as an Unsigned Long Integer in the DBF, which requires 4 bytes of storage. That is the reason why we see 4 as the field length. The maximum value is nearly 4 billion. Expressed in decimal notation its length is 10.
Autoincremental en Base Embebida con dolphin
Estimados: Tengo un problema al definir tablas con autoincrementales, en una base de datos embebida con Tdolphin. Cuando consulto por el autoincremental siguiente con la funcion [code=fw:3mfbelbq]<div class="fw" id="{CB}" style="font-family: monospace;">oServer:<span style="color: #000000;">GetAutoIncrement</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"tabla"</span><span style="color: #000000;">&#41;</span></div>[/code:3mfbelbq] la aplicacion deja de responder. Alguna pista de como solucionarlo?
Autoincremental en Base Embebida con dolphin
He solucionado el problema de los autoincrementales creando una funcion propia que me devuelve el MAX(campo_clave) + 1. Ahora tengo otro problema. El programa deja de responder cuando hago Query compuesta por mas de una tabla. Alguien ha hecho funcionar Dolphin con Mysql embebida?? Gracias
Autoincremental en Base Embebida con dolphin
Saludos Contactame via gtalk o skype
Autoincremental en Base Embebida con dolphin
Hola Recomiendo utilizar SELECT XCAMPO ORDER BY XCAMPO La funcion MAX() es lenta comparado con ORDER BY
Autoincremental search of Numeric field in xBrowse
Is it possible seek Numeric field with xBrowse ? Regards MAurizio
Autoincremental search of Numeric field in xBrowse
Yes.We need to write the appropriate seek function and assign it as codeblock to oBrw:bSeek. We can do anything we want with this codeblock.
Autoincremental search of Numeric field in xBrowse
Hello I change the Method Seek() and now works * if !Eval( ::bSeek, cSeek ) * Eval( ::bBookMark, uBook ) * MsgBeep() * return nil * endif Select (::cAlias) cOrderType := Valtype(& ("field->" + ( ::cAlias )->( OrdKey() ) )) if !Eval( ::bSeek, iif(cOrderType == "N", val(cSeek) , cSeek )) IF cOrderType == "N" ::cSeek := cSeek ELSE MsgBeep() ENDIF Eval( ::bBookMark, uBook ) return nil endifRegards MAurizio
Autoincremental search of Numeric field in xBrowse
It can be done without changing xbrowse library code. And I personally prefer writing the code without touching library code generally.This is all what is needed ( I am using softseek )[code:2ihyzvwj] oBrw&#58;bSeek &#58;= &#123; |cSeek| CUST->&#40; DbSeek&#40; Val&#40; cSeek &#41;, &#46;t&#46; &#41;, !eof&#40;&#41; &#41; &#125; [/code:2ihyzvwj]
Autoincremental search of Numeric field in xBrowse
This is a sample code. This sample also shows the value being sought[code:2a96kxxe] #include 'fivewin&#46;ch' #include 'xbrowse&#46;ch' REQUEST DBFCDX function Main&#40;&#41; local oDlg, oBrw local oSeek, cSeek &#58;= Space&#40;25&#41; USE CUSTOMER NEW ALIAS CUST SHARED VIA 'DBFCDX' SET ORDER TO TAG SALARY GO TOP DEFINE DIALOG oDlg SIZE 540,480 PIXEL @ 10, 10 XBROWSE oBrw ; COLUMNS 'First','Last','Salary' ; SIZE 250,200 PIXEL ; OF oDlg ; ALIAS 'CUST' ; AUTOSORT @ 220, 10 SAY oSeek VAR cSeek SIZE 100,10 PIXEL OF oDlg ; COLOR CLR_BLACK, CLR_YELLOW oBrw&#58;bSeek &#58;= &#123; |cSeek| CUST->&#40; DbSeek&#40; Val&#40; cSeek &#41;, &#46;t&#46; &#41;, !eof&#40;&#41; &#41; &#125; oBrw&#58;oSeek &#58;= oSeek oBrw&#58;CreateFromCode&#40;&#41; ACTIVATE DIALOG oDlg CENTERED return nil [/code:2a96kxxe]We can seek any data type, without modifying the xbrowse source code.
Autoincremental search of Numeric field in xBrowse
Thank NageswaraRao I try your sample , it works but only on the numeric Col. If you have two Col ( one numeric and one character ) and you need both seek doesn't works . Maurizio
Autoincremental search of Numeric field in xBrowse
[quote="Maurizio":3ats77q7]Thank NageswaraRao I try your sample , it works but only on the numeric Col. If you have two Col ( one numeric and one character ) and you need both seek doesn't works . Maurizio[/quote:3ats77q7]TrueI gave the sample to demonstrate that XBrowse lets us do the real code to Seek. We need to code how do we seek the value entered by suitably coding the bSeek codeblock and not by changing the XBrowse source code.Sure we can write more generic code.
Automated Machine Learning using Harbour
Here you have a very simple example to implement Automated Machine Learning using Harbour. Imagine that we have a robot and we want the robot to learn the most efficient way to exit from a house. So we place the robot in a random room and the robot tries to exit from the house. The robot learns from the successes and the failures, and starts improving. In a few tries the robot knows the most efficient way to exit from the house <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> [img:e6ighio9]https&#58;//fivetechsoft&#46;github&#46;io/screenshots/qlearning&#46;jpg[/img:e6ighio9] If the robot starts in the room 1 or in the room 3, there is nothing to choose. From the room 1 he can only goes to room 5. From the room 3 he can only go to room 4. If he is in the room 2, then he has two options, to exit from the house (he does not know it is the exit but he will get rewarded) or he may go to room 4. A similar situation happens in the room 5. he may exit from the house (and get rewarded) or he may go to room 4 or room 1. When the robot is in the room 4 he has two alternatives to exit: going through room 5 or going through room 2. Both ways will take him out of the house in the same amount of steps. When the robot exits the house, he gets a positive reinforcement (the State's nScore increases in 0.1). When he fails, he gets a negative reinforcement (the state's nScore decreases in 0.1). After a few tries, the robot learns the right way. qlearning.prg [code=fw:e6ighio9]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">static</span> aStates<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n<br /><br />&nbsp; &nbsp;aStates = InitStates<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">10</span><br />&nbsp; &nbsp; &nbsp; ? <span style="color: #ff0000;">"Number of steps to exit"</span>, SolveIt<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />&nbsp; &nbsp;<span style="color: #00C800;">next</span><br />&nbsp; &nbsp;<br />&nbsp; &nbsp;<span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">&#40;</span> aStates <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> &nbsp; <br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> SolveIt<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oState, nSteps := <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;oState = aStates<span style="color: #000000;">&#91;</span> hb_RandomInt<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, Len<span style="color: #000000;">&#40;</span> aStates <span style="color: #000000;">&#41;</span> - <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#93;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">while</span> ! oState == ATail<span style="color: #000000;">&#40;</span> aStates <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">XBrowse</span><span style="color: #000000;">&#40;</span> oState:<span style="color: #000000;">aOptions</span>, <span style="color: #ff0000;">"Options for room: "</span> + AllTrim<span style="color: #000000;">&#40;</span> Str<span style="color: #000000;">&#40;</span> oState:<span style="color: #000000;">nId</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; oState = oState:<span style="color: #000000;">NextState</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; nSteps++<br />&nbsp; &nbsp;end<br /><br /><span style="color: #00C800;">return</span> nSteps<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> InitStates<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> aStates := Array<span style="color: #000000;">&#40;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;AEval<span style="color: #000000;">&#40;</span> aStates, <span style="color: #000000;">&#123;</span> | o, n | aStates<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span> := TState<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> n <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; <br />&nbsp; &nbsp;aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddOption</span><span style="color: #000000;">&#40;</span> aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddOption</span><span style="color: #000000;">&#40;</span> aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddOption</span><span style="color: #000000;">&#40;</span> aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddOption</span><span style="color: #000000;">&#40;</span> aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddOption</span><span style="color: #000000;">&#40;</span> aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddOption</span><span style="color: #000000;">&#40;</span> aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">3</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddOption</span><span style="color: #000000;">&#40;</span> aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddOption</span><span style="color: #000000;">&#40;</span> aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddOption</span><span style="color: #000000;">&#40;</span> aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddOption</span><span style="color: #000000;">&#40;</span> aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddOption</span><span style="color: #000000;">&#40;</span> aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">6</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">AddOption</span><span style="color: #000000;">&#40;</span> aStates<span style="color: #000000;">&#91;</span> <span style="color: #000000;">5</span> <span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> aStates<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">CLASS</span> TState<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp;nId<br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp;aOptions <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">DATA</span> &nbsp;nScore &nbsp; <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">0</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> nId <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">nId</span> := nId, <span style="color: #00C800;">Self</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> AddOption<span style="color: #000000;">&#40;</span> oState <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> AAdd<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aOptions</span>, oState <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">METHOD</span> NextState<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> NextState<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #00C800;">CLASS</span> TState<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> n, nMax := <span style="color: #000000;">0</span>, oState, aOptions<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> Len<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aOptions</span> <span style="color: #000000;">&#41;</span> == <span style="color: #000000;">1</span><br />&nbsp; &nbsp; &nbsp; oState = ::<span style="color: #000000;">aOptions</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span> &nbsp; <br />&nbsp; &nbsp; &nbsp; aOptions = AShuffle<span style="color: #000000;">&#40;</span> AClone<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">aOptions</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">for</span> n = <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">&#40;</span> aOptions <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">if</span> aOptions<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nScore</span> >= nMax<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nMax = aOptions<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">nScore</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oState = aOptions<span style="color: #000000;">&#91;</span> n <span style="color: #000000;">&#93;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #00C800;">endif</span><br />&nbsp; &nbsp; &nbsp; <span style="color: #00C800;">next</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; <br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> oState:<span style="color: #000000;">nId</span> == <span style="color: #000000;">6</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nScore</span> += .<span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">else</span><br />&nbsp; &nbsp; &nbsp; ::<span style="color: #000000;">nScore</span> -= .<span style="color: #000000;">1</span><br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span> &nbsp; <br /><br /><span style="color: #00C800;">return</span> oState &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> AShuffle<span style="color: #000000;">&#40;</span> aArray <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> ASort<span style="color: #000000;">&#40;</span> aArray,,, <span style="color: #000000;">&#123;</span> || HB_RandomInt<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1000</span> <span style="color: #000000;">&#41;</span> < HB_RandomInt<span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1000</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span></div>[/code:e6ighio9] After a few tries the robot starts learning, we can check it reviewing the different state's rewards: When the robot is in room 5, he has three alternatives: room 1 (reward value is -0.3), room 4 (reward value is -0.3) and option 6 (reward zero) so he takes the highest value and knows that option 6 is the right one <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) --> [img:e6ighio9]https&#58;//fivetechsoft&#46;github&#46;io/screenshots/qlearningstates&#46;JPG[/img:e6ighio9]
Automated Machine Learning using Harbour
[quote:1xq7s16q]The robot is at room: 5 He has these choices: Go to room: 1 (score: 0 ) Go to room: 4 (score: 0 ) Go to room: 6 (score: 0 ) The robot is at room: 4 He has these choices: Go to room: 2 (score: 0 ) Go to room: 3 (score: 0 ) Go to room: 5 (score: -0.1 ) The robot is at room: 3 He can just go to room: 4 The robot is at room: 4 He has these choices: Go to room: 2 (score: 0 ) Go to room: 3 (score: -0.1 ) Go to room: 5 (score: -0.1 ) The robot is at room: 2 He has these choices: Go to room: 4 (score: -0.2 ) Go to room: 6 (score: 0 ) Number of steps to exit: 5[/quote:1xq7s16q] [quote:1xq7s16q]The robot is at room: 3 He can just go to room: 4 The robot is at room: 4 He has these choices: Go to room: 2 (score: 0.5 ) Go to room: 3 (score: -0.5 ) Go to room: 5 (score: 2.3 ) The robot is at room: 5 He has these choices: Go to room: 1 (score: -0.4 ) Go to room: 4 (score: -1.1 ) Go to room: 6 (score: 0 ) Number of steps to exit: 3[/quote:1xq7s16q]
Automated Outlook e-mail and sending plain text
To All I have automated a WorkGroup application that generates an Outlook 365 ( client ) e-mail ... the code is simple enough and it works quite well .. however I am having problems with some users that can not see the Body ( cBody ) of the message .. which I code as plain text ... Here is the code: [code=fw:xxao4vba]<div class="fw" id="{CB}" style="font-family: monospace;"><br />         cBody    := <span style="color: #ff0000;">"Dear Employee: "</span>+alltrim<span style="color: #000000;">&#40;</span> cEMployee <span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">";"</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"From "</span>+cMan1+<span style="color: #ff0000;">" "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"  "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"  "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"A Travel /  Train request has been reviewed and Approved by "</span>+alltrim<span style="color: #000000;">&#40;</span>cMan1<span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"."</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"The Final Disposition : "</span>+cCloseType+<span style="color: #ff0000;">" Dated "</span>+dtoc<span style="color: #000000;">&#40;</span>dFinalDt<span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">"."</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"  "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"Please see the Link instructions Provided below. ** "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">" "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">" "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"Summary of Request:"</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"  "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"   *  Employee Name: "</span>+alltrim<span style="color: #000000;">&#40;</span> cEmployee <span style="color: #000000;">&#41;</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"   *  Vendor Sponsor: "</span>+alltrim<span style="color: #000000;">&#40;</span> cSponsor <span style="color: #000000;">&#41;</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"   *  Conference/Event: "</span>+alltrim<span style="color: #000000;">&#40;</span> cEvent <span style="color: #000000;">&#41;</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"   *  Location: "</span>+alltrim<span style="color: #000000;">&#40;</span> cLocation <span style="color: #000000;">&#41;</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"   *  Start Date:  "</span>+dtoc<span style="color: #000000;">&#40;</span> dLeave <span style="color: #000000;">&#41;</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"   *  End Date:    "</span>+dtoc<span style="color: #000000;">&#40;</span> dReturn <span style="color: #000000;">&#41;</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"   *  Estimated Cost:  $"</span>+Transform<span style="color: #000000;">&#40;</span>nTotalExp,<span style="color: #ff0000;">"999,999.99"</span> <span style="color: #000000;">&#41;</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br /><br />         <span style="color: #00C800;">If</span> cExam = <span style="color: #ff0000;">"Y"</span> .and. <span style="color: #000000;">&#40;</span> cQuality = <span style="color: #ff0000;">"N"</span> .and. cMgmt = <span style="color: #ff0000;">"N"</span> .and. cTech = <span style="color: #ff0000;">"N"</span> .and. cDev = <span style="color: #ff0000;">"N"</span> .and. cConf = <span style="color: #ff0000;">"N"</span> <span style="color: #000000;">&#41;</span><br />            cBody    += <span style="color: #ff0000;">"   *  Is this Request for Examination Travel ONLY? : Yes"</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">Else</span><br />            cBody    += <span style="color: #ff0000;">"   *  Is this Request for Examination Travel ONLY? : No"</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         <span style="color: #00C800;">Endif</span><br /><br />         cBody    += <span style="color: #ff0000;">"   *  Is This Associated with a Previously approved Designation? : "</span>+cPrevAppr+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"  "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"  "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += alltrim<span style="color: #000000;">&#40;</span>cAppUrl<span style="color: #000000;">&#41;</span>+<span style="color: #ff0000;">" /"</span>+alltrim<span style="color: #000000;">&#40;</span> cPersno <span style="color: #000000;">&#41;</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"  "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"**   To run .. hold down the Windows key + R ...  "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"Cut and Paste the entire link above into the open RUN line and hit"</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"OK to start the Program"</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"  "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"  "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"  "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"  "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"  "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"Note .. This is an automated e-mail sent from the Leave / Travel Program"</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br />         cBody    += <span style="color: #ff0000;">"  "</span>+chr<span style="color: #000000;">&#40;</span><span style="color: #000000;">10</span><span style="color: #000000;">&#41;</span><br /><br /> </div>[/code:xxao4vba] Not rocket science so far .... Here is my Outlook "silent" e-mail generation .... [code=fw:xxao4vba]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Try</span><br />   oOutLook  := TOleAuto<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Outlook.Application"</span><span style="color: #000000;">&#41;</span><br />Catch<br />    Saying := <span style="color: #ff0000;">"For some Odd reason The Outlook e-mail CLient failed to Initialize"</span><br />    <span style="color: #0000ff;">Msginfo</span><span style="color: #000000;">&#40;</span> Saying <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">Return</span><span style="color: #000000;">&#40;</span>.f.<span style="color: #000000;">&#41;</span><br />End <span style="color: #00C800;">Try</span><br /><br />oMailItem := oOutLook:<span style="color: #000000;">Invoke</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"CreateItem"</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br /><br />oMailitem:<span style="color: #0000ff;">to</span> := cTo<br />oMailitem:<span style="color: #000000;">CC</span> := cCC<br />oMailItem:<span style="color: #0000ff;">Subject</span> := cSubject<br />oMailItem:<span style="color: #000000;">Body</span> := cBody               <span style="color: #B900B9;">// just plain text</span><br /><br /><span style="color: #00C800;">Try</span><br />   oMailItem:<span style="color: #00C800;">display</span><span style="color: #000000;">&#40;</span>.F.<span style="color: #000000;">&#41;</span><br />Catch<br />End <span style="color: #00C800;">Try</span><br /><br /><span style="color: #00C800;">Try</span><br />   oMailItem:<span style="color: #000000;">Invoke</span><span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"Send"</span><span style="color: #000000;">&#41;</span><br />Catch<br />End <span style="color: #00C800;">Try</span><br /><br /> </div>[/code:xxao4vba] The e-mail is generated and sent to the recipient .. however, in a couple of cases .. cBody is not being resolved in the e-mail .. just a big white space .. By default all the OUtlook settings are set to allow HTML .... even the ones that DO recieve the message where cBody is just plain text ... I am just curious if chr(10) at the end of the text may be causing any problems .. however, only a select few recipients have any problem at all seeing the body of the message ... I am just curious if changing cBody to HTML may be a ( positive ) common denominator ... I would be grateful if any HTML Gurus could look at cBody and re-code it for HTML ??? however, I don't know if HTML vs plain text will resolve anything .. I am OPEN to any comments and suggestions ... Thanks Rick Lipkin