Jump to content
Macro Express Forums

Strange Variable Error


Recommended Posts

I've copied this post from (what should be) the end of the following thread on the ME 3.x forum:

http://pgmacros.invisionzone.com/index.php...amp;#entry13351

 

Terry and Steve -

 

I have used the <CTRL>a technique with Internet Explorer, never with Firefox. On some IE screens I found it is necessary to click once with the mouse, somewhere inside the window, before doing the <CTRL>a. Without the click, nothing gets highlighted and therefore nothing is copied to the clipboard. Depending how the browser screen was built, it might be necessary to click in different areas, say near the top as opposed to the middle, etc.

Hi Bob,

 

I hadn't been using Firefox for this macro (even if I had, the macro should still work, though). However, after your post, I felt it best to give other browsers a try. I have duplicated the error in IE, Google Chrome, Firefox, and Opera.

 

I am clicking in the window before running the macro, and the Ctrl+a is highlighting the entire page. The error is occurring because the macro is not recognizing Text variable %T[1]%, which is just silly.

 

Steve,

 

That error about variable type is exactly what I was getting earlier. Yet as you probably saw from my subsequent reply to Stan, a repeat run of the same macro a few hours later did not give the error. This sort of inconsistent behaviour is why I feel that ME 3 Pro is still flakey in the variables area, but without being able to pin it down.

 

--

Terry, East Grinstead, UK

Hi Terry,

 

I am back after several hours and at first it ran fine, but then I realized that ME 3 was running again (I'd rebooted

in the mean time). As soon as I suspended ME 3, the error returned. When your macro started working again, are

you sure it wasn't ME 3?

 

What really gets me is that the error does not occur if I run the macro within the message box. Just the

regular web-page. The macro works in Notepad as well. The error seems to be HTML-related, I guess. It's late,

I'm confused.

Link to comment
Share on other sites

Hey Terry,

 

I just now got a chance to look into my macro and experiment with why it isn't working in ME Pro. My first thought

was that it was a timing issue; and, in fact, it was - at least initially. ME Pro is so fast that it tried to find the required

text before my computer had been able to complete the Clipboard Copy. So I incorporated a pair of .5 second

delays (I always start with a big delay and then work my way down).

 

On the very first run with the delay I got an error. I will be bug-reporting it in a few minutes.

 

I reproduced that exactly.

 

I made no changes. I pasted your code in directly and assigned it a hotkey activation of Alt+F8. ME3 was not running.

 

1) Running it on this thread consistently gave the error on Line 7 which we've both reported previously.

 

2) Running it on my text editor, TextPad, or Notepad was consistently OK. (Observing that as it stands your macro is case sensitive.)

 

3) Running it on this alternative thread Cannot scope a pop-up menu here in the same ME Pro forum, it ran but gave the wrong result on all the words I tried, e.g. 'specifying', 'dialog', 'spending'.

 

4) Running it on a dozen or so other sites, I found only two that gave the error under discussion: this thread and the one that spawned it in the ME3 forum, http://pgmacros.invisionzone.com/index.php...amp;#entry13351

(That seems to support your suspicion that it's HTML related.) Several gave the other error reported in 3) above.

 

Also, a couple of times during maybe 20-25 tests the macro didn't run at all. I hit Alt+F8 a second time and it ran (with the above results) so I suppose it's possible I didn't tap the keys hard enough. Or maybe it needs an additional delay at the very start. Anyway, I mention it in case it offers any clues.

 

I'm assuming you've reported this via the ISS Bug Report page?

 

(For any other interested users who don't have the link to hand, that's at http://www.macros.com/bugreport.htm )

 

It would be helpful if ISS could give us a summary of the state of play on this and other related 'ME Pro Variable Issues', including:

a] What previously (beta test) reported problems ISS say are already fixed and working in the current release (the one we're all using). (Such as the 'it' in my recent exchange with Cory.)

b] What ME Pro (current release) reported bugs about variables are now recognised (including this one).

c] Which of these are now fixed and awaiting inclusion in the next release - hopefully imminent.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I didn't read the whole thing but are you trying to poll a web page? I have, in most cases, given up on actively using a browser and instead use a utility called Downloader. It's a standalone EXE that requires no installation and the usage is simple as shown below. There are many like this but I just want the HTML so I can use it as a variable in MEP to find things or do things with it. The example below downloads the "High Group" list from the SSA every day for validating SSNs. Another nice thing about it is the whole "Wait for" problem with web browsers goes away as you can wait for the file to exist and be ready. And with MEP you can actually use it's appearance as an activation. In this case I actually run it form the Windows Scheduler so even if MEP isn't running on this machine new versions will be downloaded for all the other users on a routine basis.

 

Downloader.exe -download http://www.ssa.gov/employer/ssns/highgroup.txt C:\IPData\Apps\Macros\highgroup.txt

Link to comment
Share on other sites

This error occurs when the text you save to a variable contains a %something% string. This string causes the undefined variable error. Any pages copied to the clipboard that did not contain a string of %something% would not generate the error.

 

The problem has been fixed.

Link to comment
Share on other sites

This error occurs when the text you save to a variable contains a %something% string. This string causes the undefined variable error. Any pages copied to the clipboard that did not contain a string of %something% would not generate the error.

 

The problem has been fixed.

 

Pleased to hear that, Stan. I don't suppose you can give us some idea when the next release (presumably including that fix) will come out please?

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

