Problem with changing TAG POS= number

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
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
Freeman1
Posts: 4
Joined: Fri Jun 22, 2018 2:50 pm

Problem with changing TAG POS= number

Post by Freeman1 » Fri Jun 22, 2018 3:04 pm

Hello,
Please help me with this:
I am recording the click, but position of the button I want to click is changing its position and the click is going to the recorded TAG POS= but the position (number) of the button is changed.

Recorded is:
TAG POS=31 TYPE=SPAN ATTR=TXT: use

But the position of the TAG I want to click is changing over time:
TAG POS=28 TYPE=SPAN ATTR=TXT: use
TAG POS=30 TYPE=SPAN ATTR=TXT: use
TAG POS=31 TYPE=SPAN ATTR=TXT: use
TAG POS=32 TYPE=SPAN ATTR=TXT: use

... and is hitting wrong buttons.
How to record so to hit the same button even with changed position.
Thank you.
chivracq
Posts: 8213
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Problem with changing TAG POS= number

Post by chivracq » Fri Jun 22, 2018 4:44 pm

Freeman1 wrote:Hello,
Please help me with this:
I am recording the click, but position of the button I want to click is changing its position and the click is going to the recorded TAG POS= but the position (number) of the button is changed.

Recorded is:

Code: Select all

TAG POS=31 TYPE=SPAN ATTR=TXT: use
But the position of the TAG I want to click is changing over time:

Code: Select all

TAG POS=28 TYPE=SPAN ATTR=TXT: use
TAG POS=30 TYPE=SPAN ATTR=TXT: use
TAG POS=31 TYPE=SPAN ATTR=TXT: use
TAG POS=32 TYPE=SPAN ATTR=TXT: use
... and is hitting wrong buttons.
How to record so to hit the same button even with changed position.
Thank you.
CIM...! :mrgreen: (Read my Sig...)

And your Qt has probably nothing specific to 'iMacros for FF' only, try to select the "correct" Sub-forum when you open a Thread...

But..., to answer your Qt..., it depends on the Page I would say, and on what "makes" that 'POS=n' change... No URL posted, I can't have a look...

If your Element is always located at the same Place (Coordinates) on the Page, maybe the 'CLICK X/Y' Mode or the 'EVENT' Mode might help..., or otherwise, still using the 'TAG' Mode, maybe in combination with 'Relative Positioning'... :idea:

Using such high Numbers like your 'POS=30+' is not "Best Practice" anyway, you should try to identify some other Attribute(s) to locate that Element with 'POS=n' as low as possible, or using 'R-Positioning' like I already mentioned... :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...
Freeman1
Posts: 4
Joined: Fri Jun 22, 2018 2:50 pm

Re: Problem with changing TAG POS= number

Post by Freeman1 » Sat Jun 23, 2018 12:35 am

Thank you for your answer.
Here is the full record of the click:

VERSION BUILD=9030808 RECORDER=FX
TAB T=1
URL GOTO=http://www.sofiawars.com/player/
TAG POS=31 TYPE=SPAN ATTR=TXT:използвай

The page is in the record. I didnt share it in previous post because to go there you must be registered and log with my account. Its a game :)
But I will share screen capture: https://pasteboard.co/Hr99Ym4.png
The item should be clicked is the croissant 11 rows down 4th column right.
The problem is when some items disappear or appear this item (the croissant) is changing its position and changing the number and the klick is going to the old location and activating wrong item.
Thank you for your willingness to help.
chivracq
Posts: 8213
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Problem with changing TAG POS= number

Post by chivracq » Sat Jun 23, 2018 4:50 am

Freeman1 wrote:Thank you for your answer.
Here is the full record of the click:

Code: Select all

VERSION BUILD=9030808 RECORDER=FX
TAB T=1
URL GOTO=http://www.sofiawars.com/player/
TAG POS=31 TYPE=SPAN ATTR=TXT:използвай
The page is in the record. I didnt share it in previous post because to go there you must be registered and log with my account. Its a game :)
But I will share screen capture: https://pasteboard.co/Hr99Ym4.png
The item should be clicked is the croissant 11 rows down 4th column right.
The problem is when some items disappear or appear this item (the croissant) is changing its position and changing the number and the klick is going to the old location and activating wrong item.
Thank you for your willingness to help.
You missed a bit the "CIM" part, but OK, never mind...
=> iMacros for FF v9.0.3.

But..., yeah...!, from your Screenshot, locating the 'използвай' Element/Button corresponding to the 'Croissant' looks like a "perfect Candidate" to me for 'Relative Positioning', like I already mentioned..., with either the 'Croissant' Image as Anchor, or maybe the "#135" if it remains constant... (and is unique on the Page...).
- (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...
Freeman1
Posts: 4
Joined: Fri Jun 22, 2018 2:50 pm

Re: Problem with changing TAG POS= number

Post by Freeman1 » Tue Jun 26, 2018 1:31 am

No the position is not constant.
The items are changing their positions, but I need to klick to the croassant every 4 hours. (I am doing the timing with my weekly browsing)
Please help me what should be written in the macro.
Thank you very much.
chivracq
Posts: 8213
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Problem with changing TAG POS= number

Post by chivracq » Tue Jun 26, 2018 1:57 am

Freeman1 wrote:No the position is not constant.
The items are changing their positions, but I need to klick to the croassant every 4 hours. (I am doing the timing with my weekly browsing)
Please help me what should be written in the macro.
Thank you very much.
I gave you the "Solution", 3 times already...! :roll: => "Relative Positioning" (on the Croissant Image as Anchor)... :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...
vasoto
Posts: 1
Joined: Fri Aug 10, 2018 5:36 pm

Re: Problem with changing TAG POS= number

Post by vasoto » Fri Aug 10, 2018 5:38 pm

Hi need of this:

' Кифли, искате да ги яде, следващите 2 реда!
TAG POS=1 TYPE=DIV ATTR=ID:inventory-stat_stimulator2-btn
WAIT SECONDS=3600
Freeman1
Posts: 4
Joined: Fri Jun 22, 2018 2:50 pm

Re: Problem with changing TAG POS= number

Post by Freeman1 » Mon Oct 08, 2018 10:58 pm

Thanks a ton!
I am new in this and I have tried the solution of vasoto and its works.
Thanks.
Post Reply