Is it possible to get the source code of the currently active website in Google Chrome with an AutoHotkey script? Or even easier, a spesific word or number, in this case a PIN code? Since the PIN code is constantly being changed, I cannot download the source code by URL.
Hoping some of you have an answer!
Source code of active website?
Re: Source code of active website?
does the pin code have a name, id, class name etc?hu5b wrote:Is it possible to get the source code of the currently active website in Google Chrome with an AutoHotkey script? Or even easier, a spesific word or number, in this case a PIN code? Since the PIN code is constantly being changed, I cannot download the source code by URL.
Hoping some of you have an answer!
if yes its an easy grab, post the website
Re: Source code of active website?
Sure, it has a class. This is Kahoot!, and if you know what that is, you will know that it is impossible to get the source code or parts of it by URL.
Re: Source code of active website?
if your goal is to load the page enter pin and then click spin and get the username and grab that, its no problem its div 7 and the pin is div 6
i need to know what your plan is and i might be able to test
i need to know what your plan is and i might be able to test
Re: Source code of active website?
My plan is just to catch the PIN code. Is that possible?
Re: Source code of active website?
yes, i did a test and it workedhu5b wrote:My plan is just to catch the PIN code. Is that possible?
i just dont know what you are doing before u get to that pincode page
Re: Source code of active website?
Do not worry about that. I only want to grab the PIN code from the currently active website when clicking a hotkey.
Re: Source code of active website?
Is it possible to change the value of this ng-class with an AutoHotkeyscript, without seeing it visually?
Re: Source code of active website?
You can consider using Internet Explorer and the COM interface -- essentially a way for a program to instruct what IE should do. There are starter guides in the tutorial section of the forums.
You can consider just doing what a human could. Pull up the source code page. For me, I'd right click the page and select "View Page Source", which I think has some kind of native keyboard shortcut Ctrl+u. I would simply copy that source code to clipboard and extract the PIN with RegEx. I do this for loading up videos on Vikings.com (National Football League team website) because the videos do not play for me in Firefox when they are embedded; I have to extract the source link.
Or, because you say you want to change it, pull up the document inspector or development tools; I just checked Chrome and it's done with Ctrl+Shift+I (capital i). Go to the "Elements" tab and you see the HTML there. Feel free to edit it to submit your own values. Though typically changes done in developer tools are only for you to see; if there's something you want to submit to a website, use the normal fields as a human would normally.
You can consider just doing what a human could. Pull up the source code page. For me, I'd right click the page and select "View Page Source", which I think has some kind of native keyboard shortcut Ctrl+u. I would simply copy that source code to clipboard and extract the PIN with RegEx. I do this for loading up videos on Vikings.com (National Football League team website) because the videos do not play for me in Firefox when they are embedded; I have to extract the source link.
Code: Select all
!-:: ; vikings video viewer
Send ^u ; opens up page source in a new tab
Sleep 2500
Send ^a ; select all the text
Sleep 1000
Clipboard:=""
Send ^c ; put it on the clipboard
ClipWait, 2 ; if it's not on the clipboard in 2 seconds, an error occurred
If ErrorLevel
{
MsgBox error
return
}
If RegExMatch(clipboard,"<meta itemprop=""contentURL"" content=""(http.*?.mp4)",outputvar) ; finds the first .mp4 link which is the link I want
{
HD:=RegExReplace(outputvar1,"500k","5000k") ; replaces part of the link, "500k" with "5000k" which is a higher definition video
Send ^w ; Closes the tab with the page source in it
Sleep 350
Send ^l ; focuses on the address bar
Sleep 150
SendInput %HD%{Enter} ; navigates me to the direct video link in high quality
}
return
Who is online
Users browsing this forum: No registered users and 152 guests