Awesomium: Control other app like sendmessage - vb.net

Today I had an idea for a program in vb.net that should add some global hotkeys to Spotify.
I tried to do this with sendmessages, but it didn't work, because Spotify uses Awesomium and so most of the controls aren't Windows-Controls which I can get with sendmessage.
Is there any other possibility to "remoteclick" a button inside the webviewhost?
Or has anyone an other idea how I could click a button in Spotify with my program?

You can do almost anything using AutoIt. Check into that. Lots of game bots are used with it.

Related

Create VB program to watch a website in Internet Explorer

Thanks for taking the time to assist me.
At work we use a 3rd party online chat system using internet explorer. Basically what happens is we initially follow a link, login, a pop up window comes up with the chat control page where we would see a notification for a new chat
The issue we have is no sound plays, and it's very easy to miss a chat.
In theory could I easily learn in VB how to watch that specific window of Internet Explorer for a change, then play a sound when a change in that window occurs until acknowledged?

How to play a Sound through External Speaker in vb.Net?

I have a button called 'btnLogin' on my form, and want to play a 'beep' sound when this button is pressed.
I have already attempted the 'Beep()' command, but this will only play through the motherboard, and not any external speakers.
How could i make this button command work?
Always use MSDN as a reference when trying to code things in .NET framework, they have a pretty extensive documentation with example and usual stuff you would need.
My.Computer.Audio.Play("c:\Windows\Media\chimes.wav")
From: http://msdn.microsoft.com/en-us/library/4y171b18(v=vs.90).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1

How to simulate mouse clicks?

I was wondering how to create a sort of auto clicker using VB.NET.
I would basicly have the click coordinates pre-defined and the clicks, which would have to be separated by delays I guess since I want more than one to happen periodically, would happen outside of the application window (I read this envolves extra system hooks?).
The only code I have been able to find is related to clicks on the application window, which is not what I am looking for.
In short: I want to click a button on the app window, which would initiate a number of clicks on certain pre-defined screen coordinates.
Thanks in advance :)
See this discussion on social.msdn: Simulate a mouse click in a program.
Uses winapi: SetCursorPos, GetCursorPos and mouse_event.
I believe you need to P/Invoke into Windows to accomplish this.
Have a look at the SendInput function.
If you are using automate the program,that program have some tabindex in order to relevant control.then you can use;
SendKeys.Send("{TAB}");
SendKeys.Send("{ENTER}");
it is more accurate on desktop application

vb.net Display/Focus/Show Form on top of PC Game

What I am trying to accomplish is this: I want to be able to press the F5 key on my keyboard, while playing a PC game, to show (bring forward, focus, etc.) my program. My 3 attempts so far have failed. Any idea on how I could accomplish my goal? Similar posts on other forums say to set the form's key preview to true and use on keyPress... which failed.
Thank you,
Anonymous
Here is the question about capturing global mouse / keyboard, you can try using it in VB.NET and test it, though I guess you only don't want to be caught while playing games during work. ;)
Also I definitely suggest this link from it. :)

Binding key combinations to your application

How can I bind a key combination to my vb.net application? I know it has SOMETHING to do with the registry, but I have no earthly idea what or how to go about doing this. I want the user to be able to hit those keys when the app is open and have it execute my function, but not while the app is closed.
Thanks for the help!
If you are using a dialog, then you can put '&' into the text for some controls (buttons, checkboxes, radio buttons, etc) and this will cause Alt plus the next character in the text to be used as an accelerator/shortcut. i.e. "&Open" would activate the Open button if you press Alt+O. "Op&en" would activate if for Alt+e.
Beyond that, as Jason Irwin said, you need to add an event handler to your Form for KeyDown or KeyPress events, and then check if the keypress is the key combination you are interested in. This will only work if the user activates your form (clicks in it to give it the input focus. If they put it behind another window, it will not react to the key presses)
If you don't want to show a form, or want to react to keypresses when you're not the input-focus application, then it gets a bit more complicated (you either need to use a hidden form or a keyboard hook)
edit
OK, it looks like you want a keyboard hook. This looks like a good article.
It depends on what you are trying to do:
If you have a gui application and you want to handle key events then you can do that in a keydown eventhandler
If you want to do more low-level stuff and have an application that will intercept all key strokes (regardless of whether or not the application has focus/is visible) then you need to use pinvoke to hit the win32 apis. I suggest you read the following:
link text
Please let us know what you are trying to do so we can provide better feedback.
Using Google, I found this Keyhook example.
I've worked with keyhooks before, in Delphi WIN32, so I am a bit familiar with them. (Just not in C#.) If you add one to a DLL, all Hell might break loose since most virus scanners will recognise this as malware behaviour. (Especially if you use them in the wrong way, causing them to be injected in each and every process that's running on your system.)
A keyhook will allow key combinations to be captured from other processes, though.
For a solution without programming requirements: Drop a shortcut for the application on your desktop. Edit it, assign a shortcut, close it. Press shortcut to test...