Jump to content
Macro Express Forums

Can a macro repeating 20x, each time put different text in 1 box?


Recommended Posts

I have a macro set up that enables me to share a Facebook video to about 20 different Facebook groups by hitting a hot key. each Facebook group has it's own macro and my hot key starts a group of macros running them 1 at a time until all 20 are done. 
 
Facebook keeps changing the share window and then I have to redo all 20 macros. Every macro is exactly the same except for where the macro puts the name of the Facebook group in the box.
 
So I'm wondering if Macro Express can instead run 1 macro 20 times, but each some put a different name in the box corresponding to each Facebook group? In other words only 1 command in the Scripting Editor would be the one that changes with each successive run of the macro until all 20 names are used.
 
This way if I have to change the macro in the future I only have to change 1 macro not 20 macros
 
Can this be done?
Link to comment
Share on other sites

  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

Perhaps something like this...

 

// Set URLs for Facebook groups here...
Variable Set String %Group[1]% to "/facebook.com/AAAAA"
Variable Set String %Group[2]% to "/facebook.com/BBBB"
Variable Set String %Group[3]% to "/facebook.com/CCC"
// Etcetera
 
Variable Set Integer %Count% to 1
Repeat Start (Repeat 3 times)
  Variable Set String %Target% to "%Group[%Count%]%"
  // The next line confirms the macro is on track...
  Text Box Display: %Target%
  Variable Modify Integer %Count%: Increment
  // Do something with the URLs...
   
   
End Repeat

 

Link to comment
Share on other sites

21 hours ago, terrypin said:

Yes. There are several ways you could do it. For instance you could use an array variable set up to contain the group names and its index could match the count through the Repeat loop.

 

 I like your solution. Below is the commands for variables for ME 3.10. I didn't see array variable listed. I assume I can use one of the commands below to get this done. Can you give me some guidance? I've used ME for many years, but I'm still pretty basic in the macros I've created. 

 

1355595815_macroexvariables.JPG.6994e14899e763917f32476444d888b1.JPG

Link to comment
Share on other sites

Check Version 3.10 help to find out whether it supports arrays.

 

If it doesn't, you will need to update to Version 5 or 6.

 

If it does support arrays, you can use my code sample as a starting point, but you will need to rename all of the variables: Text variables, such as %Target% and %Group[x], to T[1]. T[2], etc.; and the integer variable %Count% as %N[1]%.

Link to comment
Share on other sites

Gerry,

 

I'd echo @acantor's suggestion to update to a current version. As you've discovered, 3.10 did not support arrays in the form we have now but in fact its entire variable structure was based on arrays. For example T[1], a unique string variable, was treated as the first in an array of 99.

 

So if you do decide to stay with 3.10 then you could still follow the approach suggested, but it would be a little clumsier. Start with @cantor's code and tell us when you have difficulty progressing.

 

Terry

 

Link to comment
Share on other sites

Yes to the compatibility question (although you may want to make some minor changes). You could also take advantage of the free 30 day trial. On a possible discount I’d check with Insight Support either by direct email or via their Support Request form if you don’t get a response from them here.

 

Link to comment
Share on other sites

Definitely take advantage of the 30 day free trial. If you discover that Macro Express saves you significant time and headache, perhaps $49 will seem like a modest sum. It is hard to imagine the amount even partially covers the cost of developing the program. When I first began using Macro Express about 20 years ago, I figure I recovered the cost, in terms of increased speed and accuracy, in under an hour.

Link to comment
Share on other sites

  • 7 months later...
On 12/24/2019 at 8:36 AM, acantor said:

Perhaps something like this...

 


// Set URLs for Facebook groups here...
Variable Set String %Group[1]% to "/facebook.com/AAAAA"
Variable Set String %Group[2]% to "/facebook.com/BBBB"
Variable Set String %Group[3]% to "/facebook.com/CCC"
// Etcetera
 
Variable Set Integer %Count% to 1
Repeat Start (Repeat 3 times)
  Variable Set String %Target% to "%Group[%Count%]%"
  // The next line confirms the macro is on track...
  Text Box Display: %Target%
  Variable Modify Integer %Count%: Increment
  // Do something with the URLs...
   
   
End Repeat

 

I finally got Macro Express 5.0 and would like to resume trying to set up this macro. I've only done fairly simple macros in the past and this is confusing and would very much appreciate some more guidance. 
 
