alfa Posted June 7, 2011 Posted June 7, 2011 What i want to do is i want to do $season as many as i want and be able to save and open them. This i cant get it how. expandcollapse popup$season1 = InputBox ("Season", "Write in Season name") Send (" C:\Documents and Settings\aozben\Desktop\Cap Rep\"&$season1&".xls") Send ("{TAB}") Send ("{down 3}") Send("!s") Sleep(500) Send("!y") ;season rapor $yesNO = MsgBox (4, "Another Season", "Do you need an other Season ?") While $yesNO = 6 ControlClick("\\himini\production\BrioRpt\asp\5519_capacity_report_short.bqy - Windows Internet Explorer", "", "Panel47") _sleepUntilXX() MsgBox (0, "Select Season", "Select Season and clik OK") ControlClick("\\himini\production\BrioRpt\asp\5519_capacity_report_short.bqy - Windows Internet Explorer", "", "StdBtn25") _sleepUntilXX() ControlClick("\\himini\production\BrioRpt\asp\5519_capacity_report_short.bqy - Windows Internet Explorer", "", "StdBtn1") _sleepUntilXX() ControlClick("\\himini\production\BrioRpt\asp\5519_capacity_report_short.bqy - Windows Internet Explorer", "", "Panel4") sleep (500) MouseClick("left", 54,229,1,0) MouseClick("left", 188,230,1,0) WinWaitActive("Export Section") $season2 = InputBox ("Season", "Write in Season name") Send (" C:\Documents and Settings\aozben\Desktop\Cap Rep\"&$season2&".xls") Send ("{TAB}") Send ("{down 3}") Send("!s") Sleep(500) Send("!y") Sleep (500) $yesNO = MsgBox (4, "Another Season", "Do you need an other Season ?") Wend ;;;; _sleepUntilXX() $sinsi = _FileListToArray ("c:\Documents and Settings\aozben\Desktop\Cap Rep\") $adet = $sinsi[0] - $sinsi[1] ShellExecute ("TK_LO_Cap_Rep.xls","" ,"C:\Documents and Settings\aozben\Desktop\Cap Rep\") Sleep (1000) ShellExecute ("5519_capacity_report_short.xls","" ,"C:\Documents and Settings\aozben\Desktop\Cap Rep\") Sleep (1000) ShellExecute ($season1&".xls","" ,"C:\Documents and Settings\aozben\Desktop\Cap Rep\") Sleep (1000) If $adet > 4 Then ShellExecute ($season2&".xls","" ,"C:\Documents and Settings\aozben\Desktop\Cap Rep\") EndIf WinActivate ("Microsoft Excel - TK_LO_Cap_Rep.xls [Compatibility Mode]")
kaotkbliss Posted June 7, 2011 Posted June 7, 2011 you could do Do ;code here Until $yesNO = 7 ;(the no button) It should work 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
alfa Posted June 8, 2011 Author Posted June 8, 2011 you could doDo ;code hereUntil $yesNO = 7 ;(the no button)It should workWith this yes i can create as many as i want but i cant open them in excel with out knowing the names.
kaotkbliss Posted June 8, 2011 Posted June 8, 2011 (edited) *edit* I think I'm missunderstanding what you want. I can't test as I don't have access to half the stuff in your script but this should give you an idea of where I was trying to dirrect you. expandcollapse popup#include <File.au3> #Include <Array.au3> Dim $season[1] $x = 0 $yesNO = MsgBox(4, "Another Season", "Do you need an other Season ?") Do $input = InputBox("Season", "Write in Season name") _ArrayAdd($season, $input) Send(" C:\Documents and Settings\aozben\Desktop\Cap Rep\" & $season[$x] & ".xls") Send("{TAB}") Send("{down 3}") Send("!s") Sleep(500) Send("!y") ;season rapor ControlClick("\\himini\production\BrioRpt\asp\5519_capacity_report_short.bqy - Windows Internet Explorer", "", "Panel47") _sleepUntilXX() MsgBox(0, "Select Season", "Select Season and clik OK") ControlClick("\\himini\production\BrioRpt\asp\5519_capacity_report_short.bqy - Windows Internet Explorer", "", "StdBtn25") _sleepUntilXX() ControlClick("\\himini\production\BrioRpt\asp\5519_capacity_report_short.bqy - Windows Internet Explorer", "", "StdBtn1") _sleepUntilXX() ControlClick("\\himini\production\BrioRpt\asp\5519_capacity_report_short.bqy - Windows Internet Explorer", "", "Panel4") Sleep(500) MouseClick("left", 54, 229, 1, 0) MouseClick("left", 188, 230, 1, 0) WinWaitActive("Export Section") $yesNO = MsgBox(4, "Another Season", "Do you need an other Season ?") $x += 1 Until $yesNO = 7 ;;;; _sleepUntilXX() $sinsi = _FileListToArray("c:\Documents and Settings\aozben\Desktop\Cap Rep\") $adet = $sinsi[0] - $sinsi[1] ShellExecute("TK_LO_Cap_Rep.xls", "", "C:\Documents and Settings\aozben\Desktop\Cap Rep\") Sleep(1000) ShellExecute("5519_capacity_report_short.xls", "", "C:\Documents and Settings\aozben\Desktop\Cap Rep\") Sleep(1000) For $x = 0 To UBound($season) ShellExecute($season[$x] & ".xls", "", "C:\Documents and Settings\aozben\Desktop\Cap Rep\") Sleep(1000) Next WinActivate("Microsoft Excel - TK_LO_Cap_Rep.xls [Compatibility Mode]") Edited June 8, 2011 by kaotkbliss 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
alfa Posted June 9, 2011 Author Posted June 9, 2011 This is exactly what i was trying to ask It is probably me not being able to ask, not you
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now