Use ONWEBPAGEDIALOG with the MACRO parameter

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Use ONWEBPAGEDIALOG with the MACRO parameter

by shaves on Fri Apr 17, 2015 9:01 am

I have a macro that populates a WebPage Dialog box. It was working until just recently. We have incorporated the information on how to "Use ONWEBPAGEDIALOG with the MACRO parameter". There are 2 issues:

(1)There are 2 text boxes and 2 drop downs with start and end time. Following these instructions, I can record changing the text boxes but the drop downs are frozen. Is this part of iMacros or some option in IE?

(2) When I record changing the text boxes, I compare it to the existing code and it is identical. I even pasted over the existing code with what I recorded.

When I run the macro, I get an error code -1300. It is erroring out on the following line:

TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:popupForm ATTR=NAME:eventDesc CONTENT=Memorial<SP>Day

This is the first line in the RFSDialgCHECK.iim. I'm not sure what it can't find this element when it is what is recorded in iMacros.

Following is the code that runs the the RFSDialgCHECK.iim:

Dim ID As String

IM = ""
IM = "CODE:"
IM = IM + "TAB T=1" + vbNewLine
IM = IM + "ONWEBPAGEDIALOG MACRO=C:\Temp\RFSDialgCHECK.iim" + vbNewLine
IM = IM + "TAG POS=5 TYPE=INPUT ATTR=CLASS:*" + vbNewLine
IM = IM + "WAIT SECONDS=2" + vbNewLine

Dim eScript As Object
Set ObjScr = New Scripting.FileSystemObject
Set eScript = ObjScr.CreateTextFile("C:\Temp\RFSDialgCHECK.iim", True)

ID = ID + "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:popupForm ATTR=NAME:eventDesc CONTENT=" & EDescr + vbNewLine

If OTime = "CLOSED" Then

ID = ID + "TAG POS=1 TYPE=SELECT FORM=NAME:popupForm ATTR=NAME:eventOpenTime CONTENT=%" & OTime + vbNewLine
ID = ID + "TAG POS=1 TYPE=SELECT FORM=NAME:popupForm ATTR=NAME:eventCloseTime CONTENT=%" & ETime + vbNewLine

Else

ID = ID + "TAG POS=1 TYPE=SELECT FORM=NAME:popupForm ATTR=NAME:eventOpenTime CONTENT=%" & NewOpenTime + vbNewLine
ID = ID + "TAG POS=1 TYPE=SELECT FORM=NAME:popupForm ATTR=NAME:eventCloseTime CONTENT=%" & NewCloseTime + vbNewLine

End If

ID = ID + "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:popupForm ATTR=NAME:eventStartDate CONTENT=" & EDate + vbNewLine
ID = ID + "TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:popupForm ATTR=NAME:add" + vbNewLine

eScript.Write ID
eScript.Close

iret = iim1.iimPlay(IM)

Any help would be appreciated. Thanks for your time.
shaves
 
Posts: 54
Joined: Tue Apr 29, 2008 11:50 am

Re: Use ONWEBPAGEDIALOG with the MACRO parameter

by shaves on Fri May 12, 2017 1:30 pm

I'm still having this issue; which is I am unable to extract the URL or record a macro to get the object names. We are using iMacros 10.3, Windows 7 Enterprise Edition. Any help would be appreciated. Please advise if any additional information is needed. thanks
shaves
 
Posts: 54
Joined: Tue Apr 29, 2008 11:50 am

Re: Use ONWEBPAGEDIALOG with the MACRO parameter

by chivracq on Fri May 12, 2017 2:50 pm

shaves wrote:I have a macro that populates a WebPage Dialog box. It was working until just recently. We have incorporated the information on how to "Use ONWEBPAGEDIALOG with the MACRO parameter". There are 2 issues:

(1)There are 2 text boxes and 2 drop downs with start and end time. Following these instructions, I can record changing the text boxes but the drop downs are frozen. Is this part of iMacros or some option in IE?

(2) When I record changing the text boxes, I compare it to the existing code and it is identical. I even pasted over the existing code with what I recorded.

