//------------------------------------------------------------------------------------------------- //dblclick.c - Replaces macro from SPFSE //DOSREXX seems to work best with SPFSE // WARNING!!!!! Use right click and save as to save this macro. Do NOT copy it from your browser! // as the high-ascii character codes will not translate properly. //Mark McDonald 2008 //------------------------------------------------------------------------------------------------- void DblClick(void) { char *td; char *trexx = "H:\\U\\PCDOS\\REXX.EXE H:\\U\\SPFPC40\\MACROS\\H3.SPF "; char *tcmd; char *tcol; char *tline; char *tfilespec; char *tstrlen; int tsp; int tlth; int texnt; int tlp; int i; tcol = spfservice("query","COL_NUMBER"); tline = spfservice("query","LINE_DATA_RAW"); tfilespec = spfservice("query","FILESPEC"); tsp = strfindsubstr(tline, " ", tcol); //Find 1st space after Col_Number if(tsp > tcol){tline = strleft(tline,tsp);} //Get to end of keyword tsp = strfindsubstr(tline, ">", tcol); //Find 1st space after Col_Number if(tsp > tcol){tline = strleft(tline,tsp);} //Get to end of keyword tstrlen = strlen(tline); i = 1; while (i <= tstrlen){ if(strgetsubstr(tline, i, 1) == " "){strovlsubstr(tline,"Ç",i);} if(strgetsubstr(tline, i, 1) == "%"){strovlsubstr(tline,"ü",i);} if(strgetsubstr(tline, i, 1) == "<"){strovlsubstr(tline,"é",i);} if(strgetsubstr(tline, i, 1) == ">"){strovlsubstr(tline,"â",i);} if(strgetsubstr(tline, i, 1) == "|"){strovlsubstr(tline,"ä",i);} if(strgetsubstr(tline, i, 1) == "@"){strovlsubstr(tline,"à",i);} if(strgetsubstr(tline, i, 1) == "\""){strovlsubstr(tline,"å",i);} if(strgetsubstr(tline, i, 1) == "="){strovlsubstr(tline,"ç",i);} i++; } // --- Build System Command tcmd = strcompose("system ",trexx," SPFSE ",tcol," ",tfilespec," ",tline); // MSG(tcmd); spfservice("cmd", tcmd); } // DblClick char strleft(char *tdata, int tcols){ char *xret; int tlen; tlen = strlen(tdata); if (tlen < tcols){ tcols = tlen; } xret = strgetsubstr(tdata, 1, tcols); return(xret); }// strleft