Jump to content

kawliga751

Active Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by kawliga751

  1. I have a workplace GUI that has a search field function that pulls up customer records to allow changes. I am attempting to 1)LOGIN 2)Enter Search field, enter a number and then {ENTER} 3)change specific field once customer record loads. I have very limited experience in GUI manipulation but I am able to login using the below: #include <IE.au3> Const $navOpenInNewTab = 0x0800 Dim $oIE = _IECreate('http://asag.xxxxxxx.com/ASAG/index.htm') Call ("RacksheetSignIn") Func RacksheetSignIn () Local $username = _IEGetObjByName ($oIE,"uname") Local $password = _IEGetObjByName ($oIE,"pword") $oIE.Navigate2('http://asag.xxxxxxx.com/apps/RackSheets/LogInSAG/login.asp',2048) _IEFormElementSetValue ($username, "xxxxxxx") _IEFormElementSetValue ($password, "xxxxxxx") Send('{Enter}') EndFunc However I can't seem to use the _IEGetObjByName or Mouseclick to focus on the search field to allow me to enter my search criteria. When I "inspect element" in the Search field I get the attached: Any help would be MUCH appreciated
  2. Correct. neither site logs in , no user name , password etc. ....sorry not sure about " full output from Scite? "
  3. so back to opening each window but not able to login
  4. disregard that "error" I fixed it. I don't have access to the full output window
  5. The page opens and it open 3 tabs with the correct address but it does not login on either the 2nd or 3rd tab....the only "error" is : --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch
  6. Also, there is not login on the initial page (oIE).....only on the other 2 tabs
  7. I m Func LoginSite1() Local $username = _IEGetObjByName ($oIE2,"uname") Local $password = _IEGetObjByName ($oIE2,"pword") _IEFormElementSetValue ($username, "xxxxxxx") _IEFormElementSetValue ($password, "xxxxxxx") ; Need form object here ;_IEFormSubmit($oIE2) Local $oForm = _IEFormGetCollection($oIE2, 0) _IEFormSubmit($oForm) EndFunc Func LoginSite2() Local $domain = _IEGetObjByName ($oIE3,"NF_CustomerID") Local $User_Name = _IEGetObjByName ($oIE3,"NF_UserName") Local $Password = _IEGetObjByName ($oIE3,"NF_Password") _IEFormElementSetValue ($domain, "yyyyyy") _IEFormElementSetValue ($User_Name, "yyyyyy") _IEFormElementSetValue ($Password, "yyyyyy") ; Need form object here ;_IEFormSubmit($oIE3) Local $oForm = _IEFormGetCollection($oIE3, 0) _IEFormSubmit($oForm) EndFunc eant to mention that I had tried that.....same issue.....this is my revied script with the $oIE2 & $oIE3
  8. Thanks again but I'm obviously still missing something....this still opens each tab but doesn't login. #include <IE.au3> Const $navOpenInNewTab = 0x0800 Local $oIE, $oIE2, $oIE3 $oIE = _IECreate('http://asag.xxxxx.com/ASAG/index.htm') $oIE.Navigate2('http://asag.xxxxx.com/apps/xxxxx/LogInSAG/login.asp', $navOpenInNewTab) $oIE.Navigate2('https://soa1gui.xxxxx.biz/gateway/NFServlet;jsessionid=1E3B8F6520DE0A1EC914A8ABB7E86341?NFH_MessageId=&NFH_Page=%2fpages%2fsearch%2fsearch.jsp', $navOpenInNewTab) $oIE2 = _IEAttach("http://asag.xxxxx.com/apps/xxxxx/LogInSAG/login.asp", "URL") $oIE3 = _IEAttach("'https://soa1gui.xxxxx.biz/gateway", "URL") ;LoginSite1() ;LoginSite2() ;LoginSite3() Func LoginSite1() Local $username = _IEGetObjByName ($oIE,"uname") Local $password = _IEGetObjByName ($oIE,"pword") _IEFormElementSetValue ($username, "xxxxx") _IEFormElementSetValue ($password, "xxxxx") ; Need form object here Local $oForm = _IEFormGetCollection($oIE, 0) _IEFormSubmit($oForm) EndFunc Func LoginSite2() Local $domain = _IEGetObjByName ($oIE2,"NF_CustomerID") Local $User_Name = _IEGetObjByName ($oIE2,"NF_UserName") Local $Password = _IEGetObjByName ($oIE2,"NF_Password") _IEFormElementSetValue ($domain, xxxxx") _IEFormElementSetValue ($User_Name, "xxxxx") _IEFormElementSetValue ($Password, "xxxxx") ; Need form object here Local $oForm = _IEFormGetCollection($oIE, 0) _IEFormSubmit($oForm) EndFunc
  9. d'oh...so I think I got that, they do all open but still not able to login on either tab Here's what I've got now: #include <IE.au3> Const $navOpenInNewTab = 0x0800 Local $oIE, $oIE2, $oIE3 $oIE = _IECreate('http://asag.xxxxx.com/ASAG/index.htm') $oIE.Navigate2('http://asag.xxxxx.com/apps/xxxxx/LogInSAG/login.asp', $navOpenInNewTab) $oIE.Navigate2('https://soa1gui.xxxxx.biz/gateway/NFServlet;jsessionid=1E3B8F6520DE0A1EC914A8ABB7E86341?NFH_MessageId=&NFH_Page=%2fpages%2fsearch%2fsearch.jsp', $navOpenInNewTab) $oIE2 = _IEAttach("http://asag.xxxxx.com/apps/xxxxx/LogInSAG/login.asp", "URL") $oIE3 = _IEAttach("'https://soa1gui.xxxxx.biz/gateway", "URL") ;LoginSite1() ;LoginSite2() ;LoginSite3() Func LoginSite1() Local $username = _IEGetObjByName ($oIE,"uname") Local $password = _IEGetObjByName ($oIE,"pword") _IEFormElementSetValue ($username, "xxxxx") _IEFormElementSetValue ($password, "xxxxx") ; Need form object here _IEFormSubmit($oIE2) EndFunc Func LoginSite2() Local $domain = _IEGetObjByName ($oIE2,"NF_CustomerID") Local $User_Name = _IEGetObjByName ($oIE2,"NF_UserName") Local $Password = _IEGetObjByName ($oIE2,"NF_Password") _IEFormElementSetValue ($domain, xxxxx") _IEFormElementSetValue ($User_Name, "xxxxx") _IEFormElementSetValue ($Password, "xxxxx") ; Need form object here _IEFormSubmit($oIE3) EndFunc
  10. Thanks , and not to be stupid, but, I'm not sure what to put for ... ; Need form object here _IEFormSubmit()
  11. I am trying to script the opening of multiple tabs in IE with each tab having a separate login/password. I have been able to make a successful script that will open 3 separate IE sessions with the correct webpage and login or a script that will open 3 tabs in one session (which I want) but will not login. I have tried _IECreate, IEAttach etc. This is the script I am currently using . #include <IE.au3> Const $navOpenInNewTab = 0x0800 Dim $oIE = _IECreate('http://asag.xxxxxxx.com/AAAA/index.htm') ;$o_IE.Navigate2('http://asag.xxxxxxx.com/apps/yyyyyyy/LogInSAG/login.asp', $navOpenInNewTab) ;$o_IE.Navigate2('http://asag.xxxxxxx.com/apps/yyyyyyy/LogInSAG/login.asp', $navOpenInNewTab) Call ("YYYYYYYSignIn") Func YYYYYYYSignIn () Local $username = _IEGetObjByName ($oIE,"uname") Local $password = _IEGetObjByName ($oIE,"pword") $oIE.Navigate2('http://asag.xxxxxxx.com/apps/xxxxxxx/LogInSAG/login.asp',2048) _IEFormElementSetValue ($username, "xxxxxxx") _IEFormElementSetValue ($password, "xxxxxxx") Send('{Enter}') EndFunc Call ("xxxxxxxSignIn") Func xxxxxxxSignIn () __IENavigate($oIE, "https://soa1gui.xxxxxxx.biz/gateway/NFServlet;jsessionid=1E3B8F6520DE0A1EC914A8ABB7E86341?NFH_MessageId=&NFH_Page=%2fpages%2fsearch%2fsearch.jsp", 1, 0x800) Local $domain = _IEGetObjByName ($oIE,"NF_CustomerID") Local $User_Name = _IEGetObjByName ($oIE,"NF_UserName") Local $Password = _IEGetObjByName ($oIE,"NF_Password") _IEFormElementSetValue ($domain, xxxxxxx") _IEFormElementSetValue ($User_Name, "xxxxxxx") _IEFormElementSetValue ($Password, "xxxxxxx") ;Send('{Enter}') EndFunc
  12. I am attempting to run an Autoit.exe with schtasks every weekday @ 9:05 am. I have the below C:\>SchTasks /Create /TN "P10Run" /TR "O:\AUTOIT\P40 Run.au3" /SC WEEKLY /D MON, TUE,WED,THU,FRI /ST 09:05:00 SUCCESS: The scheduled task "P10Run" has successfully been created. I also did a "test" run : C:\>Schtasks /Run /TN "P10Run SUCCESS: Attempted to run the scheduled task "P10Run". But when I run my query to verify success my "Last Result" seems to indicate that the script did not run: C:\>SCHTASKS /QUERY /FO LIST /V /TN "P10RUN" Folder: \ HostName: xxxxxxxxxxxxxxxx TaskName: \P10RUN Next Run Time: N/A Status: Could not start Logon Mode: Interactive only Last Run Time: 6/14/2017 9:08:56 AM Last Result: -2147024894 Author: xxxxxxx Task To Run: O:\AUTOIT\P40 Run.au3 Start In: N/A Comment: N/A Scheduled Task State: Enabled Idle Time: Disabled Power Management: Stop On Battery Mode, No Start On Batterie s Run As User: xxxxxxxxx\xxxxxxxx Delete Task If Not Rescheduled: Enabled Stop Task If Runs X Hours and X Mins: 72:00:00 Schedule: Scheduling data is not available in this f ormat. Schedule Type: Weekly Start Time: 9:05:00 AM Start Date: 6/14/2017 End Date: N/A Days: MON, TUE, WED, THU, FRI Months: Every 1 week(s) Repeat: Every: Disabled Repeat: Until: Time: Disabled Repeat: Until: Duration: Disabled Repeat: Stop If Still Running: Disabled C:\> Is there something missing in my command? Also is there a better way to make sure that the script does in fact sun successfully? Thanks In Advance!
  13. Danyfirex: This worked PERFECTLY!. I have never seen s StrngFormat like this and, I would've probably NEVER found it on my own. MANY Thanks
  14. I have established how to get tomorrows date however I can't seem to figure out how to format the date into my required format of MM/DD/YYYY. I have this: $today=_DateToDayValue(@YEAR,@MON,@MDAY) Dim $Y, $M, $D $tomorrow=_DayValueToDate($today+1, $Y, $M, $D) The _DateToDayValue seems to have a fixed format. I've also tried a : $vardate = _DateAdd( 'd',1, _NowCalcDate()) with a "StringSplit" and/or StringFormat but the _NowCalcDate seems to also be fixed to a YYYY/MM/DD format. I'm sure I'm missing something simple but am at a loss. Any help would be MUCH appreciated
  15. Thanks to all , this is perfect!
  16. this looks very useful but, how would I make this call a specific "line" in the script? As in how would : Switch @WDAY Case 2 To 4 then go to ; ****First Batch file run $Date = InputBox("Date","Enter the Date To Run the Report","Date Here MMDDYYYY",'M8') Send('Batch') Sleep(3000) Send('{Enter}') Thanks again!
  17. I'm new to Auotit but I have built a simple script that "runs" a different "batch" file based on certain days of the workweek. The script works now, but I was wanting to eliminate the need for a manual date entry. For example "First Batch' needs to run every Tuesday thru Thursday however "Second Batch" needs to run only on Friday and "Third Batch" needs to run only on Monday. In addition the 1st batch file runs on Tuesday, say 06/06 (the "FW" section) but then needs to actually report (the F4 date) the next weekday so this Batch actually needs 2 dates verified. What I'm trying to do is when the script is initiated it gets the date, verifies if and which weekday it is and in turn goes to and runs the appropriate "Batch' file. I've found ways to verify weekdays but can't find anything to do all of the above. Any help is MUCH appreciated. ;P10 ShellExecute("C:\Program Files (x86)\Ericom Software\PowerTerm Enterprise\Sessions\mir00p10.PTS") WinWait('(A) Soutwest P10 : PowerTerm Pro Enterprise Suite') WinActivate('(A) Soutwest P10 : PowerTerm Pro Enterprise Suite') Send('$Login) Sleep(3000) Send('{Enter}') Sleep(3000) Send($Password) Send('{Enter}') Sleep(3000) ; ****First Batch file run Send('Batch') Sleep(3000) Send('{Enter}') Send('FW') Send('{Enter}') Send('{DOWN}') Send($Date) Send('{Enter}') Send('{Enter}') Send($Date) Send('{F9}') Send('Y') Sleep(3000) Send('{Enter}') Send('{F4}') Send('Y') Sleep(3000) Send('{Enter}') Send($Date) Send('{Enter}') Send('0620') Send('{Enter}') SEND('{!}SW0410PM.FWR') Send('{Enter}') Sleep(3000) Send('Y') Send('{Enter}') Sleep(3000) Send('{F9}') Sleep(3000) ; ****Second Batch file run Send('Batch') Sleep(3000) Send('{Enter}') Send('FW') Send('{Enter}') Send('{DOWN}') Send($Date) Send('{Enter}') Send('{Enter}') Send($Date) Send('{F9}') Send('Y') Sleep(3000) Send('{Enter}') Send('{F4}') Send('Y') Sleep(3000) Send('{Enter}') Send($Date) Send('{Enter}') Send('0620') Send('{Enter}') SEND('{!}SO0411AM.FWR') Send('{Enter}') Sleep(3000) Send('Y') Send('{Enter}') Sleep(3000) Send('{F9}') Sleep(3000) ; ****Third Batch file run Send('Batch') Sleep(3000) Send('{Enter}') Send('FW') Send('{Enter}') Send('{DOWN}') Send($Date) Send('{Enter}') Send('{Enter}') Send($Date) Send('{F9}') Send('Y') Sleep(3000) Send('{Enter}') Send('{F4}') Send('Y') Sleep(3000) Send('{Enter}') Send($Date) Send('{Enter}') Send('0620') Send('{Enter}') SEND('{!}SW0411AM.LOA') Send('{Enter}') Sleep(3000) Send('Y') Send('{Enter}') Sleep(3000) Send('{F9}') Sleep(3000) Send('EXIT')
  18. I did not, and there is a VBA associated but I'm less familiar with VBA than my meager knowledge of AUTOIT
  19. no, the word "General" is not used anywhere
  20. Let me start by saying that I am VERY new to Auotit but, I am trying to build a simple script to run some reports that are now done manually. I have the script built but 8 times out 10 I get an error "invalid command name: "General". The program does run sometimes but will not the majority of the time. When I run the command manually from the shortcut it always works but I can not login with Autoit or even cmd line without getting this pop up error. Below is the login portion of the script. $Login = 'xxxxxxx' $Password = 'xxxxxxxx' ShellExecute("C:\Program Files (x86)\Ericom Software\PowerTerm Enterprise\Sessions\mir00p10.PTS") AutoItSetOption('MouseCoordMode', 0) WinWait('(A) Soutwest P10 : PowerTerm Pro Enterprise Suite') WinActivate('(A) Soutwest P10 : PowerTerm Pro Enterprise Suite') Sleep(5000) Send($Login) Send('{Enter}') Send($Password) Send('{Enter}') ------------------------------------------------------------------------------------------------------------ Any help would be appreciated!
×
×
  • Create New...