I'm working in the script mode and have my macro set up and am having trouble with just one part.  In the Facebook "share with group" window I can get the macro to navigate to a box where you insert the name of the group. The first one is named "Indie Global Music". I have about 20 groups to post to one at a time. In other words running this macro 20x each time with a different group name.
 
I'm not sure how to incorporate acantor's code. I'm not sure if it's supposed to be copy and pasted and then altered to my needs into Macro Express or what. It doesn't appear that I can copy and paste any of this in the script mode. I see a tab where I can go to the "Variables" mode. Should I use that?
 
Under Script editor I chose Variables / Variable Set String, but am unsure what to put into the boxes. I also see Variable Set Integer and also unsure what to put into the boxes.
 
Sorry to be such a novice in this area - please help
Link to comment
Share on other sites

My code is based on the idea that you can reach a Facebook group by entering its URL into the address line in the browser. To discover the URL, navigate to the group in the usual way (e.g., clicking on a button or link). Once you've arrived at the page, copy the address from the URL and use it in the macro.

 

The hotkey to navigate directly to the Address line is Alt + D. In Macro Express speak...

 

Text Type (Simulate Keystrokes): <ALT>d

 

Although some might say you need to do it this way.


Text Type (Simulate Keystrokes): <ALTD>d<ALTU>

 

Once the macro has brought you to the address line, enter the URL:

 

Text Type (Simulate Keystrokes): https://www.facebook.com/jdoe123/987654321<ENTER>

 

Hope these ideas take you a little further. It may take a bit of trial and error experimentation to get your macro to work!

Link to comment
Share on other sites

I have a feeling I'm not explaining this well. I think showing some pics may make it much clearer. Pic 1 is the window that opens when trying to share to a group. Near the top you'll see Group: and a blank box this is where the curser is and is expecting some text to go there, for instance "Indie Music Global". 
 
1828040282_FACEBOOKSHARE.JPG.a50d58884c794c3ee0cff7d01cca1123.JPG
 
Once that text is put in there and I add my comments, my macro goes to the bottom and hits "Post". Then the macro hits "Share to a Group:" again and a new box opens, I add a different group name, etc. 
 
This is where I need some help how to put a different name in there, in fact 20 different names, repeating this macro until I've posted this video to all the Facebook groups 
 
The 2nd pic shows my Macro Express window where I'm trying to solve this by using a Variable Set String and I assume also a Variable Set Integer. My question is how to I fill in those boxes for Variable Set String and Variable Set Integer to accomplish what I want. I think there are several ways to do this
 
1705652700_MACROEXVARIABLE.thumb.JPG.b61285004eefc7d38911c7c169f41de5.JPG
 
The 3rd pic is using the tab to go to"Variables". I wonder if that's the best way to accomplish this task. Maybe there's still another way to do this by copying and pasting acantor's text example into Macro Express, which may be even easier than these other approaches.
 
150526752_MACREXVARIABLEWINDOW.thumb.JPG.2c81b6640d635ea81754faa732d17bab.JPG
 
My very 1st post in this thread explains a little more of what I'm trying to do. I hope I'm explaining this better this time. Thanks for all the help
 
 
Link to comment
Share on other sites

6 hours ago, Gerry Peters said:
 The URL approach does apply at all to this situation, Facebook has a specific way to do this that only involves text.  All I need is a way to insert text into a box and finish running the macro, then with the next macro repeat I need different text in there. Thanks for all your help
 

 

Hi Garry.

 

One word missing from that first sentence 🙂 but I see your point.

 

I'll study your subsequent post later today, but I hope someone who actually uses FB will step in and help. The risk of accidentally 'sharing' stuff with 'groups' while testing your macro is one I'll avoid! But I hope it will prove to be just a careful use of the Repeat command.

 

Meanwhile, have you tried the new method described in this YT tutorial?

July 2020 - How To Post To Multiple Facebook Groups At The Same Time - NEW Facebook Beta

https://www.youtube.com/watch?v=DtzZ9gH5ufg

 

 

 

Terry, Sunday 16 August 2020, 0844 UK BST

 

 

Link to comment
Share on other sites

Sorry for the delayed reply, now I have researched the new Facebook and it certainly can do what I want very easily, yet for some reason they're not allowing all users access to it for now and I don't see where I can request it. 
 
So I'm back to where we were. Even if if I do eventually get the new Facebook, I'd still like to know how to place different text in a text box as each macros keeps repeating. One very flexible way was if it used a text file with all the group names in it, because that would be so easy to modify. Any ideas on how best to do this? 
 
