Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Autocomplete or Auto Complete SIMPLE


  • Please log in to reply
5 replies to this topic
caveatrob
  • Members
  • 194 posts
  • Last active: Oct 10 2018 03:48 PM
  • Joined: 28 Oct 2006
Okay - I've posted a few times. I want a very simple script that lets me either type a period and two letters (like .os) or a period and control-space and pops up a list of possible matches that I can insert by choosing and pressing tab or Enter.

So far everyone keeps pointing me to ISENSE or Intellisense. I know about these. I just want something simple! I can't get those to work for a really simple case; it's overkill.

SpiderGames
  • Members
  • 936 posts
  • Last active: Aug 13 2019 02:50 AM
  • Joined: 09 Jun 2008
What? I don't understand what you want.
Posted Image
I know i have 6 legs. It's cuz I'm special.

evan
  • Guests
  • Last active:
  • Joined: --
how about lets start from whats wrong with those 2 programs?
its not overkill, there does not exists 1-2 lines code that makes the command that u want

tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: May 02 2019 09:16 PM
  • Joined: 21 Dec 2007
so whats so dificult about intellisense
never mind i dont care
Never lose.
WIN or LEARN.

SoLong&Thx4AllTheFish
  • Members
  • 4999 posts
  • Last active:
  • Joined: 27 May 2007
Assign your preferred hotkey to run this script, should work, it is pretty basic.
WinGet, active_id, ID, A ; store active program

Send, ^!{LEFT} ; select word up to dot

Send, ^x ; cut word

Send, {BS} ; delete dot



If  (Clipboard = "os")

	list=Win98|W2K|WinXP|Vista|Mac OSX|Ubuntu 7|Redhat 9|MSDOS 6.2

If  (Clipboard = "oz")

	list=Wizard|Yellow Brick Road|Wicked Witch



Gui, -border +toolwindow

Gui, add, listbox, x0 y0 w300 h200 sort vSelected, %list%

Gui, Add, Button, Default, &OK ; "hidden" button

Gui, Show, w300 h200

Return



ButtonOK:

Gui, Submit

Gui, Destroy

WinActivate ahk_id %active_id%

Clipboard:=selected

Send ^v ; or Send % selected

Return



Esc:

GuiEscape:		

GuiClose:		

ExitApp


Serenity
  • Members
  • 1271 posts
  • Last active:
  • Joined: 07 Nov 2004
You could just use hotstrings and menus:

menu, os, add, Windows 98, do
menu, os, add, Windows 2000, do
menu, os, add, Windows XP, do 

::.os::
menu, os, show
return

do: 
send, %A_ThisMenuItem%
return

"Anything worth doing is worth doing slowly." - Mae West
Posted Image