Jump to content
Macro Express Forums

Wizard For Pgm Macros


randallc
 Share

Recommended Posts

EDIT - Source code now included in ZIP file with "exe" and MEBasic

SEE instructions for self- compiling script or reading it yourself, as in other thread;

Wizard instructions for Script, compile if needed

EDIT- Aug1st 05- up to v 5.5.3

EDIT- July12th- Got It - Really!

Got It - Really!

Best Randall

MEbasicWizard.zip

EDIT-July 9th; 5.1.3; WeekdayDifference returned to function; compares with Excel WkDAy counter

EDIT-July 5th; 5.0.9;debugged again; DateStamp for changing File Time Stamp

EDIT - July 3rd - Dates again fixed! - should work anywhere, and not cause a crash if wrong. - Folder Picker, Execl Cell Read/ write

EDIT - July 4th- Wizard was calling it "MEBasic1"

*** WINDOWS 98 work OK now

I have been organising a Wizard" for the MEBasic commands, and was going to add PGM commands to make it easier to write macros with them; I won't bother if it's already underway with a new version? - Are you able to let me know what is planned and what is not?

Thanks, Randall

Instructions on this thread

Display screen with Date

Parse Display, larger

I'll keep the most recent attempt in this post.

 

EDIT - this post has been moved from another site; I'll re-post with the zip with "Wizard Start" macro included; you will need latest MEBasic MEX to test it reasonably at present.

BasicME Lite Discussion

EDIT June5th- fixed PGM Parse partly; correct number of tokens (not neg), some whitespace functionality; stopped crash with too many tokens

EDIT June10th - more funcs; DateDiff, bigger Display; new button 4.8.3

