Posts: 1,769
Threads: 410
Joined: Feb 2003
I need to build a menu that pops up when I select something in a certain window (e.g. Word or Firefox).
For instance, when I use my mouse to select the text I want (although I might like it to happen with the arrow keys too), when I release the button I'd like the menu to show up and then, I could pick some options to modify the text etc.
I tried to get the accessible object trigger to work but it seems a bit beyond me. Can this be done?
Posts: 12,141
Threads: 143
Joined: Dec 2002
To detect selection need to use clipboard. Will interfere with normal work.
Posts: 1,769
Threads: 410
Joined: Feb 2003
Rats....let's go ahead and move this to the "Wish List".
Posts: 1,000
Threads: 253
Joined: Feb 2008
Couldn't you grab which window is active and only have the clipboard work if certain windows are active?
Is there a way to be able to know what kind of data is in clipboard...ie: file, picture, text etc...?
Thanks,
Jimmy Vig
Posts: 12,141
Threads: 143
Joined: Dec 2002
Macro
Enum clipboard formats
out
int f; str s
OpenClipboard 0
rep CountClipboardFormats
,f=EnumClipboardFormats(f)
,s.fix(GetClipboardFormatName(f s s.all(100)))
,out "%i %s" f s
CloseClipboard
mes- "The numbers without names are standard clipboard formats, eg CF_TEXT.[][]Press OK to learn more." "" "OCi"
run "http://www.google.com/search?q=site:microsoft.com Clipboard Formats"
Posts: 1,769
Threads: 410
Joined: Feb 2003
The clipboard is a thought and I may have to go to it but right now I'm using a clipboard enhancer and I don't want to clutter up that database with all the little changes I make.
However, that OpenClipboard looks interesting 80)
Posts: 1,769
Threads: 410
Joined: Feb 2003
Here's what I'm using for the 'SQL Server' type run selected text ability.
As you can see I've got it running from a key on my second keyboard.
Function
Run_Selected_Line
Trigger
- //FF_Keyboard2
_s.getsel
_s.from(_s "[]" "")
newitem("debugtemp" _s "" "" "" 1)
mac "debugtemp"
newitem("debugtemp" "" "" "" "" 32)