When I run the macro, I get an error code -1300. It is erroring out on the following line:
Code: Select all
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:popupForm ATTR=NAME:eventDesc CONTENT=Memorial<SP>Day


This is the first line in the RFSDialgCHECK.iim. I'm not sure what it can't find this element when it is what is recorded in iMacros.

Following is the code that runs the the RFSDialgCHECK.iim:

Code: Select all
Dim ID As String
               
 IM = ""
 IM = "CODE:"
 IM = IM + "TAB T=1" + vbNewLine
 IM = IM + "ONWEBPAGEDIALOG MACRO=C:\Temp\RFSDialgCHECK.iim" + vbNewLine
 IM = IM + "TAG POS=5 TYPE=INPUT ATTR=CLASS:*" + vbNewLine
 IM = IM + "WAIT SECONDS=2" + vbNewLine
               
 Dim eScript As Object
 Set ObjScr = New Scripting.FileSystemObject
 Set eScript = ObjScr.CreateTextFile("C:\Temp\RFSDialgCHECK.iim", True)
 
 ID = ID + "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:popupForm ATTR=NAME:eventDesc CONTENT=" & EDescr + vbNewLine
           
 If OTime = "CLOSED" Then

      ID = ID + "TAG POS=1 TYPE=SELECT FORM=NAME:popupForm ATTR=NAME:eventOpenTime CONTENT=%" & OTime + vbNewLine
      ID = ID + "TAG POS=1 TYPE=SELECT FORM=NAME:popupForm ATTR=NAME:eventCloseTime CONTENT=%" & ETime + vbNewLine

Else

     ID = ID + "TAG POS=1 TYPE=SELECT FORM=NAME:popupForm ATTR=NAME:eventOpenTime CONTENT=%" & NewOpenTime + vbNewLine
     ID = ID + "TAG POS=1 TYPE=SELECT FORM=NAME:popupForm ATTR=NAME:eventCloseTime CONTENT=%" & NewCloseTime + vbNewLine
     
End If
                       
ID = ID + "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:popupForm ATTR=NAME:eventStartDate CONTENT=" & EDate + vbNewLine
ID = ID + "TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:popupForm ATTR=NAME:add" + vbNewLine
                                                     
eScript.Write ID
eScript.Close

iret = iim1.iimPlay(IM)


Any help would be appreciated. Thanks for your time.

shaves wrote:I'm still having this issue; which is I am unable to extract the URL or record a macro to get the object names. We are using
Code: Select all
iMacros 10.3, Windows 7 Enterprise Edition.
Any help would be appreciated. Please advise if any additional information is needed. thanks