EDIT June12th - FileDate, IncToday 4.8.5 (sorry wrong file uploaded on 10th, not "exe"

EDIT June14th - fixed crashes?; IncFileDate, 4.8.6s ** SHOULD work for any date input format now and convert, USA or INTERNATIONAL

EDIT June14th; ** now has included Text Picker to return text line from listbox to ME3

EDIT June15th; corrected install path?/ close each time else doesn't pick new text file

EDIT June15th; more bugs; focus now on list in TextLinePicker

EDIT June15th; Slicker, doesn't need to close, list faster (check version should be 4.9.0)

EDIT June16th; tempted to take it down; but text picker inconsistent; use for other issues only

EDIT June16th;text picker exits each time again (inconsistent if open), and works for files (?) up to 4096 lines only?

cf Companion ME Basic;

EDIT June17th; Oh dear; messed up another directory; fixed "copy to me"; could paste from clipboard anyway?//added Text Filepicker and MultiFilePicker macros

BasicME Lite Discussion

***WINDOWS 98 work OK now !!!

EDIT - Source code now included in ZIP file with "exe" and MEBasic

SEE instructions for self- compiling script or reading it yourself, as in other thread;

Wizard instructions for Script, compile if needed

MEbasicWizard.zip

File link at top now

Edited by randallc
Link to comment
Share on other sites

Hi, Joe and Floyd,

Here is an example of what I thought of as a wizard for PGM.

I think, as it writes the code you select for you, it would make PGM more attractive? At the moment, the instruction set and manual are a little daunting?

What do you think?

Best, randall

CodeWizard%20PGM%20Example.JPG

Here is the generated Code;

PGM%20Wizard%20example1.JPG

The 3 zipped files need to go in Macro Express directory; you don't need the MEBasic.mex for PGM only (runs with "Control-Shift-W" in MeBasic MEX); just import the "Wizard Start" macro and run by hotkeywhen you are ready in Scrip Editor to insert some code (only PGM one so far is "Parse")

Best, Randall

PS Can you tell me if it is working other than on my machine!?

Edit June 6th; (PS I will keep most recent version on first post in this thread)

 

EDIT - Source code now included in ZIP file with "exe" and MEBasic

SEE instructions for self- compiling script or reading it yourself, as in other thread;

Wizard instructions for Script, compile if needed

MEbasicWizard.zip

Link to comment
Share on other sites

Sorry for being vague!

A. INSTALL

1. Unzip "MEbasicWizard.exe" to Macro Express directory (at present must be [Program Files Directory] "\Macro Express3" directory.

 

2. Hotkey (eg as in my mex file "Control-Shift-W"

 

[3. If you wish to try the MEBasic Demo (buggy!), run the macro library (already has the wizard start macro] as well. ]

 

(None of the installation is critical () you must ** once run the startup macro for registry of Install Directory; you could just in simplest form put the "MEbasicWizard.exe" anywhere, and make a shortcut; the output code just goes to the clipboard and could be inserted manually) - an "ini" file is made in Macro Express install Directory

 

B. RUN

 

1. Open a macro file in Script Editor, go to line (eg end of file, or preferably beginning of empty one while trying it out).

 

2. Press Hotkey.

[That will start the Wizard]

 

 

C. WIZARD.

 

1. Will open on "Command type" "MEBasic" at bottom left, with appropriate list in left child window, and default example as at top of list "BtwCharMid$" - you can use that if you want, to change the criteria and make an "MEBasic" macro (but won't run in ME unless you are running or have imported MEBasic MEX as from the zip file)

 

2. To change to others in list, simply single click.

 

3. For PGM, go to PGMFunctions in botttom left Combo Box. The left list will change; only one option; "PGM Parse Strings", comes up as selected default first in the list.

 

4. Change the start token number in appropriate updown picker (won't affect anything while Token count "0" as all tokens taken, so change to 1 or 2 , for example).

 

5. You will see the command in top blue window changes as you change the "Updown" selection, and the output changes in 2 windows.

 

6. Change the delimiter as desired./ Change the top input Window to try any string you wish to see the effects. (Click on the list item or any background grey area of the GUI to refresh display). (The final string left in this window (e.g. (%T2%)) will be exported eventually to your ME script when you “Create”).

 

7. Once you are happy with the selection, click on button bottom left ("Create ME Command"), and this will re-activate ME Script Editor and insert the generated lines (if occasional problem with focus, do it manually and simply "Paste" from clipboard)

 

8. You can delete those and re-run Wizard Start to return to the Wizard, or just get ready to generate another command in the Wizard and change back manually.

 

Please let me know if I am still not clear enough. Obviously, also, it is still just a demo; and I am still fixing what is there (have nearly got the "Whitespace" selection working, but not available in the current posting)

 

Best, Randall

(PS I will keep most recent version on first post in this thread)

Wizard

EDIT - you will need latest MEBasic MEX to test it reasonably at present.

BasicME Lite

BasicME Lite Discussion

Link to comment
Share on other sites

Hi, Joe and Floyd,

Here is an example of what I thought of as a wizard for PGM.

I think, as it writes the code you select for you, it would make PGM more attractive?  At the moment, the instruction set and manual are a little daunting?

What do you think?

I'm going to take a close look at this - but first could you please increase the sizes of the labels and text boxes starting with "Search Pattern 1", plus the command buttons shown under "Set Control Color".

 

I run at 1600x1200 with Large fonts, and your boxes don't reveal enough information!

Link to comment
Share on other sites

Hi, Paul,

 

Thanks for looking - See latest version (start of thread) as I am part way through increasing overall size; Not very tidy yet ( Oh well); I take your point. Thanks for the feeedback.

(You will see you can change the font for the text boxes on the fly; I'll organise to change defaults as well.)

Randall

Wizard latest version

ScreenShot

Link to comment
Share on other sites

Hi,

I haven't had any confirmation that the "Wizard" is working or easy/ difficult to run on other machines.

Can anyone please give me any feedback?

 

Additionally, I had hoped someone better at PGMacros could write some equivalent short scripts to emulate the string handling in MEBasic so I can incorporate them in the Wizard? - any takers?

Best, Randall

Link to comment
Share on other sites

Hi, Kevin,

 

Yes, I use the "RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Insight Software Solutions\Macro Express\Miscellaneous","Install Path")" in the Wizard; but I added the extra "\" by mistake, replacing "\macex.exe" with "\" instead of ""!

I still may have the script wrong....?

WOOPS! - Sorry again,

I had the fileexists directory wrong in MacroExpress, not Wizard!

line 13 if you want to fix it manually; I've uploaded it again

 

Randall

TextPickerWizard.mxe

Link to comment
Share on other sites

Slightly Off Topic:

 

To make your macros more portable, it is generally a good idea to use the Variable Set from Misc command to get paths rather than reading them from the registry itself. There are instances where, for some users, the Install Path is not in HKEY_LOCAL_MACHINE or if it does exist, it is inaccurate.

Link to comment
Share on other sites

OK Kevin,

 

I will change it in time; I have not heard of any more problems with the install path since I fixed the syntax, but that may just be because people have given up after all yesterday's glitches! Please let me know if you are able to get the Wizard running. (anyone?....)

Best, Randall

(PS I think some machines are too fast, and have not been taking in the installation path; today i have added a delay

Link to comment
Share on other sites

  • 4 weeks later...

Hi,

 

If anyone else still has tried the Wizard and got "no "commands.ini" file, try the following;

I had a Win98 machine with the same problem, and would not find the ini file until I deleted the old non-working one; now Win98 works!

 

Try:

 

1. Delete “commands.ini” from ME3 directory (old non-working, empty “ini” seemed not to delete with a re-install).

2. Use most recent “zip” file download for most recent versions.

3. Start “mex” library.

4. Run “startwizard” macro (starts automatically, scheduled at startup if you terminate and restart ME)

 

Please let me know if this does not work.

You should not have to edit to change install directory if you follow above.

 

Does it work now?

 

Best, Randall

Link to comment
Share on other sites

Got It - Really!

Oh Dear Again!

FIXED (please!) in 5.2.2.

Looks as though no-one else will have had it running either!

I have been lucky on my machines that I had another "ini" file present (left over from another program) AND a test file (test123.txt, with anything in it!) which saved me from the error.

Best Randall

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...