randallc
-
Posts
434 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by randallc
-
-
Hi,
good news,
Always interested to know how you get on with my poorly documented scripts!
Best. Randall
-
Hi,
sure; here are a few of Kevin's lines in direct edit; copy to script editor!
You are right; this does not bother opening notepad; easier.
Best, Randall
<VSETMISC:T4:Installation Path><REM2:use text file in installationPath "textanswers.txt"><TVAR2:05:04:%T4%\textanswers.txt><REM2:Do all your replaces here; this only example><TMVAR2:21:05:01:000:000:99ninety nine><REM2:....all numbers, descending, in between; there's probably a better way...><TMVAR2:21:05:01:000:000:2two><TMVAR2:21:05:01:000:000:1one><TMVAR2:17:05:00:000:000:%T4%\textanswers.txtT>Set Variable %T4% to "Installation Path"// use text file in installationPath "textanswers.txt"
Variable Set String %T5% from File: "textanswers.txt"
// Do all your replaces here; this only example
Replace "99" with "ninety nine" in %T5%
// ....all numbers, descending, in between; there's probably a better way...
Replace "2" with "two" in %T5%
Replace "1" with "one" in %T5%
Variable Modify String: Save %T5% to Text File
-
Hi, again;
Couldn't resist the automation of the table page, either.
You need to import all 3 "mxe" to a library, and run the LinkClick macro;
[To generalise to other sites, you will need to view source and similarly find the text just before and after your links, and in the linked pages, the names in red]
Best, Randall
-
Hi,
I have not looked lately, but I think there was an example macro in joe's book; I am not sure if it gives the detail you need, but could probably be modified?
Best, Randall
-
Hi again,
Here it is with extra column for menu number (%N1%).
Best, Randall
EDIT -PS Extra refinements could include?...
1. Use the 2nd column, row 10,20,30, "0th" row of each menu, to say how many items there will be on the list for that menu; then each menu can be derived cleaner.[EDIT; Try MultiChoice3.mxe]
2. Use the text column for a filename instead if the text is large, and set variable from name of text file ["if T12 contains ".txt", Set variable T12 from T4/T12" etc]"
-
Hi,
Not quite what you wanted yet, as each subsequent menu is fixed; an extra column to say what the next %N1% value is for next menu level would fix it....; some more thought?....
Here's an example which relies on
1. Answers in a tab-delimited text file (can be made from excel, for instance, ) with the first column the description and promps for choices, the second column the text to be inserted. [put in macro express install directory]
2. It calls itself, so call it "MultiChoice" or change the name of the called macro near the end.
3. At present, it starts at line 10 for first description line, line 11 for prompt 1, line 12 for prompt2 etc;
4. Then 2nd menu line 20 for first description line, line 21 for prompt 1, line 22 for prompt2 etc; change the prompts and text answers in the AnswerText.txt file, or use Excel; what do you think?
<REM2:answers in text file in installationPath "textanswers.txt"><VSETMISC:T4:Installation Path><REM2:set level><IFVAR2:2:01:1:0><TVAR2:03:01:><TMVAR2:17:03:00:000:000:%T4%\DocumentAnswers.txtT><NMVAR:08:01:0:0000001:0:0000000><ENDIF><REM2:text file process for this eval level><NMVAR:03:02:1:0000001:2:0000010><IVAR2:04:01:0><ADFBEG:F11:010:N00002:000010:%T4%\textanswers.txt><TMVAR2:19:10:00:000:000:Prompt%N4%><NMVAR:08:04:0:0000001:0:0000000><ADFEND><REM2:choice><MENU2:2:T:02:CenterCenter:Next text, line %N1%%Prompt0%%Prompt1%%Prompt2%
%Prompt3%
%Prompt4%
%Prompt5%
%Prompt6%
%Prompt7%
%Prompt8%
%Prompt9%
Go BackT><ASCIIV:3:0:2><NMVAR:02:03:1:0000003:2:0000064><IFVAR2:1:02:2:CANCEL><IFVAR2:2:03:3:10><NMVAR:01:03:1:0000002:1:0000003><REM2:add choice to document><ADFBEG:F11:010:N00003:000001:%T4%\textanswers.txt><ADFEND><TMVAR2:20:11:00:000:000:%T4%\DocumentAnswers.txtT><REM2:at end of this level><NMVAR:08:01:0:0000001:0:0000000><REM2:run macro again if more choices, else end><ELSE><NMVAR:09:01:0:0000001:0:0000000><ENDIF><MACRUN2:MultiChoice><ELSE><LAUNCHDEL2:0:01%T4%\DocumentAnswers.txt><MSTOP><ENDIF>
// answers in text file in installationPath "textanswers.txt"Set Variable %T4% to "Installation Path"
// set level
If Variable %N1% = 0
Variable Set String %T3% ""
Variable Modify String: Save %T3% to Text File
Variable Modify Integer: Inc (%N1%)
End If
// text file process for this eval level
Variable Modify Integer: %N2% = %N1% * 10
Variable Set Integer %N4% to 0
ASCII File Begin Process: "textanswers.txt" (Tab Delimited Text )
Variable Modify String: Save %T10% to Environment Variable
Variable Modify Integer: Inc (%N4%)
ASCII File End Process
// choice
Multiple Choice Menu: Next text, line %N1%
Variable Set %N3% to ASCII Value of %T2%
Variable Modify Integer: %N3% = %N3% - 64
If Variable %T2% <> "CANCEL"
If Variable %N3% < 10
Variable Modify Integer: %N3% = %N2% + %N3%
// add choice to document
ASCII File Begin Process: "textanswers.txt" (Tab Delimited Text )
ASCII File End Process
Variable Modify String: Append %T11% to Text File
// at end of this level
Variable Modify Integer: Inc (%N1%)
// run macro again if more choices, else end
Else
Variable Modify Integer: Dec (%N1%)
End If
Macro Run: MultiChoice
Else
Program Launch: "DocumentAnswers.txt"
Macro Stop
End If
Best, Randall.
-
You will have to write and import those macros, and get the naming right.
To see it as a standalone macro as an example; try this;
Randall
-
Hi,
Here is a way to get the simple part; the name in RED!, once you know the web page;
Example of calling macro "WebStringSplit", given you have found;
Web URL = into "Parameter1" [if current web page, use "ALT-d, Control-c, Set string form clipboard]
text before=color="#c41010"> into "Parameter2"
text after=</font> into "Parameter3"
<REM2:paramater1 - Web Site><TVAR2:01:01:http://www.futurlec.com/LED/7SEG1RCA.shtml><TMVAR2:19:01:00:000:000:Parameter1><REM2:parameter2 - Text Before split text><TVAR2:01:01:color="#c41010">><TMVAR2:19:01:00:000:000:Parameter2><REM2:parameter3 - Text After split text><TVAR2:01:01:</font>><TMVAR2:19:01:00:000:000:Parameter3><MACRUN2:{_WebStringSplit}><REM2:Process first significant line (line 2 as first one blank) of ResultSplit.txt><IVAR2:01:01:0><BTFBEG:001:000002:000001:%InstallationPath%\ResultSplit.txt><NMVAR:08:01:0:0000001:0:0000000><TMVAR2:19:01:00:000:000:ItemName%N1%><BTFEND><REM2:Puts the first text in red into Env Var "ItemName1" or %T1%><TBOX4:T:1:CenterCenter000278000200:000:ItemName1%ItemName1%>
Best, randall// paramater1 - Web SiteVariable Set String %T1% "http://www.futurlec.com/LED/7SEG1RCA.shtml"
Variable Modify String: Save %T1% to Environment Variable
// parameter2 - Text Before split text
Variable Set String %T1% "color="#c41010">"
Variable Modify String: Save %T1% to Environment Variable
// parameter3 - Text After split text
Variable Set String %T1% "</font>"
Variable Modify String: Save %T1% to Environment Variable
Macro Run: {_WebStringSplit}
// Process first significant line (line 2 as first one blank) of ResultSplit.txt
Variable Set Integer %N1% to 0
Text File Begin Process: "ResultSplit.txt"
Variable Modify Integer: Inc (%N1%)
Variable Modify String: Save %T1% to Environment Variable
Text File End Process
// Puts the first text in red into Env Var "ItemName1" or %T1%
Text Box Display: ItemName1
-
OK - problems!; I'll have a look later
best, Randall
-
OK!
So if no passwords/ security? - what is the web page address?
Best Randall
-
Hey, kevin,
Good work! in the recycle bin; surely that is still a bug!?
Best Randall
-
Hi Floyd,
I think this must be a bug!
If I change the command from
"meproc.exe /ADestinationXcopyGUI"
to
"meproc.exe /ADestinationXcopyxxx"
and rename the macro appropriately, it works again! - but change the name back (and the command!) and it does not; but does in another macro library! Go figure!
best, Randall
-
Hi,
Here's what you want, I think;
<TVAR2:01:02:FFirst 10 characters will be taken from your inputFFCenter:Center><TMVAR2:10:01:01:001:010:><TBOX4:T:1:CenterCenter000278000200:000:Here it is, ready to paste by "Text Type T1"T1=%T1%>
Best, RandallVariable Set String %T1% from PromptVariable Modify String: Copy Part of %T1% to %T1%
Text Box Display: Here it is, ready to paste by "Text Type T1"
-
Hi,
Yes, I've reduced it ad absurdam now, and all it does is "Display Hi" in a textbox!
I put it in one macro library, and it runs, but not if I put it in the library I want to use!
Best, Randall
-
Hi,
Should be fairly easy; is the Web page private, or can you tell the url or post the "source" [view, source, save as text]? I can maybe help without, but that would make it easier.
Best, Randall
-
Hi,
Can anyone please help?
I have a macro I run using "/A<nickname> (Activate Macro)"; and MEPROC.EXE.
It works if the macro is in one library, but NOT if it is in "macex.mex" library!
What is happening?
Best, Randall
-
Hi,
The topic referred to in that one is a different thread;
Almost Sorting, Ordering Lines in a Text File
I think this would help; "GROUPING ALGORITHM"
Best, Randall
-
Hi,
Interesting!
How about
<IFMOUSE:21><TEXTTYPE:<APP>n><ENDIF>
Set "Properties/Mouse Click/ Left; set all screen"If Mouse Cursor is Internet NavigateText Type: <APP>n
End If
Set "Scope/ - Microsoft Internet Explorer" if you want
Best Randall
[EDIT - see below; don't need a macro if you use "shift" key; or program it that way]
-
Hi,
Probably not directly possible with ME3
this continues discussion from 2 threads back; see my "FindText" macro which troes to address this problem; sometimes successfully; if you can select text near your field, tabbing is then more reliable;
cf Cory's discussion;
Best, Randall
-
Hi,
Yes, it is harder than you'd think;
IF your web site is OK and "Wait for Web page" is accurate (not always so), then I think my macro works (not always) [messed up if there are still adds loading with a slow connection, for instance];
<ACTIVATE2:Internet Explorer><WAITWIN2:000010:000000:Internet Explorer><TVAR2:02:01:New><TMVAR2:19:02:00:000:000:FindText><MACRUN2:{_FindText}><TEXTTYPE:<TAB><TAB><TAB>><IMSD:100><TEXTTYPE:<ENTER>>Activate Window: "Internet Explorer"Wait For Window Title: "Internet Explorer"
Variable Set String %T2% "New"
Variable Modify String: Save %T2% to Environment Variable
Macro Run: {_FindText}
Text Type: <TAB><TAB><TAB>
Delay 100 Milliseconds
Text Type: <ENTER>
*** Edit the above macro for "New" [user?] and number of tabs after text selected to get to your field)
{_FindText} macro as attached - import it and {_StatusBarProgress} (in other "NEW" site - see my signature) into your macro library
Best, Randall
PS Let me know! -OR
[2. Try PGMacros passwords function addon - Joe
3. Try my "Wizard" function for passwords -- se "DallasWIZ exampe from my signatire WbLogin]
-
Yes, the code is OK (don't need to insert the Crs, though, as it makes it that much harder to paste into the script editor)
I will need to rely on Kevin here; I have never put those addresses into IE on my machines, and when I do uit manually now, with my own machine's numbers, I just get "can't find page" errors.
How do you do it?
Best, Randall
-
Hi,
Probably easy to sort out if you post the code; there are delays/ wait for windows etc to get used to here (probably).
best, Randall
-
Hi,
This is a bug which I thought was fixed in version 3.5d. Are you sure you are running the most recent release?
Best, Randall
-
Hi,
I guess you will have your answer in astring, so at the appropriate time, say the string is "T1", replace as below; [copy the first quoted code to script editor]
<REM2:Set Environment variable "CRLF" to cr/lf characters><ASCIIC:2:1:10><ASCIIC:3:1:13><TMVAR2:08:03:02:000:000:><TMVAR2:19:03:00:000:000:CRLF><REM2:Replace Environment variable "CRLF" in String T1 with space><TMVAR2:21:01:01:000:000:%CRLF% >
Best, Randall// Set Environment variable "CRLF" to cr/lf charactersVariable 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
// Replace Environment variable "CRLF" in String T1 with space
Replace "%CRLF%" with " " in %T1%
Processing A Comma Delimited Text File
in Macro Express 3.x
Posted · Edited by randallc
Hi,
If your fields etc are small, you can use environment variables [now won't run if file size over 32k]; these get/ save macros will give you the idea if you want to re-write for other methods;
[** limits; Environment variables limits]
Just import the 3 macros, and run example; write your own example to handle the variables
Best, Randall
{_GetCSVFields}.mxe
{_SaveCSVFields}.mxe
FieldCSVExample.mxe
EDIT; changed the note and Get file to warn re file size
__GetCSVFields_.mxe