Google Spreadsheet and DS Problem

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
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
mikeeam
Posts: 10
Joined: Thu Jul 07, 2011 4:54 pm

Google Spreadsheet and DS Problem

Post by mikeeam » Fri Apr 05, 2013 7:19 pm

Hello!

I need help with iMacros and GSpreadsheet. The macro need to print the sheet relative to the month. So I got 12 sheets, and print them once a month.

Code: Select all

VERSION BUILD=9002379
TAB T=1
TAB CLOSEALLOTHERS
SET !VAR3 APV
SET !VAR4 EVAL("var month = new Date(); var lastmonth = new Date(); lastmonth.setDate(month.getMonth()); var mnt = lastmonth.getDate().toString(); if (mnt == 31) {mnt = 12;}; if (mnt.length < 2) {mnt = \"0\" + mnt;};var year = lastmonth.getFullYear().toString(); var dateString = mnt + year; dateString;")
SET !VAR6 EVAL("var month = new Date(); var lastmonth = new Date(); lastmonth.setDate(month.getMonth()); var mnt = lastmonth.getDate().toString(); if (mnt == 1) {mnt = 'Jan';}; if (mnt == 2) {mnt = 'Fev';}; if (mnt == 3) {mnt = 'Mar';};if (mnt == 4) {mnt = 'Abril';}; if (mnt == 5) {mnt = 'Maio';}; if (mnt == 6) {mnt = 'Jun';}; if (mnt == 7) {mnt = 'Jul';}; if (mnt == 8) {mnt = 'Ago';}; if (mnt == 9) {mnt = 'Set';}; if (mnt == 10) {mnt = 'Out';};if (mnt == 11) {mnt = 'Nov';}; if (mnt == 12) {mnt = 'Dez';}; var dateString = mnt; dateString;")
SET !VAR5 C:\Users\Michael\Dropbox\Impostos\PIS-Cofins\{{!VAR6}}
URL GOTO=https://docs.google.com/spreadsheet/ccc?key=0Amk2SQbLRKuAdF9INDA0Vzg5a29tbktpWlc3NTRrT1E#gid=28
SIZE X=1682 Y=883
[b]TAG POS=1 TYPE=SPAN ATTR=TXT:{{!VAR6}}&&STYLE:white-space:<SP>pre;&&DIR:ltr&&UNSELECTABLE:on
DS CMD=CLICK X={{!TAGX}} Y={!TAGY}}[/b]
DS CMD=CLICK X=136 Y=857 CONTENT=
DS CMD=CLICK X=53 Y=56 CONTENT=
DS CMD=CLICK X=850 Y=274 CONTENT=
DS CMD=CLICK X=968 Y=486 CONTENT=
DS CMD=CLICK X=590 Y=639 CONTENT=
ONDOWNLOAD FOLDER=C:\Users\Michael\Desktop\Teste FILE=+_{{!NOW:yyyymmdd_hhnnss}} WAIT=YES
The thing is, whatever I do, it does recognize the correct sheet but it doesnt "click" it. Tag cant be used, just DS, but how can I use DS and relative position with the tag?

Please, help?

Thank you very much
Post Reply