iMacro issue posting to minds. com - imacros

The new social media site minds.com does not seem to have an API for posting, so I have tried to create a macro to do so from a single line text file, thus (iMacros for Firefox [50.1]). I have tried the x-y method and the conventional methods as well as the "experimental" mode, shown following:
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
'SET !ERRORIGNORE YES
SET !DATASOURCE C:\[path-to-file]\[single line of text here].txt
SET !DATASOURCE_COLUMNS 1
SET !LOOP 1
'SET !DATASOURCE_LINE {{!LOOP}}
'SET !DATASOURCE_LINE {{1}}
URL GOTO=https://www.minds.com/newsfeed
EVENT TYPE=CLICK SELECTOR="HTML>BODY>MINDS-APP>MINDS-BODY>MINDS- NEWSFEED>DIV>DIV>MINDS-NEWSFEED-POSTER>DIV>DIV>FORM>TEXTAREA" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>MINDS-APP>MINDS-BODY>MINDS- NEWSFEED>DIV>DIV>MINDS-NEWSFEED-POSTER>DIV>DIV>FORM>TEXTAREA" CONTENT=Hi!
EVENT TYPE=CLICK SELECTOR="HTML>BODY>MINDS-APP>MINDS-BODY>MINDS- NEWSFEED>DIV>DIV>MINDS-NEWSFEED-POSTER>DIV>DIV>FORM>DIV>BUTTON" BUTTON=0
and I tried:
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
URL GOTO=https://www.minds.com/newsfeed
SET !TIMEOUT_PAGE 30
TAG POS=1 TYPE=TEXTAREA FORM=NAME:NoFormName ATTR=ID:message CONTENT=Hello!
TAG POS=1 TYPE=BUTTON FORM=NAME:NoFormName ATTR=ID:Post<SP>send
Neither seems to work, nor does an x-y click (which just highlights the 'Post' button but does not "click" it).
The salient HTML for the button is:
<button class="mdl-button mdl-button--colored" type="submit">
Post <i class="material-icons">send</i>
</button>
I'm not sure what I'm missing. Any suggestions would be greatly appreciated.
Thanks!
-Brian Brown, Ph.D.

This part of your macro must work fine:
EVENT TYPE=CLICK SELECTOR="HTML>BODY>MINDS-APP>MINDS-BODY>MINDS-NEWSFEED>DIV>DIV>MINDS-NEWSFEED-POSTER>DIV>DIV>FORM>TEXTAREA" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>MINDS-APP>MINDS-BODY>MINDS-NEWSFEED>DIV>DIV>MINDS-NEWSFEED-POSTER>DIV>DIV>FORM>TEXTAREA" CHARS="Hi !"
EVENT TYPE=CLICK SELECTOR="HTML>BODY>MINDS-APP>MINDS-BODY>MINDS-NEWSFEED>DIV>DIV>MINDS-NEWSFEED-POSTER>DIV>DIV>FORM>DIV>BUTTON" BUTTON=0
Doesn't it?

Related

Auto Click a button until a specific text appear in page using iMacros

I'm trying to make an auto-click to a button on a website and do nothing when a specific text appears on the page
Using iMacros, how can I use if a specific text element had the value I wanted so it won't skip?
HTML:
<span class="tr-country" data-tr="IQ">Iraq</span>
<i class="flag message-flag flags-IQ"></i>
iMacros Recorder:
VERSION BUILD=1011 RECORDER=CR
URL GOTO=https://ometv.chat/
FRAME F=1
TAG POS=2 TYPE=DIV ATTR=TXT:next
TAG POS=2 TYPE=SPAN ATTR=TXT:South<SP>Africa (Some Random Country)
TAG POS=1 TYPE=I ATTR=CLASS:flag<SP>message-flag<SP>flags-ZA
What I want is to check if the class "tr-country" has the data-tr of "IQ" then we don't click/tag "next" button
How can I do that condition in iMacros?
Thanks in advance..
FCI:
iMacros for Chrome 10.1.1 Free
Windows 10 English
Version 96.0.4664.93 (Official Build) (64-bit)

imacros select from popup dropdown

Could you please help me :)
I have a TEXTBOX field which filling from a dropdown popup list.
enter image description here
It's not a drop-down list where I could use TYPE=SELECT
It doesn't take it as just a text, it needs to be picking from the list.
If I record a macro, it gives me:
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:management_main ATTR=ID:order_release/attribute1 CONTENT=201500
TAG POS=2 TYPE=TR ATTR=TXT:201500
If I record a macro in Experimental event recording mode:
EVENT TYPE=CLICK SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(3)>DIV>TABLE>TBODY>TR:nth-of-type(6)>TD:nth-of-type(3)>DIV>TABLE>TBODY>TR>TD>INPUT" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(3)>DIV>TABLE>TBODY>TR:nth-of-type(6)>TD:nth-of-type(3)>DIV>TABLE>TBODY>TR>TD>INPUT" CHARS="201500"
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(3)>DIV>TABLE>TBODY>TR:nth-of-type(6)>TD:nth-of-type(3)>DIV>TABLE>TBODY>TR>TD>INPUT" KEY=13
EVENT TYPE=CLICK SELECTOR="HTML>BODY>FORM>DIV:nth-of-type(4)>DIV>DIV>TABLE>TBODY>TR>TD>DIV>DIV>TABLE>TBODY>TR>TD" BUTTON=0
I've tried:
EVENT TYPE=CLICK SELECTOR="#order_release/attribute1" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="#order_release/attribute1" CHARS="201500"
it doesn't work also...
Inspection of elements:
enter image description here
So still can't catch this event to fill that field...
Have you any idea for me?
I would be veeeeeery thankful)
Thank you in advance!
I have found a solution and it works:
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:management_main ATTR=NAME:order_release/attribute1 CONTENT={{!COL7}}
TAG POS=1 TYPE=INPUT:HIDDEN FORM=NAME:management_main ATTR=ID:order_release/attribute1#ID CONTENT={{!COL7}}

