Sporadic playback?

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Wellybob2
Posts: 1
Joined: Sun Jun 28, 2020 4:58 pm

Sporadic playback?

Post by Wellybob2 » Sun Jun 28, 2020 5:09 pm

Hi,

I am having an issue when playing a macro in an already open IE with 2 TABS. Sometimes it will playback fine, other times it will open a new window and more often than not, nothing happens at all!

Is there something I am missing? I am calling the macros through iim from a .net application using

imacros.iimopen("-ie", False)
imacros.iimPlay("C:\MACRO.iim")

An example Macro

TRAY HIDE
VERSION BUILD=12.6.505.4525
TAB T=1
FRAME NAME=b2BLeftMenuScroll
TAG POS=24 TYPE=TD ATTR=NAME:menuview
FRAME NAME=rightContents
TAG POS=1 TYPE=A ATTR=TXT:CLICK

Windows 10 / ie11

Thanks
Last edited by Wellybob2 on Mon Jun 29, 2020 12:02 am, edited 1 time in total.
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Sporadic playback?

Post by chivracq » Sun Jun 28, 2020 10:01 pm

Wellybob2 wrote:
Sun Jun 28, 2020 5:09 pm
Hi,

I am having an issue when playing a macro in an already open IE with 2 TABS. Sometimes it will playback fine, other times it will open a new window and more often than not, nothing happens at all!

Is there something I am missing? I am calling the macros through iim from a .net application using

Code: Select all

imacros.iimopen("-ie_ext", False)
imacros.iimPlay("C:\MACRO.iim")
An example Macro

Code: Select all

TRAY HIDE
VERSION BUILD=12.5.503.8802
TAB T=1
FRAME NAME=b2BLeftMenuScroll
TAG POS=24 TYPE=TD ATTR=NAME:menuview
FRAME NAME=rightContents
TAG POS=1 TYPE=A ATTR=TXT:CLICK
Thanks

Hum, Thread approved but your Thread Title is not very-very Descriptive/Self-Explanatory, I didn't know "what to expect" from "Sporadic playback?" without reading the OP, even if yep, it did afterwards, but maybe you could edit your Thread Title into stg a bit more "Self-Explanatory"... :idea:

And correct Sub-Forum to open your Thread would have been the 'Scripting Interface' Sub-Forum (or maybe the 'DOT.NET' one...?, I'm not sure, I don't use those Modules myself...), you don't reach the "right Specialists" if you don't select the "correct" Sub-Forum when you open a Thread... :idea:
But OK, I'll have to ping/soft-alert @TechSup to move your Thread, so they'll "see" it...

And hum, maybe an Idea to read the Forum Rules when you join a Tech Forum, and @TechSup will need that Info as well...: :roll:
=> FCIM...! :mrgreen: (Read my Sig also...)
=> iMB v12.5(...?) 'Enterprise', DOT.NET Component v12.5(...?), OS=Win v...?, IE v...?
... With exact Full Version for IE + exact Windows Build... (even if IE Version can be deducted from the Win Build)...?

>>>

My 2cts as I'm not very knowledgeable about that "Area" of iMacros as I don't use any of those Modules/Functionality, but hum..., I don't know this "-ie_ext" Switch for 'iimOpen()', it's not documented on the Wiki-Page (nor for 'iimInit()'), only '-ie' and '-iePrivate' (in addition to '-ie') are... Where did you "find it"...!? :?
Try maybe with just the "-ie" Switch... :idea:

And FCI not mentioned, but unless you are still on WinXP, Browsers don't have Access to the "C:\" Root on Win7/Win10 afaik..., hum, maybe in 'Read' Mode though, could be..., but hum..., using the 'C:\' Root to store your iMacros Scripts is still not "a very good Practice", and looks a bit messy to me, I would think... :shock:
=> Try using some Sub-Folder where OS Permissions won't play a Role... :idea:

+ And hum, @TechSup will probably ask you why you staid at v12.5 and didn't update to v12.6, => to test in v12.6 if you still get the same Behaviour...

>>>

And hum, if using iMB v12.5 'Ent' and if you still have a "Full Enterprise" License, you should then have Direct Access to @TechSup by opening a Ticket from your Progress Portal Account, you would get much "better" Support than via the Forum, there is not much Expertise about the 'SI' and the 'DOT.NET' Component on the Forum which is more (Advanced) Users of any of the 'FREE' Add-ons helping other Users... :idea:

