Page 1 of 1

Google Spreadsheet and DS Problem

Posted: Fri Apr 05, 2013 7:19 pm
by mikeeam
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