I didn't read the whole thing but are you trying to poll a web page? I have, in most cases, given up on actively using a browser and instead use a utility called Downloader. It's a standalone EXE that requires no installation and the usage is simple as shown below. There are many like this but I just want the HTML so I can use it as a variable in MEP to find things or do things with it. The example below downloads the "High Group" list from the SSA every day for validating SSNs. Another nice thing about it is the whole "Wait for" problem with web browsers goes away as you can wait for the file to exist and be ready. And with MEP you can actually use it's appearance as an activation. In this case I actually run it form the Windows Scheduler so even if MEP isn't running on this machine new versions will be downloaded for all the other users on a routine basis.

 

Downloader.exe -download http://www.ssa.gov/employer/ssns/highgroup.txt C:\IPData\Apps\Macros\highgroup.txt

Hey Cory,

 

Somebody on they ME3 board had asked for an easy way to run a macro that would find specific text on a web-

page, and then the macro would continue differently based on whether or not the text was present on the page.

 

I had given an example of a macro that would prompt for the text, Select All, save to variable, and then compare

the prompted text against the contents of the variable. The macro worked fine in ME 3, but erred in ME Pro... but

only on some web-pages.

 

And now it looks like that error will be fixed with the new release - Thanks Stan!

Link to comment
Share on other sites

A bug found by our QA testing caused a delay in the release. Rather than post a specific date for a new release (and get these 'where is it' queries) we probably should just post a statement that we are working on a new version and will release it as soon as we can get it done.

 

Stan: Presumably you'll post here when it does get released? I see nothing yet at http://www.macros.com/download.htm

Of course, we always post an announcement in the forums when a new version is released. In addition, announcements are sent via the Macro Express News email newsletter, the RSS feed and posted to the Macro Express Revision History, Macro Express Download, What's New at Insight Software Solutions , Insight Software Solutions home web pages.

Link to comment
Share on other sites

A bug found by our QA testing caused a delay in the release.

Late today we fixed the bug that caused the delay in releasing an updated version of Macro Express Pro. We will begin our QA testing tomorrow (Jan 20). If no other major problems are found we should be able to release the update later this week.

Link to comment
Share on other sites

Late today we fixed the bug that caused the delay in releasing an updated version of Macro Express Pro. We will begin our QA testing tomorrow (Jan 20). If no other major problems are found we should be able to release the update later this week.

 

Thanks.

 

BTW, is there something wrong with your date setting? Your post is reported here as being sent at Today, 12:32 AM, and the quote is consistent with that, showing QUOTE (kevin @ Jan 20 2009, 12:32 AM) yet it was around 07:00 when I first read it - and it's only 10:06 GMT now, on Tuesday 20th Jan.

 

---------

 

Edit: I suppose this is because this forum formats times between midnight and 01:00 as 12:xx, instead of the 00:xx I'd expect? That's why I always use 24 hour format whenever given the option! ;)

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Thanks.

 

BTW, is there something wrong with your date setting? Your post is reported here as being sent at Today, 12:32 AM, and the quote is consistent with that, showing QUOTE (kevin @ Jan 20 2009, 12:32 AM) yet it was around 07:00 when I first read it - and it's only 10:06 GMT now, on Tuesday 20th Jan.

 

--

Terry, East Grinstead, UK

Hi Terry,

I wonder if it's just a Time Zone issue. When I look at Kevin's post it says: "Posted Yesterday, 05:32 PM" (Yesterday being Monday the

19th) and when I look at your post wherein you quote that very post it says: "QUOTE (kevin @ Jan 20 2009, 12:32 AM) "

 

So the date you see (and therefore the date that gets quoted) is based on your time zone (GMT). My time zone is GMT -7, so I see 5:32

PM. So Kevin posted his comment at 5:32 PM GMT -7 on Monday 19 January (which is 12:32 AM GMT on Tuesday 20 January).

 

If a post is made at 12:30 AM it stands to reason that the post would be there 6 1/2 hours later (at 7 AM) as well as at 10:06 am. I wonder

if you possibly have confused 12 AM and 12 PM?

Link to comment
Share on other sites

Hi Terry,

I wonder if it's just a Time Zone issue. When I look at Kevin's post it says: "Posted Yesterday, 05:32 PM" (Yesterday being Monday the

19th) and when I look at your post wherein you quote that very post it says: "QUOTE (kevin @ Jan 20 2009, 12:32 AM) "

 

So the date you see (and therefore the date that gets quoted) is based on your time zone (GMT). My time zone is GMT -7, so I see 5:32

PM. So Kevin posted his comment at 5:32 PM GMT -7 on Monday 19 January (which is 12:32 AM GMT on Tuesday 20 January).

 

If a post is made at 12:30 AM it stands to reason that the post would be there 6 1/2 hours later (at 7 AM) as well as at 10:06 am. I wonder

if you possibly have confused 12 AM and 12 PM?

 

Ah, didn't see this until just after I edited my original. As you see, I reached same conclusion. It was partly the format that threw me, 12 instead of 00 (which I believe is the 'standard' for that hour after midnight?), plus Kevin's 'late today' on a post marked 'Today'. But of course, yes, it is a time-zone quirk.

 

Now, let's see, what time do I have to go downstairs and switch on the TV for the inauguration...?

;)

 

--

Terry, East Grinstead, UK

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...