Oh, good..., FCI finally mentioned...! => I can have a look...! :D
(Sorry but I don't react to Threads when FCI is not mentioned, you joined the Forum in 2008, you had plenty of time to read the Forum Rules since, I would think, ah-ah..!)
Even if hum, I don't do/use '.vb' Scripts myself, and you mention specifically 'ONWEBPAGEDIALOG' which is an IE/iMB specific Command while I only/mostly use iMacros for FF, so I don't promise anything as I won't be able to do any Testing with this Command, ah-ah...!

Hum, you mention "It was working until just recently."
=> Any Idea what might have changed when the Pb occurred...?

RuntimeError/Error Code: "-1300"...
=> Sorry but I don't know all RuntimeErrors from the top of my head (even if hum, "-1300" rings a bell, about "HTML Element not found in TAG" maybe...?, but I'm not sure, and I won't check, sorry...), post the Error Msg...
(Yeah, I know I can find it from the Wiki but you should have included it in your Post...)

And hum, any chance you can post the URL...?
I will only be able to give you some "generic" Feedback (if I have any, ah-ah...!) if I can't have a look at the Page/Site myself...

>>>

EDIT:
But hum..., checking a bit your previous Threads as I'm a bit curious if you joined the Forum in 2008, and re-hum, I'm not too impressed..., I had already asked you to mention your FCI in some previous Thread but you didn't bother to answer/follow up... :roll:
And hum, same thing with some other previous Thread earlier again, no Follow-up at all again... :shock:
OK, sorry, I don't go checking any further, I'm out of here, I only help Users using the Forum "a bit correctly", and FCI mentioned (especially if I asked) and "neat Follow-up" + sharing their Solution (for all their Threads) are Criteria for me to (want to) help Users (again)...

But if using iMB, I guess you must be having some Support License, TechSupport can help you, I would think... :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6304
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Use ONWEBPAGEDIALOG with the MACRO parameter

by shaves on Mon May 15, 2017 12:59 pm

Thanks for the reply. You are correct, I did join the forum in 2008. I don't use it much as I only occasionally have to develop macros that use iMacros. Sometimes, I come back to the forum and there are no replies and sometimes, I figure out a different way to resolve my issue. So you probably see things where I haven't responded. I guess I should have handle those situations better.

There error I was getting for this problem was -1300 (Html Element Not Found: Cannot find HTML element.). However, I can't share the URL with you as this is a proprietary system. I'm not sure what may have changed because our IT department pushes new versions but doesn't always let us know. So one day our macro works and the next day it doesn't.

I realize without the URL, much help may not be available. I was hoping that someone had experience with something similar and would say "I took these steps" or "I tried this to make it work".

I've read the information on imacros and using macros and haven't been able to make any of those suggestions work so I came here to see if someone had a solution or a suggestion. As you can see I first looked at this problem over a year ago and just recently got back to it.

You had help me in Stack Over Flow and remembered you had told me about posting the operating system information. When I looked at the original thread, I saw that I hadn't included it; which is why I replied to the thread with that information.

Thanks for your help. We didn't get any training and have had to learn this all on our own, so we may not do everything correctly as we try to solve our issues.....shaves
shaves
 
Posts: 54
Joined: Tue Apr 29, 2008 11:50 am

Re: Use ONWEBPAGEDIALOG with the MACRO parameter

by chivracq on Mon May 15, 2017 4:15 pm

shaves wrote:Thanks for the reply. You are correct, I did join the forum in 2008. I don't use it much as I only occasionally have to develop macros that use iMacros. Sometimes, I come back to the forum and there are no replies and sometimes, I figure out a different way to resolve my issue. So you probably see things where I haven't responded. I guess I should have handle those situations better.

There error I was getting for this problem was -1300 (Html Element Not Found: Cannot find HTML element.). However, I can't share the URL with you as this is a proprietary system. I'm not sure what may have changed because our IT department pushes new versions but doesn't always let us know. So one day our macro works and the next day it doesn't.

I realize without the URL, much help may not be available. I was hoping that someone had experience with something similar and would say "I took these steps" or "I tried this to make it work".

I've read the information on imacros and using macros and haven't been able to make any of those suggestions work so I came here to see if someone had a solution or a suggestion. As you can see I first looked at this problem over a year ago and just recently got back to it.

You had help me in Stack Over Flow and remembered you had told me about posting the operating system information. When I looked at the original thread, I saw that I hadn't included it; which is why I replied to the thread with that information.

Thanks for your help. We didn't get any training and have had to learn this all on our own, so we may not do everything correctly as we try to solve our issues.....shaves

Hum..., OK for your (friendly) Reply, and good that you mention the Thread on SOF, you were actually the only User on SOF doing some "correct" Follow-up on the few Threads where I posted an Answer (=> +1 for you, ah-ah...!) as I now cannot post on SOF anymore because of the stupid Reputation System..., oh well..., too bad...!
But OK, on the iMacros Forum, you should then enable the 'Notify me when a reply is posted' when you open a Thread, like that you don't miss any Reply, I tend to get a bit "irritated" if I (try to) help Users and they don't mention their FCI (especially if I ask) and they don't follow up...
Even if you manage to solve a Pb by yourself, you are expected after a while to share your Solution to make those Threads still useful for other Uses searching the Forum... :idea:
And hum, it's never too late to update and finish your previous/older Threads to make them a bit useful as well for the Forum Community especially if you managed to solve them by yourself (or from some other Forum, same thing), I may react the same way otherwise if you open some new Thread in a few weeks/months or even years if I check again your previous Threads... :idea:

And about Training, I never got any Training either, I simply gained all my "Knowledge" of iMacros from playing some "stupid" Tamagotchi Game that I completely automated, ah-ah...! And by always going a bit "further" with my Level of Automation on that Site, that was good enough to now be able to answer most Threads on the Forum, oops...!

But OK, concerning this current Thread, as I only use the iMacros for FF Add-on, I had to dig a bit in the Documentation for 'ONWEBPAGEDIALOG' which is only available on IE and iMB and I now understand a bit exactly I think what your Pb is. Hum, and I don't use VB Scripts either, nor '.js' Scripts either...

OK, interesting Technique you use, to create dynamically your 'RFSDialgCHECK.iim' and to pass some Vars to it, I reckon you got the Tip from this Page...?
Can you confirm that you know and have read this Page and have tried all the Trick and Techniques mentioned in it?, => open and record in IE...?, open and record in FF (+ change User Agent)...?, and especially the one about the 'EXTRACT=HTM' + reopen as Local '.HTM' File to be able to record your Actions (again) as it is the Technique I would myself have come up with...?

But hum, your "Proprietary System", is it really built in-house or is it some kind of Peoplesoft for example Application for which some Demo could maybe be found on internet where I could have a look...? But in both cases, Colleagues from your IT-Department should be able to help you a bit to "isolate" the WPD (= WebPageDialog) if you don't come out by yourself, I would think...
Last edited by chivracq on Wed May 24, 2017 8:26 am, edited 1 time in total.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6304
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Use ONWEBPAGEDIALOG with the MACRO parameter

by shaves on Wed May 24, 2017 7:08 am

Yes..............I have tried the suggestions on that page; with the exception of Firefox; which we don't use here. I can't capture the URL any more because IT has done something so you don't see what the URL is. I'm about ready to give up on this macro. I appreciate all of the time you have take to share information. There are some users in some forums that like to berate someone for asking a question that I guess to them is silly. We don't know what we don't know and one of the ways I learn is by asking questions. I'm grateful when someone on a forum shares their knowledge with me. Thanks again for all of your help.........
shaves
 
Posts: 54
Joined: Tue Apr 29, 2008 11:50 am

Re: Use ONWEBPAGEDIALOG with the MACRO parameter

by chivracq on Wed May 24, 2017 9:17 am

shaves wrote:Yes..............I have tried the suggestions on that page; with the exception of Firefox; which we don't use here. I can't capture the URL any more because IT has done something so you don't see what the URL is. I'm about ready to give up on this macro. I appreciate all of the time you have take to share information. There are some users in some forums that like to berate someone for asking a question that I guess to them is silly. We don't know what we don't know and one of the ways I learn is by asking questions. I'm grateful when someone on a forum shares their knowledge with me. Thanks again for all of your help.........

Hum..., bummer...! Frustrating, ah-ah...! :evil:

Well that WPD must have an URL if the Browser is able to load it, I would think...

But OK, you've tried the Suggestions from the Page I referred to, hum..., I had some "hope" from the 'EXTRACT=HTM' Technique, this is a Troubleshooting Technique I use for many Threads on the Forum... But that 'EXTRACT' must have returned some Content, I expect...?
Grrr..., I would need to be able to play with the Page myself..., maybe you can find some Demo on Internet where you could reproduce the Pb, I think you use Peoplesoft I saw from some other Thread..., funny, I worked for PS a few years ago, doing TechSup for your IT-Guys customizing their PS-Applications, ah-ah...! But funnily enough, I don't think I ever tried to use iMacros on PS, I guess because I was only using iMacros privately for Games and it couldn't really be of any Help for my own daily Work then... (But I'm talking about several years ago, dunno, maybe 5 or 6, just before Oracle bought PS, I think...)

Well concerning trying to record your Actions with iMacros for FF, you could try using Portable FF from a USB-Stick as I guess you probably cannot install Applications on your Company Network for Security Reasons, well, a USB-Stick can be "dangerous" as well, ah-ah...! If this is a possible Option, make sure to install v8.9.7 for FF and not v9.0.3 which is a bit too Buggy, oops...!
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6304
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: No registered users and 5 guests

-->