Jump to content

getmo96

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by getmo96

  1. I am trying to automate a process with a SAP frontend daabase.... A lot of point and click, and there are just lists of projects I get from fellow peers at work. As you can see I am running the same porcess for everything in excel column. Anywayz I need am having trouble because the remote host where the app is running, has a heave traffic load which eats up processor time. I need to insert a if statment that identifies an error and the end user has to click a button to continue. I want the script to not stop and continue completeion of the list provided. Later I will get fance and add a logfile. I'll b workin it for now any advice will help. I am a Linux/Unix guy, but helping friends with a little VB. Dim $ProjectNum Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("Project Builder: Project EUSMB.MOC.000036","") If Not WinActive("Project Builder: Project EUSMB.MOC.000036","") Then WinActivate("Project Builder: Project EUSMB.MOC.000036","") WinWaitActive("Project Builder: Project EUSMB.MOC.000036","") For $ProjectNum = 0000037 To 000574 Step 1 Send("{CTRLDOWN}{F2}{CTRLUP}") Sleep(2500) Send ("{ALT}!e") Sleep(2500) Send ("{DOWN}{DOWN}{DOWN}{RIGHT}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RIGHT}{ENTER}") Sleep(2500) Send ("{ALT}!p") Sleep(3000) Send("{DOWN}{DOWN}{ENTER}") WinWait("Open Project","") If Not WinActive("Open Project","") Then WinActivate("Open Project","") WinWaitActive("Open Project","") Sleep(3000) Send("EUSMB.MOC.") Send($ProjectNum) Send("{ENTER}") WinWait("Close the project and open another","") If Not WinActive("Close the project and open another","") Then WinActivate("Close the project and open another","") WinWaitActive("Close the project and open another","") Send("{ENTER}") Sleep(30000) Next
  2. I have some code I used to close out projects in SAP. It is a simple loop and I have a issues with the SAP timing out. Then the script fails. I wan to add an if statement saying if system timesout then continue on the list in the normwl loop. Dim $ProjectNum Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("Project Builder: Project EUSMB.MOC.000036","") If Not WinActive("Project Builder: Project EUSMB.MOC.000036","") Then WinActivate("Project Builder: Project EUSMB.MOC.000036","") WinWaitActive("Project Builder: Project EUSMB.MOC.000036","") For $ProjectNum = 0000037 To 000574 Step 1 Send("{CTRLDOWN}{F2}{CTRLUP}") Sleep(2500) Send ("{ALT}!e") Sleep(2500) Send ("{DOWN}{DOWN}{DOWN}{RIGHT}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RIGHT}{ENTER}") Sleep(2500) Send ("{ALT}!p") Sleep(3000) Send("{DOWN}{DOWN}{ENTER}") WinWait("Open Project","") If Not WinActive("Open Project","") Then WinActivate("Open Project","") WinWaitActive("Open Project","") Sleep(3000) Send("EUSMB.MOC.") Send($ProjectNum) Send("{ENTER}") WinWait("Close the project and open another","") If Not WinActive("Close the project and open another","") Then WinActivate("Close the project and open another","") WinWaitActive("Close the project and open another","") Send("{ENTER}") Sleep(30000) Next
  3. I am helping a friend save time. She has to close 9000 + projects in SAP. She uses the same key strokes over and over again. The only thing changing is the project name.number. Here is what we have put together. The strokes are good we are just having issues with the looping. I tried the For command with the while but it end in a error. The error states we need a next.... Can someone shed some light? For $ProjectNum = 001206 To 002132 Step 1 While 1 Opt("WinWaitDelay", 100) Opt("WinTitleMatchMode", 4) Opt("WinDetectHiddenText", 1) Opt("MouseCoordMode", 0) WinWait("Project Builder: EUSMB.MBC.$ProjectNum", "") If Not WinActive("Project Builder: EUSMB.MBC.$ProjectNum", "") Then WinActivate("Project Builder: EUSMB.MBC.$ProjectNum", "") WinWaitActive("Project Builder: EUSMB.MBC.$ProjectNum", "") MouseMove(135, 3) MouseDown("left") MouseUp("left") Send("{CTRLDOWN}{F2}{CTRLUP}") Sleep(5000) MouseMove(95, 27) MouseDown("left") MouseUp("left") MouseMove(111, 69) MouseDown("left") MouseUp("left") MouseMove(309, 205) MouseDown("left") MouseUp("left") MouseMove(495, 205) MouseDown("left") MouseUp("left") Sleep(5000) MouseMove(32, 24) MouseDown("left") MouseUp("left") MouseMove(55, 69) MouseDown("left") MouseUp("left") WinWait("Open Project", "") If Not WinActive("Open Project", "") Then WinActivate("Open Project", "") WinWaitActive("Open Project", "") Send("EUSMB.MBC.$ProjectNum") MouseMove(21, 131) MouseDown("left") MouseUp("left") WinWait("Close the project and open another", "") If Not WinActive("Close the project and open another", "") Then WinActivate("Close the project and open another", "") WinWaitActive("Close the project and open another", "") MouseClick("left", 72, 148, 2) Sleep(4000) WEnd
  4. This would be outlook vba to java interface. I have the java down, but need some sort of trigger set up. Can this be down in Autoit or only by using the VBA editor in Outlook?
  5. I have built the backend of my program already which logs into my Oracle E-Business account. I now need a solution for the front end. I need the program to watch new imcoming messages for the terms ATCA and Minor. If these to terms are used, I then will have the back end kick in and log into oracle and move the new unassigned ticket to my bin. The purpose this servers, I have some co workers who are watching thier blackberries and as soon as a ticket hits they log into orcale and assign themselves the tickets leaving me with no work load. The program will hopefully beat them to the punch and I dont have to sit and click refresh waiting for a new ticket to open. _________________ Here is my backend _________________________________ #include <IE.au3> _IEErrorHandlerRegister() AutoItSetOption("SendKeyDelay", 400) $oIE = _IECreate ("http://dl2k23.milf.com:8000/OA_HTML/AppsLocalLogin.jsp") Send("username") Send("{TAB}") Send("password") Send("{TAB}{ENTER}") Sleep(100) Send("{ENTER}") Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("http://dl2k23.milf.com:8000/pls/ORAP/OracleMyPage.home - Microsoft Internet Explorer provided by Motorola","") If Not WinActive("http://dl2k23.milf.com:8000/pls/ORAP/OracleMyPage.home - Microsoft Internet Explorer provided by Motorola","") Then WinActivate("http://dl2k23.milf.com:8000/pls/ORAP/OracleMyPage.home - Microsoft Internet Explorer provided by Motorola","") WinWaitActive("http://dl2k23.milf.com:8000/pls/ORAP/OracleMyPage.home - Microsoft Internet Explorer provided by Motorola","") MouseMove(351,239) MouseDown("left") MouseUp("left") Send("{TAB}{TAB}{TAB}{TAB}{ENTER}") Sleep(500) Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("Oracle Applications 11i - Microsoft Internet Explorer provided by Motorola","") If Not WinActive("Oracle Applications 11i - Microsoft Internet Explorer provided by Motorola","") Then WinActivate("Oracle Applications 11i - Microsoft Internet Explorer provided by Motorola","") WinWaitActive("Oracle Applications 11i - Microsoft Internet Explorer provided by Motorola","") Sleep(500) WinWait("Oracle Applications - Oracle Production Instance","") If Not WinActive("Oracle Applications - Oracle Production Instance","") Then WinActivate("Oracle Applications - Oracle Production Instance","") WinWaitActive("Oracle Applications - Oracle Production Instance","") Sleep(500) Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("Oracle Applications - Oracle Production Instance","") If Not WinActive("Oracle Applications - Oracle Production Instance","") Then WinActivate("Oracle Applications - Oracle Production Instance","") WinWaitActive("Oracle Applications - Oracle Production Instance","") Sleep(2000) MouseMove(214,281) MouseDown("left") MouseUp("left") Sleep(1000) Send("{ENTER}") Opt("WinWaitDelay",100) Opt("WinTitleMatchMode",4) Opt("WinDetectHiddenText",1) Opt("MouseCoordMode",0) WinWait("Oracle Applications - Oracle Production Instance","") If Not WinActive("Oracle Applications - Oracle Production Instance","") Then WinActivate("Oracle Applications - Oracle Production Instance","") WinWaitActive("Oracle Applications - Oracle Production Instance","") Sleep(2000) MouseMove(131,231) MouseDown("left") MouseUp("left") Sleep(2000) MouseMove(582,122) MouseDown("left") MouseUp("left") Sleep(2000) MouseMove(581,122) MouseDown("left") MouseUp("left")
  6. Did you ever get this to work? I am looking to do the same thing. I need to read imcoming messages and look for a term used, if used I need the program to excute a script i built for going into to oracle and assigning a ticket.
×
×
  • Create New...