And the very few Advanced Users with 'SI' / 'DOT.NET' Knowledge/Expertise won't be "watching" the 'General' Sub-Forum and probably won't see/notice your Thread, and more certainly with its cryptic/elliptic/not-very-descriptive Thread Title... :|
(But no Need to open a Duplicate now, this would be Spam...!, @TechSup will move your Thread...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Sporadic playback?

Post by chivracq » Mon Jun 29, 2020 3:44 am

Hum, OK, I see that you've "silently" edited your OP to add:

Code: Select all

Windows 10 / ie11
OK, good-good, that's "a Start", ... but hum..., that's not exactly what I call "exact Full Versions and OS Build", ah-ah...!
And you don't confirm if you are indeed using v12.5 or not... :?

+ I mentioned a few "Things" to try/check, but you don't react to any of them... :o

EDIT:
Hum, and I notice you've also silently edited your 'iimOpen()' Line from:

Code: Select all

imacros.iimopen("-ie_ext", False)
=> to:

Code: Select all

imacros.iimopen("-ie", False)
I don't know but that's a bit "confusing"..., and that mini-Script feels a bit "fake" I would think..., without mentioning the "iimopen" without a Capital "O"... I don't know about the 'SI' and your '.net' Application, but in '.js' Scripts, (or in 'EVAL()' and 'URL GOTO=javascript' Statements in '.iim' Scripts), (native) JS Commands/Methods are Case Sensitive..., but I'm not sure if that also applies to iMacros Commands... (I don't use '.js' Scripts either, I do all my Scripting in pure '.iim'... 8) )

>>>

But OK, don't worry, I won't "bother" you anymore, your Thread doesn't really fall into my "Field of Expertise" anyway, I was just trying to help you improve a bit the Quality of your Thread if you want @TechSup to react... Alright, "good Luck" further with @TechSup, I'm out... :P
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Tom, Tech Support
Posts: 3601
Joined: Mon May 31, 2010 4:59 pm

Re: Sporadic playback?

Post by Tom, Tech Support » Mon Jun 29, 2020 10:48 am

Hi Wellybob2,

Thanks for trying the iMacros Enterprise Edition!

Can you provide a bit more context on how you are running your script and which tab currently has the focus in IE (tab 1 or 2) when you start the script? What page is loaded in that second tab?

As a quick test, I ran the Connect-to-IE.vbs script (with some modification, see below) repeatedly to see if I could reproduce the issue, but it ran successfully for me each time. The only time it would open a new browser instance is if I started the script too soon, before the previous instance had a chance to finish. In that case, the scripting interface correctly "sees" that the browser is already being controlled and therefore launches a new browser instance. To automate my test and make sure each run would start after the previous had finished, I used the following in a command prompt after navigating to Documents\iMacros\Examples\Windows Scripting Host:

Code: Select all

for /L %i in (1,1,20) do (start /wait Connect-to-IE.vbs)

I also edited Connect-to-IE.vbs first to remove the MsgBox prompts so that it would run continuously without needing user intervention (commented-out lines 16 and 45), and also commented out line 47 so that it does not close the browser. It ran through all 20 iterations without any issue.
Regards,

Tom, iMacros Support
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Sporadic playback?

Post by chivracq » Mon Jun 29, 2020 5:01 pm

Tom, Tech Support wrote:
Mon Jun 29, 2020 10:48 am
Hi Wellybob2,

Thanks for trying the iMacros Enterprise Edition!

Can you provide a bit more context on how you are running your script and which tab currently has the focus in IE (tab 1 or 2) when you start the script? What page is loaded in that second tab?

As a quick test, I ran the Connect-to-IE.vbs script (with some modification, see below) repeatedly to see if I could reproduce the issue, but it ran successfully for me each time. The only time it would open a new browser instance is if I started the script too soon, before the previous instance had a chance to finish. In that case, the scripting interface correctly "sees" that the browser is already being controlled and therefore launches a new browser instance. To automate my test and make sure each run would start after the previous had finished, I used the following in a command prompt after navigating to Documents\iMacros\Examples\Windows Scripting Host:

Code: Select all

for /L %i in (1,1,20) do (start /wait Connect-to-IE.vbs)

I also edited Connect-to-IE.vbs first to remove the MsgBox prompts so that it would run continuously without needing user intervention (commented-out lines 16 and 45), and also commented out line 47 so that it does not close the browser. It ran through all 20 iterations without any issue.

Thanks for moving the Thread to the 'Command Line & Scripting Interface' Sub-Forum, @Tom... :D

>>>

Hum, "trying", there is no v12.5 'Trial' Version anymore since more than 7 months that v12.6 came out, ah-ah...! :wink:

>>>

For Users (like me) who don't have iMB v12.x with the 'SI' and the '.vbs' Examples installed, here is a Link to that Example/Demo in the Wiki:
- connect-to-ie.vbs

Well, it's not "clear" if the Version posted in the Wiki is "really" (still) the same Version that gets installed with v12.[5-6] as the Script mentions "(c) 2008-2015 iOpus/Ipswitch Inc." and the Wiki Page was last updated in 2015 also... :?

Including a Copyright Notice in a Script Example/Demo doesn't "really" make Sense to me btw, or it means that Users are not allowed to modify and reuse that Script, ah-ah...!? :?

>>>

Hum, @Tom, you could mention in which FCI you've tested, as I would be "surprised" if you've "really" tested in v12.5 'Trial' without asking @OP to first update to v12.6 ('Trial')... And IE11 gets regularly updated (with nearly each Win10 Monthly Windows Update), and it could be that "stg" got broken in v12.5 with one of those IE Updates...

But anyway, yep, "New Window" caused by that IE Instance already/still running some (other) Script..., and the IE Process seen as not being "Free"/available, and the "Nothing happens" probably caused by the Trial Popup that must be popping "like crazy" if iMB v12.5 has been in 'Trial' Mode for more than 7 months... No Wonder, I would think... That's the "Purpose" of the Popup Reminder... :|
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Tom, Tech Support
Posts: 3601
Joined: Mon May 31, 2010 4:59 pm

Re: Sporadic playback?

Post by Tom, Tech Support » Mon Jul 06, 2020 12:59 pm

chivracq wrote:
Mon Jun 29, 2020 5:01 pm
Hum, @Tom, you could mention in which FCI you've tested, as I would be "surprised" if you've "really" tested in v12.5 'Trial' without asking @OP to first update to v12.6 ('Trial')... And IE11 gets regularly updated (with nearly each Win10 Monthly Windows Update), and it could be that "stg" got broken in v12.5 with one of those IE Updates...
Since the VERSION command in the macro listed in the first post on this thread specifies 12.6, I only tested it with iMacros 12.6 in Windows 10 (all latest updates).
Regards,

Tom, iMacros Support
chivracq
Posts: 9374
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Sporadic playback?

Post by chivracq » Mon Jul 06, 2020 2:23 pm

Tom, Tech Support wrote:
Mon Jul 06, 2020 12:59 pm
chivracq wrote:
Mon Jun 29, 2020 5:01 pm
Hum, @Tom, you could mention in which FCI you've tested, as I would be "surprised" if you've "really" tested in v12.5 'Trial' without asking @OP to first update to v12.6 ('Trial')... And IE11 gets regularly updated (with nearly each Win10 Monthly Windows Update), and it could be that "stg" got broken in v12.5 with one of those IE Updates...
Since the VERSION command in the macro listed in the first post on this thread specifies 12.6, I only tested it with iMacros 12.6 in Windows 10 (all latest updates).

Oh...!, yep indeed about the 'VERSION' Info (silently modified) in their Script in their OP, but @OP made "a bit of a mess" with their OP by silently editing it after my first Reply, (=> adding "IE11 + Win10", + changing their 'iimOpen()' Line, and I had not noticed they had also modified the 'VERSION' Line), and you can see from my Quote that 'VERSION' in their "original" Script/OP was mentioning v12.5 and not v12.6..., hence me asking them about their FCI, and asking them to "confirm" that they were using v12.5, but they never reacted..., nor did they ever react to any of my Qt's/Suggs/Remarks... (apart from the silent Edit)... :roll:

+ If using v12.6 they should still have mentioned if/that they were using the 'Trial' Version, like mentioned in the Forum Rules, which they didn't do... :shock:
+ When I run some Test, I also always mention in which FCI('s) I have tested anyway, and I think "we" (Advanced Users + @TechSup) should also/always mention our FCI, to show "the good Example", ah-ah...! :wink:

... Even if "usually" indeed, only Users using the 'Trial' Version of the last iMB Version post on the Forum, Users with a 'Pro'/'Enterprise' Version/License have Direct Access to Support and can open a Ticket...
Hum..., and nope, that's not True actually, we also do have some Users using a "Full" Licensed v12.6 Version posting on the Forum, as their v12.6 Version comes from updating/upgrading from iMB v10.x or v11.x, but their "Support" License has expired and they don't have Access to Support anymore...
=> So Users should always mention if they are using a 'Pro'/'Ent' or a 'Trial' Version..., Period...! (Especially if I ask them to mention/confirm (clearly) their FCI... :roll: )

>>>

But OK, I let you 2 "handle" this Thread further, I probably would have never reacted to this Thread in the first place if @OP had opened it in the "correct" Sub-Forum, I was just "trying to help" and to make sure their OP would contain all required Info for @TechSup to be able to start "directly" troubleshooting/answering it... :wink:

(And I probably won't try to help this User anymore in "the Future", as I don't help (anymore) Users who can't/don't want to mention 3 Versions about their Environment, especially if I ask, and don't react to my Qt's/Suggs/Remarks... OK, fair enough..., and "hopefully" they will soon have Direct Access to Support and won't need any Help from the Forum... :| )
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply