Simple Drag&Repeat macro

Discussions and Tech Support specific to the iMacros Firefox add-on.
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
Anencephalous
Posts: 1
Joined: Sat Mar 25, 2017 7:51 am

Simple Drag&Repeat macro

Post by Anencephalous » Sat Mar 25, 2017 8:01 am

Hi guys!

I totally have nothing to do with coding and stuff, I just want to have a simple macro for a friend, who can't use AHK scripts on her chromebook.
So, I was trying to record something, that does the following on chrome:
1.Zoom out (25%)
2.Press shift down
3.Loop this 200 times:
  • Move the mouse to 900:500
    Click down
    Move mouse to 500:800
    Click up
4.Shift up
5.Zoom in back to 100%

So, I wanted to do it myself, but all the tutorials mention a clickmode button, that I dont have, are these tutorials outdated? And if so, what should I search for to make things work?
Thank you for any help in advance!
iimfun
Posts: 239
Joined: Tue Jul 19, 2016 1:06 pm

Re: Simple Drag&Repeat macro

Post by iimfun » Fri Mar 31, 2017 7:43 am

Hi,

Here is how your starting point may look like

Code: Select all

SET startLoop 1
SET maxLoop 200
SET !LOOP EVAL(1-{{maxLoop}}+{{startLoop}})
SET normLoop EVAL({{!LOOP}}+{{maxLoop}}-1)

' Zoom out (25%)
SET mod EVAL("{{normLoop}} == {{startLoop}} ? 'ctrl' : ''")
EVENT TYPE=KEYPRESS SELECTOR=* KEY=189 MODIFIERS={{mod}}
EVENT TYPE=KEYPRESS SELECTOR=* KEY=189 MODIFIERS={{mod}}
EVENT TYPE=KEYPRESS SELECTOR=* KEY=189 MODIFIERS={{mod}}
EVENT TYPE=KEYPRESS SELECTOR=* KEY=189 MODIFIERS={{mod}}
EVENT TYPE=KEYPRESS SELECTOR=* KEY=189 MODIFIERS={{mod}}
EVENT TYPE=KEYPRESS SELECTOR=* KEY=189 MODIFIERS={{mod}}

' Display the loop number
SET !ERRORIGNORE YES
SET D EVAL("var d = 'Display:\\n\\nLOOP : '+ {{normLoop}} + ' OF ' + {{maxLoop}} + '\\n\\n'; MacroError(d);")
SET !ERRORIGNORE NO

' Zoom in back to 100%
SET mod EVAL("{{normLoop}} == {{maxLoop}} ? 'ctrl' : ''")
EVENT TYPE=KEYPRESS SELECTOR=* KEY=96 MODIFIERS={{mod}}
I assume that you use iMacros for Chrome.
Post Reply