Yesterday I bumped into a problem and need help to make my macro work as I'm specting..
I need to save only the numbers (taken from my .csv file that has a list of 30,000 numbers) that activate a dialog box saying "This number is not registered", but I could not find anything in iMacros to help me do this, because it does not know when this dialog box will appear (I can only make it click on the "OK" of the dialog box).
Could someone give me a direction on what to do in this case?
Here is my script till now:
Code: Select all
VERSION BUILD=11.5.498.2403
TAB T=1
TAB CLOSEALLOTHERS
SET !DATASOURCE ..\Files\list.csv
SET !LOOP 20
SET !DATASOURCE_LINE {{!LOOP}}
SET !ERRORIGNORE YES
'Here I click to begin a new Search
TAG POS=1 TYPE=A ATTR=TXT:Nova<SP>Consulta
TAG POS=1 TYPE=SELECT ATTR=NAME:selForma CONTENT=%CP
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:txtValor CONTENT={{!COL1}}
'I put my number from my file based on which loot I'm at and store as EXTRACT.
SET !VAR1 {{!LOOP}}<SP>-<SP>{{!COL1}}
SET !EXTRACT {{!VAR1}}
WAIT SECONDS=1
TAG POS=1 TYPE=SELECT ATTR=NAME:selOrigem CONTENT=%PR
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:CHECKBOX ATTR=NAME:chkMostrarBaixados CONTENT=YES
WAIT SECONDS=1
ONDIALOG POS=1 BUTTON=OK
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:botaoEnviar
WAIT SECONDS=1
' \/
'So, here I need to use some kind of conditional to check if a DIALOG pops up saying that my number is not registered
'and if this happens, then I need to click OK (ONDIALOG) and save using the SAVEAS in the last line, but ONLY if this dialog appears
'otherwise it should not save anything and just continue following the script.
ONDIALOG POS=1 BUTTON=OK
' /\
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:SUBMIT ATTR=ID:botaoEnviar
WAIT SECONDS=1
SAVEAS TYPE=EXTRACT FOLDER=...\Files FILE=Not_Reg.csv
Thank you,
Victor.
iMacro Version that I'm using: 11.5.498.2403
My OS: Windows 8.1