= Replace(iim1.iimGetLastExtract(), "[EXTRACT]", "")VBA prob

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
hoguz2
Posts: 15
Joined: Wed Apr 01, 2015 11:03 am
Location: TURKEY

= Replace(iim1.iimGetLastExtract(), "[EXTRACT]", "")VBA prob

Post by hoguz2 » Wed Nov 15, 2017 6:50 am

Hi guys i have any problem could you some one help me please ...

i try some data extract.... if solve the problem i will use same loop in my code therefore i write only abbreviated sample from my code ...

Code: Select all

MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=INPUT:SUBMİT FORM=NAME:sifreGirisForm ATTR=NAME:submitButton" + vbNewLine
MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=A ATTR=TXT:Telefon<SP>No<SP>Sorgulama" + vbNewLine
MyMacroCode = MyMacroCode + "FRAME f = 2" + vbNewLine
MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=NAME:ba CONTENT=xxxx" + vbNewLine
MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:form1 ATTR=NAME:submit" + vbNewLine
MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=TH ATTR=TXT:Birim<SP>Adı" + vbNewLine
MyMacroCode = MyMacroCode + "TAG POS=R2 TYPE=TD ATTR=* EXTRACT=TXT" + vbNewLine
MyMacroCode = MyMacroCode + "SET !EXTRACTDIALOG YES" + vbNewLine
MyMacroCode = MyMacroCode + "PROMPT {{!EXTRACT}}" + vbNewLine

'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
'''''  ''"""""""""""""' yes i can  see  exctract  just here ... no problem..  when  PROMPT   dialog style """"""""""""
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


'"""""""""""""""""""""""""""""""""""""""""""""""""""
iret = iim1.iimset("TCNO", ws3.Cells(2, 2).Value)
iret = iim1.iimset("PASS", ws3.Cells(2, 3).Value)
ExtractedValue = Replace(iim1.iimGetLastExtract(), "[EXTRACT]", "")
iret = iim1.iimPlayCode(MyMacroCode)

MsgBox (ExtractedValue)

'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
'''''  ''"""""""""""""' there is problem msgbox value  get empty """"""""""""  i trry  Replace(iim1.iimGetLastExtract(1)   msgbox value  get NODATA value ..
'''' what is the wrong ....
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

widows 8 64 bit
office 2010
imacros 10 brovser 10.02.2823
VERSION BUILD=10022823
mozilla firefox

thnx you so much
Mozilla : 53.0.2
iMacros Version : iMacros for Firefox 9.0.3
Win 8.1 64 bit
Ms_Office 2010 .TR
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: = Replace(iim1.iimGetLastExtract(), "[EXTRACT]", "")VBA

Post by chivracq » Wed Nov 15, 2017 5:06 pm

hoguz2 wrote:Hi guys i have any problem could you some one help me please ...

i try some data extract.... if solve the problem i will use same loop in my code therefore i write only abbreviated sample from my code ...

Code: Select all

MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=INPUT:SUBMİT FORM=NAME:sifreGirisForm ATTR=NAME:submitButton" + vbNewLine
MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=A ATTR=TXT:Telefon<SP>No<SP>Sorgulama" + vbNewLine
MyMacroCode = MyMacroCode + "FRAME f = 2" + vbNewLine
MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=NAME:ba CONTENT=xxxx" + vbNewLine
MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=INPUT:BUTTON FORM=NAME:form1 ATTR=NAME:submit" + vbNewLine
MyMacroCode = MyMacroCode + "TAG POS=1 TYPE=TH ATTR=TXT:Birim<SP>Adı" + vbNewLine
MyMacroCode = MyMacroCode + "TAG POS=R2 TYPE=TD ATTR=* EXTRACT=TXT" + vbNewLine
MyMacroCode = MyMacroCode + "SET !EXTRACTDIALOG YES" + vbNewLine
MyMacroCode = MyMacroCode + "PROMPT {{!EXTRACT}}" + vbNewLine

'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
'''''  ''"""""""""""""' yes i can  see  exctract  just here ... no problem..  when  PROMPT   dialog style """"""""""""
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


'"""""""""""""""""""""""""""""""""""""""""""""""""""
iret = iim1.iimset("TCNO", ws3.Cells(2, 2).Value)
iret = iim1.iimset("PASS", ws3.Cells(2, 3).Value)
ExtractedValue = Replace(iim1.iimGetLastExtract(), "[EXTRACT]", "")
iret = iim1.iimPlayCode(MyMacroCode)

MsgBox (ExtractedValue)

'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
'''''  ''"""""""""""""' there is problem msgbox value  get empty """"""""""""  i trry  Replace(iim1.iimGetLastExtract(1)   msgbox value  get NODATA value ..
'''' what is the wrong ....
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Code: Select all

widows 8  64 bit
office  2010 
imacros  10  brovser   10.02.2823
VERSION BUILD=10022823
mozilla firefox 

Code: Select all

Mozilla : 53.0.2
iMacros Version : iMacros for Firefox 9.0.3
Win 8.1 64 bit
Ms_Office 2010 .TR
thnx you so much
Hum..., your Pb is VBA specific and not really specific to Data Extraction, your Thread would have been better I think in the 'Scripting Interface' Sub-Forum... But hum..., related to 'iimGet(Last)Extract()' though..., then I guess the 'Data Extraction' is alright as well... OK, never mind, ah-ah...!

OK, I don't do and don't know anything about VBS/VBA, but I have an Idea what is going wrong in your Script...
Your whole Script is a bit strange btw, you only do one 'EXTRACT', then you shouldn't have to care about removing any '[EXTRACT]' Separator in the '!EXTRACT'...
You do have an '!EXTRACTDIALOG' in your Script, but you don't have any 'ONDIALOG' or 'ONERRORDIALOG' Statement(s) afterwards, so I guess you don't get any Popup to extract as your Script would hang otherwise as those DialogBoxes are usually Tab or Browser Instance Modal...

But OK, what I think is wrong in your 'Replace()' Statement is that you try to use an iMacros Command inside it. The iMacros Scripting Interface knows about the VBS Compiler but the VBS Compiler or Runtime Engine doesn't know anything about iMacros, ah-ah...!
=> You first need to assign the Content of the 'iimGetLastExtract()' to a Var (= String) that you will then reuse inside the 'Replace()'...

Oh-oh-oh...!, maybe your Syntax is correct after all, as I notice stg "worse", you need to invoke the 'iimGetLastExtract()' Command AFTER running your Macro with 'iimPlayCode()', and not BEFORE like you currently do, ah-ah...! No wonder that '!EXTRACT' is empty then...! :shock:

And I'm not sure 'iimPlayCode()' was already implemented in iMB v10.02, but I guess you would get some explicit RuntimeError if it was not...

EDIT: Corrected a typo...: "Browser Instal" = "Browser Instance"...
Last edited by chivracq on Sat Nov 18, 2017 9:26 am, edited 1 time in total.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
hoguz2
Posts: 15
Joined: Wed Apr 01, 2015 11:03 am
Location: TURKEY

Re: = Replace(iim1.iimGetLastExtract(), "[EXTRACT]", "")VBA

Post by hoguz2 » Fri Nov 17, 2017 11:47 am

Hi chivracq thanks.

I share a more detailed example. thnx..
Mozilla : 53.0.2
iMacros Version : iMacros for Firefox 9.0.3
Win 8.1 64 bit
Ms_Office 2010 .TR
Post Reply