Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hopefully simple clipboard evaluation
#1
Ok so this is the extremely simple bit of code that I have:

Code:
Copy      Help
lef 211 215
'T
'CY
rep 24
    'TTTT
    'CY
    0

This code opens up a series of links in separate tabs in firefox. What I would like to do is to copy a number and then have it evaluate the number in the clipboard, subtract 1 and then insert that number as the amount of times to repeat. Can this be done or is there some better, more convenient alternative method to accomplish this?

Essentially I want to replace the "24" with this clipboard-1 equation rather than having to type in the number every time the number of links changes on the page.
#2
with clipboard
Macro Macro1524
Code:
Copy      Help
int i n
str s.getclip
n=val(s)-1
for i 0 n
,out i

with input box
Macro Macro1523
Code:
Copy      Help
int i n
if(!inp(n)) ret
n-1
for i 0 n
,out i
#3
Wow this is perfect. Thanks a lot!


Forum Jump:


Users browsing this thread: 1 Guest(s)