Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selection Trigger
#1
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?
An old blog on QM coding and automation.

The Macro Hook
#2
To detect selection need to use clipboard. Will interfere with normal work.
#3
Rats....let's go ahead and move this to the "Wish List". Smile
An old blog on QM coding and automation.

The Macro Hook
#4
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
#5
Macro Enum clipboard formats
Code:
Copy      Help
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"
#6
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)
An old blog on QM coding and automation.

The Macro Hook
#7
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     Help - how to add the trigger to the macro
Code:
Copy      Help
_s.getsel
_s.from(_s "[]" "")
newitem("debugtemp" _s "" "" "" 1)
mac "debugtemp"
newitem("debugtemp" "" "" "" "" 32)
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)