unable to make a facebook post using iMacros

I made a script on iMacros using normal recording mode to make a wall post, but it doesn't seem to be recording the content to pasted on my wall though..
This is the code I wrote using the normal mode
TAG POS=1 TYPE=DIV ATTR=CLASS:_1mf<SP>_1mj EXTRACT=TXT
The above is able to extract contents from the post message field, however I'm unable to make it type contents into the same field... :(
Now, I have tried using EVENT recording mode and I am still facing issues.. Here is my code:
EVENT TYPE=MOUSEDOWN SELECTOR="#u_0_16" BUTTON=0
EVENT TYPE=MOUSEUP POINT="(386,118)"
EVENT TYPE=KEYPRESS SELECTOR="#js_gy>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV:nth-of-type(2)>DIV" CHAR="d"
EVENTS TYPE=KEYPRESS SELECTOR="#js_gy>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV>DIV" CHARS="Pasting Sample Content"
What am i doing wrong? :O :O
I don't know why you're still facing issues. So for example, try to play these lines:
TAG POS=1 TYPE=DIV ATTR=CLASS:_1mf<SP>_1mj EXTRACT=TXT
EVENT TYPE=CLICK SELECTOR="DIV[CLASS='_1mf _1mj']" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="DIV[CLASS='_1mf _1mj']" CHARS={{!EXTRACT}}

iMacro text field Inputting issue

hopefully you can help me. This is my attempt at using a macro to add text into a text field on a website.​
This is my current iMacro code, which opens the text box (by clicking a couple of buttons) however doesn't activate the text box nor add any text into it:
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
URL GOTO=https://datatron.l2inc.com/#resources?selected=brandTab5229&brands=5229
TAG POS=1 TYPE=BUTTON ATTR=TXT:Create<SP>New<SP>Resources<SP>for<SP>Brand
TAG POS=1 TYPE=BUTTON ATTR=ID:add-urls
PROMPT "Please enter something:" !VAR1
TAG POS=1 TYPE=TEXTAREA ATTR=CLASS:form-control CONTENT={{!VAR1}}
The last lines are my attempt adding my own text (VAR1) into the textbox. The relevant html code (created by javascript) simply reads as this:
​<textarea class="form-control urls-textarea" rows="10" placeholder="irrelevant placeholder text"></textarea>
Do you know where I am going wrong??
Best regards
Roman
Try to record your manual typing wlth 'Experimental event recording mode'.
Taking into account the html code you provided, the event command may look like:
EVENTS TYPE=KEYPRESS SELECTOR="textarea[class='form-control urls-textarea']" CHARS={{!VAR1}}

Cannot Click on the button with Imacros

I cannot find a way to click on the button on Google Drive to click "File upload"
in Inspect element cannot find the exactly class which is changing every time,
trued to record with all kind of style but still not working.
Would be great if some one can check and figure out how it can be clicked.
Thank You in advance.
URL GOTO=https://drive.google.com/drive/my-drive
EVENT TYPE=MOUSEDOWN SELECTOR="#drive_main_page>DIV:nth-of-type(4)>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV>DIV>DIV" BUTTON=0
TAG POS=2 TYPE=DIV ATTR=CLASS:*-v&&ROLE:menuitem&&ID::4b
TAG POS=1 TYPE=INPUT:FILE ATTR=* CONTENT=C:\Users\Viktor\Documents\iMacros\Downloads\Folder\1.png
The following solution seems to work somehow:
' text for English as default language '
SET txtUpload "Upload files..."
URL GOTO=https://drive.google.com/drive/my-drive
EVENT TYPE=CLICK SELECTOR="#drive_main_page>DIV:nth-of-type(4)>DIV>DIV>DIV>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV:nth-of-type(2)>svg>polygon" BUTTON=0
WAIT SECONDS=0.5
SET !EXTRACT_TEST_POPUP NO
TAG POS=1 TYPE=DIV ATTR=TXT:{{txtUpload}} EXTRACT=HTM
SET id EVAL("'{{!EXTRACT}}'.match(/id=\"(.+?)\"/)[1];")
EVENT TYPE=CLICK SELECTOR="#\\{{id}}>DIV>SPAN:nth-of-type(2)>SPAN>DIV" BUTTON=0
TAG POS=1 TYPE=INPUT:FILE ATTR=* CONTENT=C:\Users\Viktor\Documents\iMacros\Downloads\Folder\1.png