Full Version: key code for new line in text?

From: Carl (CSEWELL) [#19]
 12 Jul 2006
To: logojohn [#13] 15 Jul 2006

quote:
If you have any macros that will do the job I am game.


I've attached the ReplaceTabs macro. It ran without problems on your CDR file with CorelDraw version 12.

Exit CorelDraw and copy the GMS file into the GMS folder under the installation directory for CorelDraw. It should look something like this:

\Program Files\Corel\Corel Graphics 12\Draw\GMS

Start CorelDraw and open your CDR file that has the text. Select the paragraph text that you want to replace TABS with CR/LF. Select Tools>Visual Basic> Play and you will get a pop-up window. Towards the bottom of that window you'll see Macros In. Select the arrow down next to that text box. Look for and select "ReplaceTabs(ReplaceTabs.gms). Start ReplaceTabs should be put in the main text box. Click on Run and observe.

If you'd like to add the macro as a command button on your toolbar, let me know and I'll send you instructions for doing so.

From: Pedaler (ROYBREWER) [#20]
 12 Jul 2006
To: logojohn [#1] 15 Jul 2006

John,

Are you aware that you can take a tab delimited file from Excel directly into Corel's Print Merge(Corel 10 and higher)? I understand, of course, that you'd still have to fight with Corel's inability to autocondense.

Do you recall us talking about my MakeVARs program which, among other things, takes comma delimited files from Excel and converts them to Xenetech format .TXT files? This has been a freeware program for several years that numerous Xenetech users have found helpful. eMail Jeanette if you'd like to fiddle with it --- no DOCs but has pretty good Windows Help file.

From: Pedaler (ROYBREWER) [#21]
 12 Jul 2006
To: logojohn [#1] 16 Jul 2006

John,

I should have also said that I developed a "freebie" Excel add in that already does exactly what you want, but you'd have to have Excel to make it work.

I am not an expert @ Excel, but I think even the Office97 version will still open up current .XLS files and my add in was originally created in 97 and has been tested through Office2003.

[[[ for the uninitiated, an Excel Add In is just a macro that is easier to install and explain than a macro]]]]

From: logojohn [#22]
 15 Jul 2006
To: Carl (CSEWELL) [#19] 16 Jul 2006

Thanks a lot.
It was easy to install and it worked great with x3.
I like that you can select what you want it to work on in case you have
other things on the page you want to ignore.
By opening the excel file in open office and pasting into coreldraw, it lets me do it at home or on more than the one computer that has excel on it at work.

For occassional use without installing the macro, the
Search For: <Tab>
Replace With: <Hard Return>
also worked well after pasting the text into coreldraw.
I got a blank text box when importing the excel file directly into x3.

I am also going to pursue Roys suggestions as it is best to have several options. The Office 97 suite with excel has opened all the excel files I have gotten so far. It is on an XP computer that is working fine now. But I tried to move it by reinstalling from the original disk to a newer XP computer. I got some kind of message saying it wasn't compatible. But the computer it is on should have a few years of life left.

Do you or Shaddy have other useful macros ready to go? People haven't expressed much interest but maybe they will realize the potential later on. I am guilty of ignoring posts about macros from awhile back. It was just one more thing to find time to do. I didn't realize how much time they could save for some things and how easy they are to install and run. Here are some links to pages that were posted earlier.
http://www.isocalc.com/cooltools/index.htm
http://www.oberonplace.com/vba/drawmacros/index.htm

Did you ever develop one to replace the print merge? It would be nice to have the result in corel draw where you could edit it instead of just at the print output.

If it isn't too complex, it would help to have the command button on the toolbar.

.

EDITED: 16 Jul 2006 by LOGOJOHN


From: Carl (CSEWELL) [#23]
 16 Jul 2006
To: logojohn [#22] 23 Jul 2006

quote:
Did you ever develop one to replace the print merge?


Yes, a very preliminary one. It will read one name per line of a text file and let you specify the horizontal (X) and vertical (Y) separation distance between each name. It will allow you to place the longest name into the currently selected text so that you can size the 'original' for the longest name. I think it can be easily expanded to handle multiple data fields (tab or comma delimited, or one field per line), but it will take some time and motivation. Right now, it does what I need it to do. It should be possible to ensure that each data field fits within a certain specific size, if need be. The options are pretty much endless. It just depends on what you need and how often you would re-use it. I think Shaddy is also working on a Print Merge.

I have a CopyXY which array copies selected objects. I think X3 now has this feature. I use this one just about every day. You specify the X and Y offsets and the number of rows and columns and it copies the objects for you. Oberon has a "tiler" macro that does something similar. I developed CopyXY as a stepping stone to the Print Merge. In fact, I used the code from CopyXY for the preliminary version of my Print Merge. A radial version would also be helpful (layouts for dials, clocks, or whatever). Yes, the same thing can be done with Transformations, the "+" key, and ......, but the macro, in my humble opinion, is far simpler and far quicker than the others. I guess that's why Corel finally decided to add such a command.

There's a few others that work mainly on layers. I tend to work with a lot of layers (Objects, Text, Notes, Laser Settings, Company specific runs, Variations, etc) so they are handy for me. I also do graphic work (vector conversions mainly) for local companies and the use of layers is extremely powerful when you're working with large EPS files, or color separations. I can also put alernatives on different layers so my customers can easily pick and choose.

I also created one that saves the current file to a previous CorelDraw version and adds a suffix to the filename (MyFile-v7.CDR, for example) so I know the file version without opening the file. This might be useful for people that are using X3 and 12, or a lower version. I use it a LOT because I have several clients that are still using lower versions of CorelDraw (7 and 8!) and I got tired of going over there with a version 12 file and not being able to open it! In case you haven't done it, you have to go through a save as and then remember to pick the version number. CorelDraw defaults to the highest version. Oh, if you ever need to figure out the version of a CorelDraw file, open the CDR file with NotePad and you can see the file version on the first line. It will look something like: CDR7vrs.

quote:
If it isn't too complex, it would help to have the command button on the toolbar


It's fairly straight forward and once you do it, it is fairly intuitive. To add a command button for a macro to the Toolbox toolbar:

- Right click anywhere on the toolbox toolbar and follow Customize> Toolbox Toolbar> and then click on Add a new command
- In the new window, just below the word Command (top center of the new window) is a text box with File. Click on the down arrow and find and select Macros (it's at the top of the list).
- In the text list box below, find the macro that you want to add as a command button and click on it ONCE.
- You can add a tool tip (see box to the right) under the GENERAL tab.
- Or use a shortcut key for it under the SHORTCUT KEYS tab
- Click on the Appearance tab.
- Here you can change the ICON by IMPORTing one or drawing your own!
- You may want to change the caption (above the ICON) to something simpler than what is displayed.
- Once you get all that done (and you can come back and modify this later), left click (hold down the mouse button) on the macro name in the list box (to left of the tabs section, where you first clicked on it above) and drag it to the toolbox toolbar. Or wherever you want.
- You can undo the command button by dragging it back to where you dragged it from.
- You can go back and modify the icon or tooltip without having to drag it to the toolbar again.

Let me know how this works and any problems or questions that might have or if you need a screenshot for clarification. Anyone else that wants to chime in (Shaddy?), please feel free to do so.

I've created a separate flyout specifically for macros, and also have a floating toolbar with macros and commands that I use often or that I want locally to where I'm working rather than having to go all the way over to the toolbox or property bar. You can EXPORT your whole workspace or individual toolbars. I use this to easily move customized toolbars between computers. I could probably distribute all the macros and a customized toolbar (with my generic icons) in two filetypes, the GMS (for macros) and the XMLT (I think) for toolbars.

If you haven't already, you may want to EXPORT your workspace to save it in case you have to F8. In fact, I would recommend this for anyone that has made any modifications to their workspace.

I was really hoping there was a REAL programmer lurking out there that has already done a lot of this and would be willing to contribute macros and help, but, until that person shows up, I guess I'll do what I can when I have time. Hopefully, Shaddy will continue to contribute also.

One of my computers has developed a CPU usage problem with Explorer and LSASS.EXE that I've been trying to resolve. I may have to re-install Win2K or pony-up for an upgrade to X3 since Microsoft is phasing out support and upgrades for everything but XP.

From: Shaddy [#24]
 16 Jul 2006
To: logojohn [#22] 23 Jul 2006

I'm working on something more simple than Print Merge... that's a very complicated program that I don't have the brains to mimic. What I'm working on is more basic. It's broken up into separate features... A duplicator portion that works like Oberon's Tiler (Carl pointed that out, would have saved me some time to use thiers :S ). If you rename text objects to the right name, another feature will fill in the text from an excel, access or text file. It will also have a serial number feature to increment a text field, starting from any number. I tired to keep the processes separate because you might have use for portions of it, and not want the rest.

So, it'll only be used for simple things where you don't need the full featured Merge.

I need another week or two of prettying though. Everything is still in different files and I'm combining them and making user friendly. It's a big program.

Shaddy


From: logojohn [#25]
 16 Jul 2006
To: Carl (CSEWELL) [#23] 16 Jul 2006

How hard would it be to make a macro that would let you select several lines of text(not in paragraph boxes) and replace them with a text list with the same number of lines.

That might be easier than trying to duplicate and move the whole individual plate over at the same time.

If it is easier, you could just duplicate the individual item on the same coreldraw page with the same text first. Easy to do with just the cntrl d that moves the next one or entire line over and down the same amount.
Then select the lines that change, for example all the names, and just paste in the list.

That would also work for plaques with several lines that you have a text file for.


.

EDITED: 16 Jul 2006 by LOGOJOHN


From: Carl (CSEWELL) [#26]
 16 Jul 2006
To: logojohn [#25] 23 Jul 2006

quote:
How hard would it be to make a macro.....


An interactive cut-n-paste? Select the Corel text objects that will be replaced and then copy the replacing text from another application (or e-mail?) to the clipboard, and run the macro which will take the clipboard text and put it in the selected Corel text objects?

Have I got that right?

If so, the macro is ready (it may need a little more work). You just have to order the Corel text objects in the same order as your items in the clipboard and make sure that the objects that will be placed on the clipboard will end in CR/LF. Will that work? Will you take responsibility for making sure that the number of items matches (ie 6 Corel text objects were selected and 6 lines of text were copied to the clipboard)?

Wow. I just reread your post and realize that if you have all the 'plates' set up, with text objects for each plate, one name per plate, you can select all the text objects and paste all the names!!! Or..... wait.... I've got a headache.

Let me know if I understood you correctly and if this macro should be polished and released.

From: Shaddy [#27]
 16 Jul 2006
To: logojohn [#25] 23 Jul 2006

How mine would work, is to make all the plates first, if they are the same... you would use the Duplicate feature of my macro that will tile as many as you want. Then you would use the Data Import part, where you would tell it a file (text list or excel sheet, maybe Access but I haven't played with that much yet). It would fill in the text on the plates.

Here's an example. Let's say you have a plate with 4 fields (so far it's my max). One could be named the Title that is the same on every plate (maybe something like a name tag "Hello, My name is". Then one or two text objects that are named Variable1 and Variable2 (I'm not imaginative, but they are accurately named). Those would be taken from your lists and fill in accordingly probably a name and something else. The final one would be Serial that just counts up like a serial number.

So far that's all I have need for, but it wouldn't be a stretch to incorporate more.

I prefer to use Names on the objects to avoid confusion, and to make it easier for future changes. So if you want to use the same page of plates, then just change the names, you just run the macro and just choose to change the names (there will be Check Boxes). Or if you just need the serial feature, you could just make all the plates, then just run it with Serial selected.

Sometimes you only want some of the plates changed though, so I do have you have to select the plates first (but a whole page is easy using CTRL-A). I might make that optional too though.

Might be a while yet, and there will probably be different versions as people help me tweak. I only have X3 on this PC, so after I make it, I have to take it to another PC and tweak it for use on 12. Versions before that might be out of luck as I don't have other versions :S 


Shaddy


From: Harvey only (HARVEY-ONLY) [#28]
 17 Jul 2006
To: Carl (CSEWELL) [#23] 17 Jul 2006

On one computer forum they claims that LSASS.EXE was basically spyware????

They had instructions to remove it.

I did and also the program called LSASS.EXE with either one more or one less S in it. [Either LSAS.EXE or LSASSS.EXE] I think there was one more step to keep it from coming back. I found it on the Internet by searching for LSASS.EXE. It may be why I had less problems with software that some other people.

Search, read and try it.


From: Dave Jones (DAVERJ) [#29]
 17 Jul 2006
To: Harvey only (HARVEY-ONLY) [#28] 17 Jul 2006

A lot of viruses use names that are the same as real system programs. lsass.exe is a microsoft component used for security in a networking environment. But a file by the same name is also part of the sasser worm. I'm not sure if the worm replaces the microsoft file, or if it puts one by that same name in a different folder. I'm sure there is info available at sarc.com (Symantic Anti-Virus Research Center)

From: Carl (CSEWELL) [#30]
 17 Jul 2006
To: Harvey only (HARVEY-ONLY) [#28] 17 Jul 2006

quote:
On one computer forum they claims that LSASS.EXE was basically spyware????


And LSASS.exe is a process that needs to run for Windows. And it's fairly easy to determine if the LSASS.exe is a virus or not.

Yep, I'm fairly diligent with keeping up with virii. And I've run and re-run adware and spyware programs that found a few harmless cookie tracking items connected with IE. This problem is not a virus, nor does it appear to be adware or spyware related. After turning just about everything (services/drivers/devices) on and off many times, it appears that the problem may be somehow tied into the FAX service. Disabling fax send/receive appears to eliminate the problem.

Microsoft had a previous problem with a patch that broke all kinds of OLD modem drivers several years ago. This may be another one of those problems. I may just eliminate my computer fax or move it to another machine.

Thanks, though.

From: logojohn [#31]
 18 Jul 2006
To: Carl (CSEWELL) [#26] 18 Jul 2006

That sounds like what all I need.

I have badge layouts placed on a page to be printed for sublimation.

There is a color logo, 1 line that doesn't change and I print a rectangle for a guide to place the precut blanks.

The name and 2 other lines change.
The length of the title and some names vary a lot. If I use the print merge the only way is to have different runs or make the title small enough for the longest line which looks stupid on the ones with short titles.

The first run was over 100 but most of the time its less than 1 sheet right now. But we seem to be getting more color requests so I would like some shortcuts when the inevitable order for 500 shows up.

Now I am just selecting one line at a time and pasting from the text file.
I could lock all the lines that don't change so I could select the changing ones easily and make sure they run from top to bottom to match the text file.

I would just like to select about 30 lines (or less) 3 lines x 10 badges.
And paste the text from the list.

If it would automatically duplicate from one, move it over or down to fill the page that what be a plus but just the multiple line text pasting would save the most time for me.

Is it possible to make a macro that would rearrange objects and/or text lines from top 2 bottom and left to right.

Xenetech has a top to bottom resort that works great if you move lines around in a plaque layout. They don't sort left to right so if I am working on a logo with several objects that were text letters in coreldraw, when engraved on the rotary each line will skip around unless you sort them in order one at a time.

I had 5 long lists of excel lists that the macro for that worked great on.
They were just lasered so it was easy to paste into Xenetech.

.

EDITED: 18 Jul 2006 by LOGOJOHN


From: Carl (CSEWELL) [#32]
 18 Jul 2006
To: logojohn [#31] 23 Jul 2006

quote:
Is it possible to make a macro that would rearrange objects and/or text lines from top 2 bottom and left to right.


Absolutely. I used to do a lot serpentine sorting for surface mount pick-and-place and adhesive machines.

However, I think Shaddy has a better approach and it is probably the same approach that Print Merge uses and also the 'name dropper' program. That approach is to name the text objects and then use that for the replacement. Then it doesn't matter....... well, I was going to say it doesn't matter where they are at, but it does. You'll need to have them grouped together or give them index-like names: FirstName1, LastName1, Title1, etc. Or, you'll have to fill the names as you duplicate them. Or.... I'm missing something.

If you want to experiment with a couple of macros and see what works best for you, I'll send you a couple via e-mail. You might have to invest a little time now to save some time in the future. The last macro I created might be all that you need. Cutting-and-pasting 30 names/titles at a time should be about 30 times faster than 1 at a time and a whole lot more accurate.

Were you able to create a command button on the toolbox toolbar for a macro?

From: logojohn [#33]
 18 Jul 2006
To: Carl (CSEWELL) [#32] 18 Jul 2006

fell free to email them
logojohn
at
swbell.net

I flagged the message about the toolbar but havent been able to try it yet.
Nothing is working right this week so all I can do is get the work done.

Thanks
.

Show messages:  1-18  19-33

Back to thread list | Login

© 2024 Project Beehive Forum