I need to log into a website (reuters.com) once programatically and then I would like to use a cookie so that the site remembers that I am logged into and I don't have to log in everytime I change webpages within the site. What is the best way to do this?
See Auto login form with Visual Basic.
You first need to get the element that you want to interact to, then set its value.
Related
I want to be able to send a stream of data from a user computer to a web-service. That should not be too hard - I would use an application written in dot-net that resides on a user's Windows computer.
However, the tricky part is that the stream-of-data should only be sent (by the app) when the user clicks on a button or a link in a WEB PAGE that is open in his browser. The app itself would be minimized in the system tray. And he should be able to stop the stream by clicking on a stop-button (or link) in that web page..
So I found some info on stackoverflow that says that you can put a link in your page, something like: [a href='alert:"Hello World" ' ] and if you register your application (in this example the app would be called "alert.exe") in the registry, then when the user clicks on the link, he will cause the application to start, and to receive "Hello World" as a parameter.
Anyway, there are complications in my case. I want to be able to tell the application when to start sending data, and when to stop sending data, without starting new instances of the application. If the user clicks START, and the app is already open, I don't want it to open again. I do want a message to go saying "start sending" and if the user clicks on a STOP button (or link) to say "stop sending". The user might click on these web-page buttons several times in a session, and I don't want to close and reopen the program each time.
So a couple of questions:
Am I taking the right approach? Would "plug-ins" be a better idea?
If I am taking the correct approach, is there some way to send commands from a web page to an application?
Is it safe to have my app modify the registry of user computers?
If so, is there a set of commands for doing that?
Is the registry supported by Windows 7, Windows 8, etc? I know it is not supported on a Mac.
Thanks in advance.
LL
P.S. (the info on launching apps from your browser was at: http://msdn.microsoft.com/en-us/library/ie/aa767914%28v=vs.85%29.aspx).
Hi ive developed a application that works with my site by using
SendKeys.send("{ENTER}") to submit info on one of my forms.
Is there a way to stop it from running outside the application?
For example im trying to run the program in the background and when im browsing my facebook or on google it randomly keeps hitting enter.
Any help is greatly appreciated thanks for your time.
The short answer is to look at the windows available for a process and check the titles to see if it's the page you want.
If System.Diagnostics.Process.GetProcessesByName("firefox").MainWindowTitle = 'My Page Title'
...
End If
That said, there are much better ways to do this - If you're using firefox, look into GreaseMonkey, if in Chrome, look at TamperMonkey.
Both allow you to inject custom javascript into any page whose url matches a pattern you choose. In effect, you could write some Javascript to submit a form (say) 30 seconds after page load.
This would have the benefit of working if a different tab is selected as well as not requiring a whole application.
The SendKeys.Send method will indiscriminately send the key stroke to the active application. There is no way to use this API to target a specific application.
You could change your app to try and verify the active application is the one you want to send keys too. This is destined to be a flaky process though. No matter how good your verification is it's always possible that the active app is switched to another app after your verification completes.
If VerifyActiveAppIsTarget() Then
SendKeys.Send("{Enter}") ' Active app could change before this runs
I would persue a different solution for sending data between my apps
When creating a hyperlink in powerpoint or word 2010 to take the user to our website, the link changes from what I put in powerpoint to include a "?target=" tag after the domain name followed by the remainder of the link. This then for some reason forces the user to log in again before accessing the website (a secured site) even if they are already logged in. However, if the link I provided is pasted in the browser as I thought powerpoint would basically do, everything works as intended and the user is brought to the desired location within our site if logged in.
I ended up getting it to work via a method with vba, but I was wondering if anyone could explain why this might be happening. I'm not entirely sure if this is something on our end or something to do with powerpoint or maybe both. Thanks.
This is likely due to the behavior https://github.com/spilliton/fix_microsoft_links is designed to fix.
Basically this is because when Office products try to open a link, they open it internally, follow any redirects, and analyse the resulting document to see if it can be opened with an Office application. When the link needs to be opened with a browser, they forward on the final url (result of a redirect) to the browser, which in your case is the login page. When opened in the browser, it notices we are already logged in and redirects to wherever your application goes in that case, possibly the login page
I created a web part and deployed it. I want to display only webpart data. I dont want to display toolbar which allow minimize, close and edit web part & title , i did set Chrome Type=None . but its not working. How can i make web part as non-configurable to users means user can see it. not configure it.
thanks
This is depend on privileges. Where you administrator you will see every web part options, but if you a anonymous user can see only title if you not set as chrome.
We've been having trouble with inconsistent display of the like button comment field on our external sites (i.e. some people see it pop up after clicking the like button, and some people don't). We searched around and made sure that the app id referenced when loading the HTML5 version of the like button code matched the website domain in the app settings (per this thread), and finally determined that the "problem" is the user's security settings: if they have enabled "secure browsing" in their security settings, then they won't see the comment field pop up unless the page is also hosted securely. (only other place I could find this discussed is on this site)
Has anyone figured out a workaround for this? It appears that the iframe version doesn't have this problem (though it does make the user click a link to see the comment field), but it requires 400px of minimum width which busts our layouts. We want to always make the comment field appears after the user clicks the like button, but it isn't feasible for us to host every page on the site securely. Any suggestions?