Link to comment
Share on other sites

Frustrating: trying to develop a macro to perform a Facebook task when that feature has already been publicly announced!

 

For the reasons I gave I'm not going to be able to help much, sorry. But I could take a look at your macro to see if I can spot anything obvious. Post it, both the commands and the direct code, using the Code tool ('<>').

 

You said you have "used ME for many years," but I see you still appear to be using the Recorder? As well as posting your macro as it stands, also post a version with all the redundant lines removed, mainly Delays  and Mouse Moves.

 

Have you written other macros using Repeat loops?

 

Ideally: can you find another widely accessible web site or Windows application to demonstrate the same obstacle to progress that you're having in Facebook?

 

 

Link to comment
Share on other sites

I've checked with others on Facebook and they do not have the New Facebook either and can't get access to it. The New Facebook has been around since April, so who knows how long it'll be before I can get it, if ever. I've gotten no response from Facebook or their forum about this.

 

This is why I was using this opportunity as a learning experience to start getting deeper in ME. I would like to learn how to use String Variables and Arrays and Repeat Loops (which I've never used either). I've used the recorder, scripting editor and direct editor, but I have a feeling you and acantor are using a different method, which is more involved and that's ok I'm willing to learn and would like to use this month of my free trial to see whether 5.0 is something worthwhile for me. Solving this little problem with Facebook would convince me.

 

I've used my Facebook macro for years successfully, but since Facebook keeps making small changes with the Share box, I have to make small changes in the macro in order to get it to work again. This is a simple macro consisting of TAB, ENTER, ARROW DOWN PASTE, etc. All simply to navigate the Share Window shown above in the pic. The timing delays I put in there because I had trouble finding the right speed for it to work in certain spots.

 

There's nothing wrong with my macro except for me being at this impasse of wanting to put different names in 1 box each successive time the macro runs until I've gone through all 20 names. In the past I've solved this problem by having to make those changes to all 20 macros instead of this new method of only changing 1 macro.

 

I'm ready to move forward and learn new methods. If there's a tutorial that would help, let me know. Thanks for taking time to help me with this.

 

 

Link to comment
Share on other sites

Your code as requested? As mentioned, that might help us to help you.

 

And, as you are rightly regarding this as a learning exercise,  have you tried the suggestion in my last para?

 

It does sound as if you need to study the basics. The Help is comprehensive and well written. Most commands show simple examples you can try, and then adapt. Get some simpler macros containing a Repeat loop working before tackling the FB group sharing. For instance, from Windows File Explorer create a list in Notepad of each filename  in the active folder. That’s a task we can all access.

 

BTW, is the macro you’re trying to get working during the trial what I would call a mass marketing project?

Link to comment
Share on other sites

This is definitely not a mass marketing project, but I can understand your concern. I try to make these posts as concise as possible, but maybe it would be good to explain more. I have a music recording studio, Midi Magic Studio and for Christian Music -  Alleluia Christian Music Productions. http://gprecordingstudio.com

 

Facebook has these Music Groups. People that post are Independent Artists, songwriters, musicians, and recording studios. I post songs I've recorded in my studio to let people out there see and hear what I do, in case they feel like they'd like me to help them by recording their songs, or recording a CD project or having me cowrite a song to their lyrics. I first post a song on my Facebook Gerry Peters account, then I post on my 2 pages Midi Magic Studio and  Alleluia Christian Music Productions. I then share the post to different Facebook Music Groups.

 

As you can see in the upper post with the pics, I'm posting a song that has a single picture on it, so it's considered a video. Sometimes I actually create a full blown video for songs recorded in my studio to show people what I can do in case they'd like to use me for their project. If people like what they see and would like me to work with them, then they send me a message and we discuss if I'm a good fit for their project. 

 

I didn't find anything called the "Code Tool", is that the same thing as the Direct Editor?  Here's my macro viewed from the Direct Editor. 

 

<TEXT TYPE Action="0" Text="s"/>
<TEXT TYPE Action="0" Text="<ARROW DOWN>"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<TEXT TYPE Action="0" Text="<CTRL>v"/>
<TEXT TYPE Action="0" Text="<SHIFT><TAB>"/>
<TEXT TYPE Action="0" Text="<SHIFT><TAB>"/>
<TEXT TYPE Action="0" Text="<SHIFT><TAB>"/>
<TEXT TYPE Action="0" Text="<SHIFT><TAB>"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<TEXT TYPE Action="0" Text="s"/>
<TEXT TYPE Action="0" Text="<HOME>"/>
<TEXT TYPE Action="0" Text="<ARROW DOWN>"/>
<TEXT TYPE Action="0" Text="<ARROW DOWN>"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<TEXT TYPE Action="0" Text="<TAB>"/>
<TEXT TYPE Action="0" Text="\r\n"/>
<TEXT TYPE Action="0" Text="lyri"/>
<TEXT TYPE Action="0" Text="<DOWN ARROW>"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<TEXT TYPE Action="0" Text="<SHIFT><TAB>"/>
<TEXT TYPE Action="0" Text="<SHIFT><TAB>"/>
<TEXT TYPE Action="0" Text="<SHIFT><TAB>"/>
<TEXT TYPE Action="0" Text="<SHIFT><TAB>"/>

 

<TEXT TYPE Action="0" Text="<ENTER>"/>
 
This is my macro for posting in the Lyric and Songwriters United Music Group. Notice near the end the line: <TEXT TYPE Action="0" Text="lyri"/>  I didn't have to type the whole name of the group only a few letters: lyri. That's enough to bring up the name of that group. 
 
And that's the precise spot I'd like to have my group list kick in. I'm envisioning a simple Notepad text file with the 20 music groups all listed with their full names. I can easily alter a list like that for instance if I had a Rock song I may not want to post it in a Country group.
 
I think you have an excellent idea of my using my training wheels with Windows File Explorer. I hope I understood your suggestion. This is what I've done. I've created 3 notepad files named:
 
TEST 1.TXT
TEST 2.TXT
TEST 3.TXT
 
I put them in this folder
E:\My Documents\1 1 macro express
 
I've created a file that lists the 3 files and named it TEST 1-3.TXT and put it in the same folder. I'm not sure what you mean by active folder.. Is that a folder that I can share with this forum using my public file account with onedrive.live.com?
 
 I assume what you're getting at is having a macro use the file list to open those 3 files one at a time and then stop. Let me know if I did what you asked and thanks so much for helping me learn new techniques with ME
Link to comment
Share on other sites

I'll study your post later today but meanwhile you might want to practice the method of exchanging macros. As I said on Monday:

"Post it, both the commands and the direct code, using the Code tool ('<>'). "

 

CodeTool.thumb.jpg.09d4f1e659f087b8ed06bab93eab76b4.jpg

 

The forum itself is another rich source of learning material. Browse other posts for tips and detailed advice. For instance, here's a verbatim paste from a post by @Samrae two days ago:

--------------------

"To copy what you see in the Macro Script Editor, highlight the macro lines lines you want, right-click, and click "Copy Command Text". Then, in this forum, click the <> icon and type ctrl+v to paste. The result looks like this:

Text Type (Simulate Keystrokes): <ALT>e
Text Type (Simulate Keystrokes): <ALTD>e<ALTU>

To copy macro commands that someone can copy from this forum and paste into Macro Express, highlight the macro lines you want, right-click, and click "Copy". Then, again, in this forum, click the <> icon and type ctrl+v to paste. The result looks like this:

<TEXT TYPE Action="0" Text="<ALT>e"/>
<TEXT TYPE Action="0" Text="<ALTD>e<ALTU>"/>

 

Often when asking for help it is a good idea to post both. If you make it easy for forum members to understand and help you will get better answers. 🙂"

--------------------

 

Link to comment
Share on other sites

OK, I've now read your full post.

"I assume what you're getting at is having a macro use the file list to open those 3 files one at a time and then stop. Let me know if I did what you asked."

 

No! 🙂

What I've been aiming at is for you to attempt the macro I described, so that we can continue the discusson entirely outside Facebook.

So I've written the sort of macro I was hoping to see from you, but more in the style of a tutorial. Step through this and come back when you are able to get a successful list in Notepad.

Here are the macro commands:

 

// Use Comments like this generously. Particularly directly before a command to describe what it's about to do. That may seem obvious to you but not to others.
// This macro assumes that:
1. A folder is open in Windows File Explorer
2. A new empty text file is open in Notepad, 'Untitled - Notepad'
// Its purpose is to demonstrate a simple use of the Repeat command, as you said you have not yet used that. I'm hoping it ovecomes the obstacle you're having in your Facebook macro.
 
// Iin case you forgot to do so beforehand, the macro first activates the File Explorer window by using its exact or partial title as circumstances require.
// Activate the window with the exact title 'UK 2020', in case you forgot to do so beforehand.
Window Activate: UK 2020
// The first file in the folder should be selected by default, but the next command should ensure that.
Text Type (Simulate Keystrokes): <HOME>
// TextType commands often work OK without any delay but I often use a short one when developing. I can remove it later if proves to be redundant.
Delay: 0.1 seconds // Now, before attempting to insert a Repeat command, simply perform the basic task of this macro on a SINGLE element. In this demo it's the first entry, already selected at the top.
// As a novice, before inserting a Repeat command, first perform the basic task of this macro on a SINGLE element. In this demo it's the first entry, already selected in UK 2020.
// So get your macro working WITHOUT the following Repeat command and WITHOUT the End Repeat command near the end.
// For simplicity this loop will copy the the first TEN filenames (without the extension) to Notepad. Learn more about other Repeat options in Help.
Repeat Start (Repeat 10 times)
  Text Type (Simulate Keystrokes): <F2> // Switch to Edit mode
  Delay: 0.2 seconds
  Clipboard Copy
  Delay: 0.2 seconds
  // Create a variable with a name of your choice. (Note that I prefix mine with a 't', 'n', etc, to identify the TYPE of variable, but that's a personal preference.)
  Variable Set String %tFilename% from the clipboard contents
  Delay: 0.1 seconds
  // For testing your macro you can use temporary commands like the following.
  Text Box Display: TEMP // Disabled after testing
  // The filename is now on the clipboard, so restore normal mode before you forget.
  Text Type (Simulate Keystrokes): <ESC>
  Delay: 0.1 seconds
  // NOTE: When you are entering any command you can type F1 to display Help about it.
  // NOTE: To quicklly test the macro use F9 from here in the Script Editor. In 'Start Debugger in a Different Window', for this demo choose '<<Don't Switch Focus>>, so that you can check your Activate command is working.
  // NOTE: To quicklly test the macro use F9 from here in the Script Editor. In 'Start Debugger in a Different Window', for this demo accept the top option, '<<Don't Switch Focus>>, so that you can check your Activate command is working.
  // Now the macro needs to copy that line into the waiting Notepad file.
  // NOTE: We could have done this with a simple Paste, but I chose the variable method as you said you have not yet used it. And it's more flexible anyway, because you might want to use that variable value again much later.
  Window Activate: Untitled - Notepad
  // Often you can use a Wait for Window Title command after Activate, to ensure it is ready before proceeding. But in this case (as I frequently find) it didn't work reliably, so I used a Delay instead. Some trial/error may be needed to get the delays optimsed.
  Delay: 0.2 seconds
  Text Type (Simulate Keystrokes): %tFilename%
  Delay: 0.1 seconds
  Text Type (Simulate Keystrokes): <ENTER>
  Delay: 0.1 seconds
  Window Activate: UK 2020
  Delay: 0.2 seconds
  // Select the next line, ready to repeat the cycle.
  Text Type (Simulate Keystrokes): <ARROW DOWN>
End Repeat
// Now proceed with whatever other tasks are needed.

 

And here is the code you can paste into a new macro and then edit to reflect your own folder choice.

 

<COMMENT Value="Use Comments like this generously. Particularly directly before a command to describe what it's about to do. That may seem obvious to you but not to others." _BACK="0080FFFF"/>
<COMMENT Value="This macro assumes that:\r\n1. A folder is open in Windows File Explorer\r\n2. A new empty text file is open in Notepad, 'Untitled - Notepad'"/>
<COMMENT Value="Its purpose is to demonstrate a simple use of the Repeat command, as you said you have not yet used that. I'm hoping it ovecomes the obstacle you're having in your Facebook macro."/>
<COMMENT/>
<COMMENT Value="Iin case you forgot to do so beforehand, the macro first activates the File Explorer window by using its exact or partial title as circumstances require."/>
<COMMENT Value="Activate the window with the exact title 'UK 2020', in case you forgot to do so beforehand."/>
<WINDOW ACTIVATE Title="UK 2020" Exact_Match="TRUE" Wildcards="FALSE" _IGNORE="0x0006"/>
<COMMENT Value="The first file in the folder should be selected by default, but the next command should ensure that."/>
<TEXT TYPE Action="0" Text="<HOME>"/>
<COMMENT Value="TextType commands often work OK without any delay but I often use a short one when developing. I can remove it later if proves to be redundant."/>
<DELAY Flags="\x01" Time="0.1" _COMMENT="Now, before attempting to insert a Repeat command, simply perform the basic task of this macro on a SINGLE element. In this demo it's the first entry, already selected at the top."/>
<COMMENT Value="As a novice, before inserting a Repeat command, first perform the basic task of this macro on a SINGLE element. In this demo it's the first entry, already selected in UK 2020." _BACK="00C080FF"/>
<COMMENT Value="So get your macro working WITHOUT the following Repeat command and WITHOUT the End Repeat command near the end."/>
<COMMENT Value="For simplicity this loop will copy the the first TEN filenames (without the extension) to Notepad. Learn more about other Repeat options in Help."/>
<REPEAT START Start="1" Step="1" Count="10" Save="FALSE"/>
<TEXT TYPE Action="0" Text="<F2>" _COMMENT="Switch to Edit mode"/>
<DELAY Flags="\x01" Time="0.2"/>
<CLIPBOARD COPY/>
<DELAY Flags="\x01" Time="0.2"/>
<COMMENT Value="Create a variable with a name of your choice. (Note that I prefix mine with a 't', 'n', etc, to identify the TYPE of variable, but that's a personal preference.)"/>
<VARIABLE SET STRING Option="\x02" Destination="%tFilename%" NoEmbeddedVars="FALSE"/>
<DELAY Flags="\x01" Time="0.1"/>
<COMMENT Value="For testing your macro you can use temporary commands like the following."/>
<TEXT BOX DISPLAY Title="TEMP" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil Tahoma;}{\\f1\\fnil\\fcharset0 Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 tFilename\\f1  = \\f0 %tFilename%\r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0" _ENABLED="FALSE" _COMMENT="Disabled after testing"/>
<COMMENT Value="The filename is now on the clipboard, so restore normal mode before you forget."/>
<TEXT TYPE Action="0" Text="<ESC>"/>
<DELAY Flags="\x01" Time="0.1"/>
<COMMENT Value="NOTE: When you are entering any command you can type F1 to display Help about it." _BACK="0080FFFF"/>
<COMMENT Value="NOTE: To quicklly test the macro use F9 from here in the Script Editor. In 'Start Debugger in a Different Window', for this demo choose '<<Don't Switch Focus>>, so that you can check your Activate command is working." _BACK="0080FFFF"/>
<COMMENT Value="NOTE: To quicklly test the macro use F9 from here in the Script Editor. In 'Start Debugger in a Different Window', for this demo accept the top option, '<<Don't Switch Focus>>, so that you can check your Activate command is working."/>
<COMMENT Value="Now the macro needs to copy that line into the waiting Notepad file."/>
<COMMENT Value="NOTE: We could have done this with a simple Paste, but I chose the variable method as you said you have not yet used it. And it's more flexible anyway, because you might want to use that variable value again much later." _BACK="0080FFFF"/>
<WINDOW ACTIVATE Title="Untitled - Notepad" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/>
<COMMENT Value="Often you can use a Wait for Window Title command after Activate, to ensure it is ready before proceeding. But in this case (as I frequently find) it didn't work reliably, so I used a Delay instead. Some trial/error may be needed to get the delays optimsed."/>
<DELAY Flags="\x01" Time="0.2"/>
<TEXT TYPE Action="0" Text="%tFilename%"/>
<DELAY Flags="\x01" Time="0.1"/>
<TEXT TYPE Action="0" Text="<ENTER>"/>
<DELAY Flags="\x01" Time="0.1"/>
<WINDOW ACTIVATE Title="UK 2020" Exact_Match="TRUE" Wildcards="FALSE" _IGNORE="0x0006"/>
<DELAY Flags="\x01" Time="0.2"/>
<COMMENT Value="Select the next line, ready to repeat the cycle."/>
<TEXT TYPE Action="0" Text="<ARROW DOWN>"/>
<END REPEAT/>
<COMMENT Value="Now proceed with whatever other tasks are needed."/>

 

 

 

Link to comment
Share on other sites

 What a whole new universe you've opened up for me - thanks. I'm not able to find the code tool. I see that pic you have with it there, but can't seem to get that myself. I've tried quite a few different things and don't see that come up. 
 
I have the regular ME window that opens showing all the macros, then if I double click a macro it opens a 2nd window. Is it because these macros were created in 3.0? I'm using version 5.
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...

×
×
  • Create New...