COM help

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
diaewad
Posts: 101
Joined: 17 Feb 2015, 10:55

COM help

04 May 2015, 08:36

I've been dealing with COM issues for quite some time, but I finally figured out what was going wrong: I was trying to access a frame inside a frame. After an entire 8-hour work shift, I figured it out (sorry, boss!), but then when I went to implement it, it didn't work correctly.
The script is for creating work tickets. The information shows up exactly where it's supposed to and clicks the Save button as it's supposed to; however, the ticketing system comes back with an error and shows the name and status field empty, as if it's not taking the information. Here's the error: "AHD03075:Required attribute Affected End User is missing from object Request." The ticketing system is called CA Service Desk Manager, and it's through IE. Can anyone point me in the direction of how to rectify this? Here's my code:

Code: Select all

!3::
wb := IEGet("New CA Service Desk Manager window loading...")

Newframe := ComObj(9,ComObjQuery(wb.document.getElementById("cai_main").contentWindow,"{332C4427-26CB-11D0-B483-00C04FD90119}","{332C4427-26CB-11D0-B483-00C04FD90119}"),1)
Newframe.document.getelementsbyname("customer_combo_name")[1].value := "My name"    ;Inputs my name
Newframe.document.getelementbyId("df_0_3").selectedIndex := 13     ;Sets status
Newframe.document.getelementsbyname("SET.description")[1].value := "lea-ws160d138w1.v15.med.va.gov`nMS14-012: Cumulative Security Update for Internet Explorer (2925418)"   ;Sets description
Newframe.document.getElementById("imgBtn0").click()   ;Clicks Save
return 
User avatar
Chunjee
Posts: 1499
Joined: 18 Apr 2014, 19:05
Contact:

Re: COM help

04 May 2015, 08:42

Sounds like you can't create the ticket without a value for "Affected End User"?
Maybe something like this?

Code: Select all

Newframe.document.getelementsbyname("Affected_End_User")[1].value := "Impacted Enduser"
diaewad
Posts: 101
Joined: 17 Feb 2015, 10:55

Re: COM help

04 May 2015, 08:44

Oh... I don't actually input "My name." I use my actual name. I just didn't want everyone to know my full name. ha ha I put it in exactly as it appears when I create a ticket manually.
User avatar
Chunjee
Posts: 1499
Joined: 18 Apr 2014, 19:05
Contact:

Re: COM help

04 May 2015, 08:48

Are you trying to say customer_combo_name is the same as Affected End User? Obviously you replaced your real name with "My name"

What are you using to read all the page elements?
diaewad
Posts: 101
Joined: 17 Feb 2015, 10:55

Re: COM help

04 May 2015, 08:56

Oh! I see what you're saying. I missed the change you did initially. Yes, customer_combo_box is the field associated with the End User name. I'm using the iWB2 Learner to grab the element information.
diaewad
Posts: 101
Joined: 17 Feb 2015, 10:55

Re: COM help

04 May 2015, 13:52

Nevermind. I figured it out. There are other behind-the-scenes settings I also needed to set. In case someone finds this thread in the future, the settings are these:

KEY.customer
customer_lname
customer_fname
customer_mname
SET.customer

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 382 guests