i can't extract text to a variable in vba

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.

i can't extract text to a variable in vba

by Naveed on Wed Feb 03, 2016 12:23 pm

Code: Select all
Dim iim, status
Set iim = CreateObject("imacros")
status = iim.iimOpen("-ie", False)
Dim macro

macro = "VERSION BUILD=10022823" + vbNewLine
macro = macro + "TAB T=1" + vbNewLine
macro = macro + "TAB CLOSEALLOTHERS" + vbNewLine
macro = macro + "URL GOTO=https://visa.mofa.gov.sa/Omra/addOmraVisa" + vbNewLine
macro = macro + "TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/Omra/addOmraVisa ATTR=NAME:ApplicationNumber CONTENT=66359690" + vbNewLine
macro = macro + "TAG POS=1 TYPE=DIV FORM=ACTION:/Omra/addOmraVisa ATTR=TXT:Application<SP>Number<SP>Choose<SP>Saudi<SP>Mission<SP>selectSearch" + vbNewLine
macro = macro + "'text input activated" + vbNewLine
macro = macro + "TAG POS=1 TYPE=SPAN FORM=ACTION:/Omra/addOmraVisa ATTR=CLASS:t-input" + vbNewLine
macro = macro + "TAG POS=1 TYPE=LI ATTR=TXT:Islamabad" + vbNewLine
macro = macro + "TAG POS=1 TYPE=BUTTON:SUBMIT FORM=ACTION:/Omra/addOmraVisa ATTR=NAME:CommandName" + vbNewLine
macro = macro + "'text input activated" + vbNewLine
macro = macro + "TAG POS=3 TYPE=SPAN ATTR=CLASS:addlabel EXTRACT=TXT" + vbNewLine
macro = macro + "TAG POS=3 TYPE=SPAN ATTR=CLASS:addlabel EXTRACT=TXT" + vbNewLine
macro = macro + "TAG POS=3 TYPE=SPAN ATTR=CLASS:addlabel EXTRACT=TXT" + vbNewLine
macro = macro + "TAG POS=3 TYPE=SPAN ATTR=CLASS:addlabel EXTRACT=TXT" + vbNewLine
Me.Text3.Value = iim.iimgetlastextract(1)

status = iim.iimPlayCode(macro)

i can't copy the EXTRACT=TXT to me.text3.value thankx in advance
Naveed
 
Posts: 1
Joined: Fri Jan 29, 2016 4:38 am

Re: i can't extract text to a variable in vba

by chivracq on Wed Feb 03, 2016 3:44 pm

Naveed wrote:
Code: Select all
Dim iim, status
Set iim = CreateObject("imacros")
status = iim.iimOpen("-ie", False)
Dim macro

macro = "VERSION BUILD=10022823" + vbNewLine
macro = macro + "TAB T=1" + vbNewLine
macro = macro + "TAB CLOSEALLOTHERS" + vbNewLine
macro = macro + "URL GOTO=https://visa.mofa.gov.sa/Omra/addOmraVisa" + vbNewLine
macro = macro + "TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/Omra/addOmraVisa ATTR=NAME:ApplicationNumber CONTENT=66359690" + vbNewLine
macro = macro + "TAG POS=1 TYPE=DIV FORM=ACTION:/Omra/addOmraVisa ATTR=TXT:Application<SP>Number<SP>Choose<SP>Saudi<SP>Mission<SP>selectSearch" + vbNewLine
macro = macro + "'text input activated" + vbNewLine
macro = macro + "TAG POS=1 TYPE=SPAN FORM=ACTION:/Omra/addOmraVisa ATTR=CLASS:t-input" + vbNewLine
macro = macro + "TAG POS=1 TYPE=LI ATTR=TXT:Islamabad" + vbNewLine
macro = macro + "TAG POS=1 TYPE=BUTTON:SUBMIT FORM=ACTION:/Omra/addOmraVisa ATTR=NAME:CommandName" + vbNewLine
macro = macro + "'text input activated" + vbNewLine
macro = macro + "TAG POS=3 TYPE=SPAN ATTR=CLASS:addlabel EXTRACT=TXT" + vbNewLine
macro = macro + "TAG POS=3 TYPE=SPAN ATTR=CLASS:addlabel EXTRACT=TXT" + vbNewLine
macro = macro + "TAG POS=3 TYPE=SPAN ATTR=CLASS:addlabel EXTRACT=TXT" + vbNewLine
macro = macro + "TAG POS=3 TYPE=SPAN ATTR=CLASS:addlabel EXTRACT=TXT" + vbNewLine
Me.Text3.Value = iim.iimgetlastextract(1)

status = iim.iimPlayCode(macro)

i can't copy the EXTRACT=TXT to me.text3.value thankx in advance

Naveed wrote:macro = macro + "TAG POS=3 TYPE=SPAN ATTR=CLASS:addlabel EXTRACT=TXT" + vbNewLine

i can't assign the EXTRACT=TXT to a varriable in VBA

plz help me out thankx in advance

CIM...! :mrgreen:

And no need to start several Threads about the same Question, this is Spam, I've merged both Threads together and deleted the 2nd one...
- (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: 6481
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 6 guests

-->