randallc
-
Posts
434 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by randallc
-
-
Here is the vbs version; needs only the attached macro to be imported to your library.
// Example of Trig Function Tan (30)Variable Set String %T11% "Tan"
Variable Set String %T12% "30"
Variable Modify String: Save %T11% to Environment Variable
Variable Modify String: Save %T12% to Environment Variable
Macro Run: TrigFunctionVBS
Text Box Display:
Macro Return
Best, Randall<REM2:Example of Trig Function Tan (30)><TVAR2:11:01:Tan><TVAR2:12:01:30><TMVAR2:19:11:00:000:000:TrigFunc><TMVAR2:19:12:00:000:000:degrees><MACRUN2:TrigFunctionVBS><TBOX4:T:1:CenterCenter000278000200:000:%TrigFunc%(%Degrees%)=%TrigAnswer%><MRETURN> -
OK,
Save your macro by.
1. File
2. Export "alt-P" [export as playable macro]
3. Name it and save (ext "mxe" comes bydefault)
4. reply to this post.
5. Attach [browse] yor mxe file
6. Add to post.
7. Submit post.
I can see what you have got in your macro!...
Best, Randall
<DT:MM/dd/yyyy h:mm AMPMT:01:3:{P00002}{P00000}{P00000}{P00000}><TEXTTYPE:%T1%>Types into an area or field or notepad you have already selected [instaed of Display Box]
-
Best, Randall<CLIPE><ACTIVATE2:Notepad><WSHOW:Notepad><REP3:08:000002:000001:0001:1:01:T1><IMSD:20><TEXTTYPE:<CONTROL>a><CLIPC><TVAR2:01:03:><IVAR2:01:12:1><IFVAR2:2:01:4:0><EXITREP><ENDIF><ENDREP><LAUNCHNO3:0:0112WordPad<LAUNCH:WordPad.exe><WSHOW:WordPad><CLIPP>PS
Clipboard EmptyActivate Window: "Notepad"
Window Show: "Notepad"
Repeat Until %T1% <> %T1%
Delay 20 Milliseconds
Text Type: <CONTROL>a
Clipboard Copy
Variable Set String %T1% from Clipboard
Variable Set Integer %N1% from Length of Variable %T1%
If Variable %N1% > 0
Repeat Exit
End If
Repeat End
Launch and Activate: "WordPad.exe"
Window Show: "WordPad"
Clipboard Paste
-
hmmm...!
You need to paste the gear (from my quote box, not yours) into the MEX Editor, into the "MacroScript" area when your macro is open for editing (NOT in a text box)
Hope this helps, - else post your script and I'll change it,
Randall
-
Hi,
Yes, you could (theoretically!) use my "MEBasic [access the example macro lirary mex file from my signature links].
You would need to add all your current macros to that library,and use the syntax as in the "Example" macros in that library ["alt-Shft-A" to run, from memory].
however, if PGMmacro library has that function, it would be more reliable than my home-made MEBasic.
If you don't need all the rest, you are probably better to use Joe's approach to use a vbs script for "tan" and run it.
PM or email me if you really want to go into detail.
Best, Randall
-
As in Kevin's note avove; set Variable String from file; up comes an explorer picker..Randall thanks, but what who where is ME filepicker (didn't get a search-match in the helpfile, nor on the Insight website)Best, Randall
-
Hi,
Just to think laterally, can't you avoid your problem by using ME filePicker in your macros instead of explorer? , as it would not leave any extra Windoes left open
Best, randall
-
Hi,
That text box should format as
Two days ago, it was;Monday, 21 November 2005
starnge!
Anyway, your format to follow Kevin's note should be;
in the first line;MM/dd/yyyy h:mm AMPMthus;
Best, Randall<DT:MM/dd/yyyy h:mm AMPMT:01:3:{P00002}{P00000}{P00000}{P00000}><TEXTTYPE:%T1%> -
Hi,
Date/Time: Save "dddd, d MMMM yyyy" into %T1%Text Box Display: Two days ago
<DT:dddd, d MMMM yyyyT:01:3:{P00002}{P00000}{P00000}{P00000}><TBOX4:T:1:CenterCenter000278000200:000:Two days agoTwo days ago, it was;
%T1%>
Best, Randall
-
I am not sure what you mean here; if you do not want to use my folder process, the spreadsheeewt name goes into T30 for each run of the loop;should use the spreadsheet that contains the account numbers in the column, copy the account number and set to variable... and use that variable in the macro to process the spreadsheetBest, randall
-
Hi, I'd be interested to hear;
1. I guess I need to know if you have the Wizard working; it may only work in 2003 as it does not in Office97 for this task; aand may not even in XP?
[check the ExcelWiz [and attached macro] macro is imported to your libraray with the correct name (see macrorun command), and Wizard. exe is in your MEX directory]
2. The macro I have sets T4 to the folder to process; change to the folder you wish to process
3. ; it will process all Excel files in that folder unless they fall out of the 4 "If" criteria; change the criteria as you find necessary.
4. Run the macro; outputs to "AnswerFile.xls" in your set directory unless you change it.
5. The extra line for name would go like so; change the row length to be imported else it won't fit if it starts at column B; thus [A2:IU2, instead of A2:IV2] [remember the second parameter is the sheet number or name too; I have them set to "1" at present]
// Copy From in loop [returns a file name/ sheet number/ range to "%String_T10%"]Variable Set String %T1% "ExcelCopy$["%T30%","1","C","1","NoSave","A2:IU2","InVisible","NoExit","0","0"]"
Macro Run: {_ExcelComWIZ}
Variable Set String %T99% "%String_T10%"
// Copy To in loop
Variable Set String %T1% "ExcelCopyTo$["%AnswerFile%","1","B","%N1%","NoSave","%String_T10%","InVisible","NoExit","0","0"]"
Macro Run: {_ExcelComWIZ}
// Add FileName to column"A" on that row in AnswerFile; in loop ; procees this string to strip out the name first (I have not done that yet; from %T99%)
Variable Set String %T1% "ExcelIntoCell$["%AnswerFile%","1","A","%N1%","NoSave","%T99%","InVisible","NoExit","0","0"]"
Macro Run: {_ExcelComWIZ}
Let me know specifically what you cannot interpret;
N1 for the file number in the folder you are processinng [to row number in answer sheet]
-
Hi,
My Excel function will do that in the latest version, but I have not heard if the last one is running on your machine yet so have not posted.
Best, Randall
You need new ExcelComWIZ;
And Only the "exe" in MEX directory from the zip;
// *** Requires {_ExcelCOMWIZ} as macro imported; and Widard.exe" file in mE directoryVariable Set %T2% to ASCII Char of 9
Variable Modify String: Save %T2% to Environment Variable
Set Variable %T4% to "Installation Path"
Variable Set String %T31% "%T4%\Book2.xls"
Variable Modify String: Save %T31% to Environment Variable
Variable Modify String: Convert %T2% to integer %N2%
Variable Set Integer %N1% to 1
// Retrieve row 2 lines one file [T30] at a time from Sheet1 [?] in Folder; append to Excel sheet
Repeat with Folder
// Exclude any file which is already openbed (~temp") or has no sensible row in that sheet
If Variable %T30% contains ".xls"
AND
If Variable %T30% does not contain "Book2"
AND
If Variable %T30% does not contain "test"
AND
If Variable %T30% does not contain "~"
Variable Modify String: Append %T30% to Text File
// Copy From in loop
Variable Set String %T1% "ExcelCopy$["%T30%","2","C","1","NoSave","A2:IV2","InVisible","NoExit","0","0"]"
Macro Run: {_ExcelComWIZ}
// Copy To in loop
Variable Set String %T1% "ExcelCopyTo$["%AnswerFile%","1","A","%N1%","NoSave","%String_T10%","InVisible","NoExit","0","0"]"
Macro Run: {_ExcelComWIZ}
Variable Modify String: Append ".../...%T30%" to %T40%
Variable Modify Integer: Inc (%N1%)
End If
Repeat End
Variable Modify Integer: Inc (%N1%)
Variable Set String %T1% "ExcelReadCell$["%AnswerFile%","1","A","%N1%","Save","Hi","Visible","NoExit","0","0"]"
Macro Run: {_ExcelComWIZ}
// Copy To AnswerFile
Text Box Display: About to Exit
-
Hi,
I have a 14-liner that will do this; but no point unless you can tell me the "Wizard" is working on your computer (ie see link in signature; ) let me know;
best, randall
-
hi,
are you serious about needing to use explorer click?
some people jut don't realise tht me3 has its own windows explorer filepicker....?
Randall
-
hi,
or sometimes works;
1. Get control first to get location,
2. then use location to use capture.
best, Randall
-
Sorry,
I don't know; try yuor main "Run" command line at Windows start button; if that runs it ok, I would need to know more about js; ? a js forum?;
best, randall
-
Hi,
i have a GUI add-on in my link from signature; "GUIMenu...", which was designed for Multiple chioice menu; infinite text size and background colour (not text colour at present, but certainly possible except in the list itself..) on the "changes" tab.
If you want, I could change it for text box display only, but some time and work!
Let me know...
Randall
-
Hi,
The line which detects end of spell and inserts a CRLF, ready for next line is;
// Is this what you want before next spell starts; or ";" ?Variable Set String %T3% ""%CRLF%""
Change this to asemicolon instead?; -it means you have no endofline there; but I'm not sure how you are processing this? - presumably NOT (as I might) by using "ASCII file process"?)
// Is this what you want before next spell starts; or ";" ?Variable Set String %T3% "";""
Hope this help, Randall
-
Hi,
My Excel function will do that in the next version, but I have not heard if the last one is running on your machine yet so have not posted.
Best, Randall
You need new ExcelComWIZ;
And Only the "exe" in MEX directory from the zip;
// Addto cell F1Variable Set String %T1% "ExcelAdd2Cell$["C:\Program Files\Macro Express3\Book1.xls","1","F","1","Save","10","Visible","NoExit","NotLastRow","0"]"
Macro Run: {_ExcelComWIZ}
Text Box Display:
// SheetAdd============================================
Variable Set String %T1% "ExcelSheetAdd$["C:\Program Files\Macro Express3\Book1.xls","1","F","1","Save","Hi","Visible","NoExit","LastRow","0"]"
Macro Run: {_ExcelComWIZ}
// GetSheetName==========================================
Variable Set String %T1% "ExcelGetSheetName$["C:\Program Files\Macro Express3\Book1.xls","1","F","1","Save","Hi","Visible","NoExit","LastRow","0"]"
Macro Run: {_ExcelComWIZ}
Text Box Display:
// NameSheet============================================
Variable Set String %T1% "ExcelNameSheet$["C:\Program Files\Macro Express3\Book1.xls","1","F","1","Save","NewSheetNamed","Visible","NoExit","0","0"]"
Macro Run: {_ExcelComWIZ}
// Import CSV into Sheet======================================
Variable Set String %T99% "*.csv"
Variable Set String %T99% from File Name
If File Exists "%T99%"
Variable Set String %T1% "ExcelImport$["C:\Program Files\Macro Express3\Book1.xls","1","A","1","Save","%T99%","Visible","NoExit","0","0"]"
Macro Run: {_ExcelComWIZ}
End If
// Import only a specified range from a CSV into Sheet=============
Variable Set String %T99% "*.csv"
Variable Set String %T99% from File Name
If File Exists "%T99%"
Variable Set String %T2% "%T99%///Sheet1///A1:B7"
Variable Set String %T1% "ExcelCopyTo$["C:\Program Files\Macro Express3\Book1.xls","1","A","1","Save","%T2%","Visible","NoExit","0","0"]"
Macro Run: {_ExcelComWIZ}
End If
==========================================
Best, Randall
-
Hi,
Yes - See "Help" about running from command line
Recent example in this post;
Shell (MacEx3 + "meproc.exe /ARetrieverFromRegistryMacro")
eg vba
MacEx3 = "c:\program files\macro express3\"Shell (MacEx3 + "meproc.exe /ARetrieverFromRegistryMacro")
Best, Randall
-
Hi,
I looked at your Field doc file; my macro seems to work; just change the field names etc and retrieve what you want, or copy contents to clipboard, vars etc....let me know if not
Best, Randall
[PS There are so many fields, the info needs to go to an ini or text file for processing back, I would think]
-
hey, Had you tried running my macro?
It fixed all but your new fields. (if first changed long numbers of spaces to tabs)
Here it is again; seems to work on the new fields as well.
best, Randall
-
by the way, in relation to my presumption for it to work at present in those first few lines(that it was a tab mark), if there was more than one, you would need to replace strings of tabs until there was just a single tabl for this macro towork to come before starting it (or on each line).
Alternatively, of course if they are spaces, you would need to replace a string of spaces with at least one tab before that! I hope that all works.
Best, Randall.
by the way, if you wish to actually "attach" part of a text file at least as an attachment, we can check whether those marks are tabs or whatever; you may be able to see in Word, for instance anyway.
-
hi,
This replicates the example, but I'm still not sure either if is is exactly what you want ; all now ascii-quotes including the text as a single field.
Try it.
Best, Randall
// Set tab / CRLF name [i am presuming the problems are the tabs?.... if they are spaces, I'm wrong]Variable Set %T2% to ASCII Char of 10
Variable Set %T3% to ASCII Char of 13
Variable Modify String: Append %T2% to %T3%
Variable Modify String: Save %T3% to Environment Variable
Variable Set %T2% to ASCII Char of 9
Variable Modify String: Save %T2% to Environment Variable
Delete File or Files: "examplebook2.txt"
// Whatever the file name, process line by line
Variable Set String %T3% """
Text File Begin Process: "examplebook.txt"
Variable Set Integer %N1% from Length of Variable %T1%
Variable Modify String: Copy Part of %T1% to %T2%
// If last character not a period, then replace tabs with ";" etc
If Variable %T2% <> "."
OR
If Variable %T1% contains "%TAB%"
If Variable %T3% = "%CRLF%"
// Is this what you want before next spell starts; or ";" ?
Variable Set String %T3% ""%CRLF%""
Else
Variable Set String %T3% """
End If
Replace "%T1%" with "%T3%%T1%";" in %T1%
Replace "%TAB%" with "";"" in %T1%
Variable Modify String: Append %T1% to Text File
Variable Set String %T3% """
Else
// If last character is a period,
Replace "%T1%" with "%T3%%T1%" in %T1%
Variable Modify String: Append %T1% to Text File
// CRLF, no quotes for next line at start if it remains a sentence next line
Variable Set String %T3% "%CRLF%"
End If
Text File End Process
// Add a quote at the total end
Variable Set String %T1% """
Variable Modify String: Append %T1% to Text File
Program Launch: "examplebook2.txt"
Clipboard Copy Is Not Working.
in Macro Express 3.x
Posted
Hi,
Try "Break"; is that in version "2.0e"? [is it there?] [if you are really using such an old version, it may "break" out of any loops it finds itself in, rather than just the one you want?..... btw]
btw, I had to go back to version "3.5d" as it broke too many macros.....
Anyone else?
Randall