Is autohotkey able to pull details from html code?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
RyanAyton
Posts: 49
Joined: 14 Aug 2017, 09:53

Is autohotkey able to pull details from html code?

03 Oct 2017, 04:44

Hello,

In my workplace I use SalesForce to reply to tickets from customers.

Is it possible for autohotkey to retrieve, for example, case contact name which is detailed in the html code?

I'm able to copy and paste this so initially I used MouseClick to select this but it only worked when the name was in the same location.
I found in most instances that this is ineffective so I was hoping it is able to locate the name in html and paste that into the comment box.

This is what the code looks like just now:

::#p::
; MouseClick, left, 310, 530
; MouseClick, left, 310, 530
; MouseClick, left, 310, 530
; Send, ^c
; MouseClick, left, 300, 800
Send, Dear {enter}Many thanks for your enquiry.{enter 4}I hope this resolves the issue.{enter 2}Kind Regards{enter}Ryan{UP 5}
; MouseClick, left, 315, 786
; Send, ^v
; MouseClick, left, 290, 835
Return

Many Thanks,
Ryan
User avatar
Blackholyman
Posts: 1293
Joined: 29 Sep 2013, 22:57
Location: Denmark
Contact:

Re: Is autohotkey able to pull details from html code?

03 Oct 2017, 04:57

how do you get to the html, as ahk is able to parse the html just fine, lots of methods, but try and tell us more and give us a sample of your html
Also check out:
Courses on AutoHotkey

My Autohotkey Blog
:dance:
RyanAyton
Posts: 49
Joined: 14 Aug 2017, 09:53

Re: Is autohotkey able to pull details from html code?

03 Oct 2017, 09:36

Hello,

Here is an example of the element which stores the customer name:

<span id="pg:addCommentF:addCommentPB:rptOrder:1:emailCustomerPBS:emailCustomerPBSI:j_id87"><input id="pg:addCommentF:addCommentPB:rptOrder:1:emailCustomerPBS:emailCustomerPBSI:EmailCustomer_Checkbox" type="checkbox" name="pg:addCommentF:addCommentPB:rptOrder:1:emailCustomerPBS:emailCustomerPBSI:EmailCustomer_Checkbox" checked="checked" onclick="historyclicked();"> Austin Tovey&nbsp;&nbsp;&nbsp;&nbsp;</span>

<input id="pg:addCommentF:addCommentPB:rptOrder:1:emailCustomerPBS:emailCustomerPBSI:EmailCustomer_Checkbox" type="checkbox" name="pg:addCommentF:addCommentPB:rptOrder:1:emailCustomerPBS:emailCustomerPBSI:EmailCustomer_Checkbox" checked="checked" onclick="historyclicked();">

CustomerName&nbsp;&nbsp;&nbsp;&nbsp;
User avatar
Blackholyman
Posts: 1293
Joined: 29 Sep 2013, 22:57
Location: Denmark
Contact:

Re: Is autohotkey able to pull details from html code?

04 Oct 2017, 00:22

I don't use SalesForce.

but for this example i will assume that your sample html is in the clipboard

Code: Select all

pos := RegExMatch(clipboard, ">\s*([A-Za-z ]*)&", match)
msgbox % match1
Also check out:
Courses on AutoHotkey

My Autohotkey Blog
:dance:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 296 guests