Cut and paste out of/ into text fields in a separate window doesn't work - objective-c

I have a Macintosh Mozilla plugin which puts up a separate window for login information.
It seems to work fine, it gets keyboard events like typing and hitting
return to hit the default button. HOWEVER, it doesn't seem to get cut
and paste events. When I hit Cmd-v, the edit menu flashes, but nothing
happnes.
Is this a problem with my responder chain? Do I have to specially tell
Mozilla that I want these events? or am I likely to have some other
problem that I haven't even thought of?

It turns out the problem is that I'm using cocoa windows inside Mozilla, which isn't Cocoa... fail.

Related

AutoIt select item from menubar

i want to build some automation code that will select some item from a menubar of minimized (or non-active) window.
I have tried to do it with ControlSend function by sending some keys like alt and directions, but it's not working...
See my example:
I want to select the item "Select All", for this i wrote this code:
WinWaitActive("")
Send("{ALTDOWN}{ALTUP}{RIGHT}{ENTER}{DOWN}{DOWN}{ENTER}")
The code above works good, but i want that it will work when the window is not active, so i wrote this line:
ControlSend("", "", "Term Class1", "{ALTDOWN}{ALTUP}{RIGHT}{ENTER}{DOWN}{DOWN}{ENTER}")
This is not working for me, do you have some idea how can i implement it?
I too was trying to work with minimized windows but have since switched from windows so i wont be able to test things out for you. I have been told (and from experience) that you cant use control send (or the mouse click alternative which is called "control click") on applications that do not come stock with windows (applications that dont come with the computer, to put it simply).
However i came upon this (https://www.autoitscript.com/forum/topic/7112-minimized-clicking-great-for-game-bots/) which seems to be a 3rd party add in that lets you do just that, i tried using it but could not make it fit my needs. Perhaps you can, I would try to get it working for you but again, i dumped windows. The above link is the best candidate i have found, and by far the most promising after i searched and tested for about a month a while back, Good Luck.
EDIT: As always, i do not promise anything from the above link, you use it at your own risk.

How to open new tabs, switch tabs and close tabs with selenium on chrome after update removed sending shortcuts

There are two parts of switching tabs on chrome (and possibly other drivers too).
You first have to switch the context that the driver is working on, and in my case I also have to change the view so that a certain tab is focused.
You use to be able to just send the short cut keys (ctrl + tab, ctrl + t, etc) to manage switching the views, however that was changed recently.
After causing me a headache for this, and not really finding any good answers to fix this, I came up with some work arounds.
Opening
You use to be able to create tabs on chrome by sending keys the shortcut to the page using the driver. However, it appears that doesn't work any more. Opening tabs in an alternate way is actually fairly easy, by using some Javascript:
((JavascriptExecutor)webdriver).executeScript("window.open();");
You then have to switch the context to the new window you just opened. You do this by using the webdriver.switchTo() method (plenty of documentation on this)
Switching
Another challenge that I faced was switching tabs after the chrome update made it impossible to just use shortcuts. I originally tried using Javascript to give the window a name like:
window.name = 'foo'
And then on a different tab you could do:
window.open('', 'foo')
and it would switch tabs correctly. However the issue with that it would work fine when you are sending it via console, but for whatever reason it would not work when sending it through the JavascriptExecutor.
I found a work around however. It is kind of hacky, but I do not see an alternative as of now. First you want to switch the context to whatever tab you want to be on using the window handles (again plenty of other posts explain how to do this, so I will not go into detail how to get the correct handle) doing this:
webdriver.switchTo().window(windowHandle);
This makes it so now the webdriver is on that tabs context. Then to actually switch the view so that it is synchronized with the context you have to do a bit of a hack. What you do is you open an alert on the context you want to switch views to, and then close the alert. This happens fairly quick so you will not even see the alert open.
((JavascriptExecutor) webdriver()).executeScript("window.alert('Horrible hack to switch tabs')");
webDriver().switchTo().alert().accept();
Closing
Closing is actually very easy. All you do is:
webdriver.close();

ITfTextInputProcessor::Deactivate gets called unexpectedly on regaining focus

I am implementing a text service on windows. Things work fine. However when I shift window focus to another application and shift focus back to the original application, the selected text services gets de-activated (I notice a call to ITfTextInputProcessor::Deactivate). I think this call is unexpected. Post this call, The service has to be re-activated manually. I am surely doing something goofy. Just that I don't know what it is.
Offhand, I'd say that you are indeed doing something goofy. :) In particular, I'd pay careful attention to your ITfThreadMgrEventSink::OnSetFocus implementation (and, obviously, you need to implement ITfThreadMgrEventSink in your text service and connect it via AdviseSink if you haven't already.)
After more research, I've figured out what’s happening:
When you set focus back to Word, TSF gets the current thread’s active keyboard layout (actually a locale ID).
It then compares that keyboard layout with the language ID of the currently active text service.
If they’re different, TSF then activates the text service for the active keyboard layout, and deactivates any previously active text service.
I believe this behavior is different on Vista/Windows 7.
The fix would be to use LoadKeyboardLayout/ActivateKeyboardLayout to set the process keyboard layout in your ITfTextInputProcessor::Activate implementation. Apparently some apps also need you to call ITfInputProcessorProfiles::ChangeCurrentLanguage() as well.

How to fix a non responding ext.list?

I've got a problem with an Ext.List:
You press a button on the main menu and are shown the list. Everything on it works fine and it let's you choose, where to go deeper inside the app. No problems so far.
But if you then go back to the main menu by pressing a "back"-button and reenter the page, that shows this Ext.List, it doesn't work anymore: you can't select an entry of the list.
The "back"-button removes the list, if you return to the main menu this way:
setTimeout(function(){page.removeAll();},100);
What's my mistake? Do you know a better method than "page.removeAll()" that really kills this Ext.List to let it then be completely recreated when I choose to see it in my main menu?
Thanks in advance, you guys have the best tips and tricks.
It's hard to tell without seeing your code but I suspect that there is a javascript error somewhere in the program flow that you described. If you display the javascript console in either Chrome or Firefox it should show the error.
Depending upon how the function that creates the list is defined it would normally recreate the list upon page/function entry and there should be no need to 'kill' the list explicitly.

How to disable autocompleet intellisence when pressing spacebar in vb.net

While creating test in vb.net i found it pretty annoying when you start typing and autocompleet changes a class to something similar looking even it is a class you don't want.
Image to illustrate :
In the picture you can see I am trying to setup a controller (this controller does not exist at the moment) so when i press the spacebar i will get DienstControllerFacts.
How do you disable this sort of auto-correction?
I can't see your image, but I think this gives you some keyboard shortcuts for dealing with your issue, and this shows you how to modify the settings.
Did you tried to selecting Common tab instead of All tab in the intellisense window?