Re: Check if website is open
Just realized i could make a chrome extension, but this is coded in Java, a coding language i do not know... AND, if i knew it, i still had to find a way that the user could enter the username and password when installing the extension, otherwise it would only be able to fill in the one username and password that i entered... Please help me out here!
(If it matters, here is the log on site: https://idp.feide.no/simplesaml/modu...2Fdefault.aspx )
Re: Check if website is open
You could check the LocationUrl or LocationName for internet explorer and then use the document to write information
Re: Check if website is open
Quote:
Originally Posted by
Max187Boucher
You could check the LocationUrl or LocationName for internet explorer and then use the document to write information
... I am a noob :P ... Really... i AM a NOOOB! I need more info please :) Explain in details :D Thanks
Re: Check if website is open
I could make you an example of code but i do not have .net installed only vb6 but i can make you a code example if you'd like it will use internet explorer. Give me a couple hours i am not at home just on my iphone at the moment
Re: Check if website is open
Quote:
Originally Posted by
Max187Boucher
I could make you an example of code but i do not have .net installed only vb6 but i can make you a code example if you'd like it will use internet explorer. Give me a couple hours i am not at home just on my iphone at the moment
Yeah! thanks! would appresiate that :) But is it possible to make it for chrome instead? Most of my classmates (including me) uses chorme, so i preffer that as an option...
Re: Check if website is open
I dont know about chrome it is a whole different program i will have a look but as of right now i do not know anything about chrome but do you still want the internet explorer lime i said i will have a look at chrome but dont expect anything :)
Re: Check if website is open
here is some code you can play with... hopefully it is 100% compatible with .net i googled a couple functions and it looks like it should work
ok so to check if website is opened try this
Code:
Dim objShell As Object, objIE As Object, objShellWindows As Object
Dim iCount As Integer
Set objShell = CreateObject("Shell.Application")
Set objShellWindows = objShell.Windows
On Error Resume Next
For i = 0 To objShellWindows.Count - 1
If InStr(1, objIE.locationurl, "https://idp.feide.no") Then
MsgBox "Found idp.feide.no Website!"
End If
Next
and for manipulation of document... of Internet Explorer (sorry no luck with chrome it uses WebKit and completely different i guess)
Code:
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Silent = True
.Visible = True
.Navigate "https://idp.feide.no/simplesaml/module.php/feide/login.php?org=alstahaug.kommune.no&asLen=253&AuthState=_0436c342a257156857910430fffbb853228cef6218%3Ahttps%3A%2F%2Fidp.feide.no%2Fsimplesaml%2Fsaml2%2Fidp%2FSSOService.php%3Fspentityid%3Durn%253Amace%253Afeide.no%253Aservices%253Acom.itslearning%26cookieTime%3D1348966536%26RelayState%3Dhttps%253A%252F%252Fwww.itslearning.com%252Felogin%252Fdefault.aspx&submit=Continue+%C2%BB"
End With
Do While Not IE.locationurl = "https://idp.feide.no/simplesaml/module.php/feide/login.php?org=alstahaug.kommune.no&asLen=253&AuthState=_0436c342a257156857910430fffbb853228cef6218%3Ahttps%3A%2F%2Fidp.feide.no%2Fsimplesaml%2Fsaml2%2Fidp%2FSSOService.php%3Fspentityid%3Durn%253Amace%253Afeide.no%253Aservices%253Acom.itslearning%26cookieTime%3D1348966536%26RelayState%3Dhttps%253A%252F%252Fwww.itslearning.com%252Felogin%252Fdefault.aspx&submit=Continue+%C2%BB"
DoEvents
Loop
Do While IE.readystate <> 4
DoEvents
Loop
'Start Using Document
IE.document.Forms.f.username.Value = "Example For You"
IE.document.Forms.f.password.Value = "MyPasswordHere"
'This (below) is the Login Button (to click on the button)... remove the ' to allow click on the button
'IE.document.Forms.f.childNodes.Item(1).childNodes.Item(5).childNodes.Item(10).Click
so add one of those to a button click or form load try and play around with that i hope it will work for you it does for me... let me know if you need more help
Re: Check if website is open
Thanks! I will try it :) But i'm not home at the moment, and i am busy. I'll try it tomorow probably :)
Re: Check if website is open
Yeah, I wouldn't bother. Definitely not .Net compatible!
Is there any reason for not simply using Process.Start("https://idp.feide.no/") which will open the page in the default browser thereby ensuring that it is both open and the current tab?
Re: Check if website is open
Well it might not be 100% compatible but im sure you might have to change maybe how the document is used?
Re: Check if website is open
Anyway i will install visual studio the newest one.. But not right now in a dat or two i'll be able to do further testing then
Re: Check if website is open
Quote:
Originally Posted by
Max187Boucher
Anyway i will install visual studio the newest one.. But not right now in a dat or two i'll be able to do further testing then
I would apressiate that! I'm on vacation at the moment.. and didnt bring my pc. (I'm currently using a pc at the hotel). Will be back before the end of the week. No day decided.