--- In [email protected], "brucexs" <bswit...@...> wrote:
>
>
>
>
> > >
> > > Do you mean when you are renaming a file and the little edit window is
> > > open to rename?
> > >
> > No, no edit dialogs.
>
> No, I mean the little edit box that appears on XP. I don't know what happens
> on win7 or vista, but on xp, this little script,
switches back and forth between file name and extension
static lasthwnd
static toggle
local hwnd=win.getfocus
if (not hwnd)
quit
local text=win.gettext(hwnd)
local EM_SETSEL=0x00B1
local dot=revfind(text, ".")
//win.debug(win.hex(hwnd), text, dot) // uncomment for debug output
if (dot>=1) do
if (lasthwnd==hwnd) do
toggle = not toggle
if (toggle) do
win.sendmessage(hwnd, EM_SETSEL, dot+1, -1)
else
win.sendmessage(hwnd, EM_SETSEL, 0, dot)
endif
else
toggle=0
win.sendmessage(hwnd, EM_SETSEL, 0, dot)
endif
endif
lasthwnd=hwnd