#include #include #include #include ;Make sure webserver is running... ;If Not ProcessExists("miniweb.exe") Then ; MsgBox($MB_SYSTEMMODAL, "Script Status", "No miniweb detected, running it now", 3) ; Run("C:\Documents and Settings\Matt\Desktop\peach-html\miniweb\miniweb -p 80") ; sleep(2000) ;EndIf ;Make sure Lanbench is running... ;If Not ProcessExists("LANBench.exe") Then ; MsgBox($MB_SYSTEMMODAL, "Script Status", "No LanBench detected, running it now", 3) ; Run("C:\Documents and Settings\Matt\Desktop\Lan_Speed_Server\LANBench.exe") ; sleep(2000) ; ControlClick("[CLASS:TfrmMain]","","[ID:3475352]") ;Select "Listen" ;EndIf ;Make sure peachtree is running If Not ProcessExists("peachw.exe") Then MsgBox($MB_SYSTEMMODAL, "Script Status", "No Peachtree detected, running it now", 3) Run("C:\Program Files\Sage Software\Peachtree\peachw.exe") sleep(25000) MsgBox($MB_SYSTEMMODAL, "Script Status", "Loging In", 3) ControlSend("Rayteq LLC Log In","","[CLASS:Edit;INSTANCE:1]","6buttons{ENTER}") sleep(10000) EndIf MsgBox($MB_SYSTEMMODAL, "Script Status", "Peachtree Export ITEMs in 3 Seconds", 3) FileDelete("C:\rayteq\ITEM.xml") FileDelete("C:\rayteq\BOMLIST.CSV") ControlClick("[CLASS:PEACHW]","","[Text:Company]") sleep(1000) ControlClick("[CLASS:PEACHW]","","[Text:Import and Export]") sleep(300) ControlSend("[CLASS:ABD_GenericMDIDlg]","","[CLASS:ABD_Listbox;INSTANCE:1]","{DOWN}{DOWN}{DOWN}{DOWN}") sleep(300) ControlSend("[CLASS:ABD_GenericMDIDlg]","","[CLASS:ABD_Listbox;INSTANCE:2]","{DOWN}") sleep(300) ControlSend("[CLASS:ABD_GenericMDIDlg]","","[CLASS:ABD_ToolBackGnd]","EXPORT&X") sleep(300) ControlSend("Rayteq-Item-Export","","[CLASS:DefButton; INSTANCE:1]","{ENTER}") sleep(300) ControlClick("[CLASS:ABD_GenericMDIDlg]","","Close") Sleep(5000) ;MsgBox($MB_SYSTEMMODAL, "Script Status", "Peachtree Export BOM in 3 seconds", 3) ControlClick("[CLASS:PEACHW]","","[Text:Company]") sleep(1000) ControlClick("[CLASS:PEACHW]","","[Text:Import and Export]") sleep(300) ControlSend("[CLASS:ABD_GenericMDIDlg]","","[CLASS:ABD_Listbox;INSTANCE:1]","{DOWN}{DOWN}{DOWN}{DOWN}") sleep(300) ControlSend("[CLASS:ABD_GenericMDIDlg]","","[CLASS:ABD_Listbox;INSTANCE:2]","{DOWN}{DOWN}") sleep(300) ControlSend("[CLASS:ABD_GenericMDIDlg]","","[CLASS:ABD_ToolBackGnd]","EXPORT&X") sleep(300) ControlSend("Rayteq - BOM","","[CLASS:DefButton; INSTANCE:1]","{ENTER}") sleep(300) ControlClick("[CLASS:ABD_GenericMDIDlg]","","Close") Sleep(5000) MsgBox($MB_SYSTEMMODAL, "Script Status", "Ruby conversion in 3 Seconds", 3) Run("ruby peachxml_to_html.rb") Sleep(60000) ;Takes awhile to run MsgBox($MB_SYSTEMMODAL, "Script Status", "Moving HTML Files", 3) FileMove("c:\rayteq\index.html","C:\rayteq\htdocs", $FC_OVERWRITE=1) FileMove("c:\rayteq\index2.html","C:\rayteq\htdocs", $FC_OVERWRITE=1) MsgBox($MB_SYSTEMMODAL, "Script Status", "Script Complete", 3)