AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Favmenu 2.0 final
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Sat Oct 10, 2009 11:37 am    Post subject: Reply with quote

Yes.

However, some features might not work in Win7 (OPen save dialog needs plugin). Everything works now only on pre vista systems buts its generally easy to fix.
_________________
Back to top
View user's profile Send private message
tcvol
Guest





PostPosted: Sun Nov 15, 2009 10:31 am    Post subject: Reply with quote

majkinetor wrote:
Yes.

However, some features might not work in Win7 (OPen save dialog needs plugin). Everything works now only on pre vista systems buts its generally easy to fix.


can you elaborate?

i was able to fix my above mentioned problem with tc 7.5.

however i cannot use it with windows 7 and tc 7.5 and normal open/save dialogues or browse folder pop ups.

can you give some hints .. what has to be done?

thx
Back to top
Moebius



Joined: 08 Mar 2009
Posts: 28

PostPosted: Tue Nov 17, 2009 9:00 pm    Post subject: Reply with quote

thanks for this script!

And i have one proposal:
FavMenu should automatically pop up on every load and save dialog.
(i've realised this feature here with a second script and postmessage, but maybe you like the idea and can provide a clean solution...)
_________________
http://monschein.org
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Tue Nov 17, 2009 10:19 pm    Post subject: Reply with quote

2tcvol

all dialogs are handle in dialogs.ahk. Its easy to follow it and you can add any dialog that it doesn't have by default.
Each dialog has 3 functions: Is, GetPath (optional) & SetPath.
When you implement 3 funcs for the dialog (or window), you register dialog in DialogGetActive, DialogGetPath, DialogSetPath.

If I ever return to developing this script again, this will be pluginable. Favmenu is done long time ago and many advanced features later added to AHK couldn't be used at that time (like dynamic function calls) (plus I was a n00b).

2Reflex
Sounds like good option. In my private version I used different thing - I added 4th button in tittle bar.
_________________
Back to top
View user's profile Send private message
Moebius



Joined: 08 Mar 2009
Posts: 28

PostPosted: Wed Nov 18, 2009 9:03 pm    Post subject: Reply with quote

majkinetor wrote:

Sounds like good option. In my private version I used different thing - I added 4th button in tittle bar.

nice, but a button needs to be clicked - yes, i know i'm lazy Smile
btw i placed it on the left side of the dialog, but i could not find out the width of the generated menu Sad
_________________
http://monschein.org
Back to top
View user's profile Send private message
Guest






PostPosted: Sat Nov 21, 2009 11:13 am    Post subject: Reply with quote

ok i went through the code ..
i still don't get it .. right ..

FavMenu_IsOpenSave(dlg)
{
global FavMenu_dlgInput, FavMenu_dlgType

FavMenu_dlgType =

toolbar := FavMenu_FindWindowExID(dlg, "ToolbarWindow32", 0x001) ;windows 7

combo := FavMenu_FindWindowExID(dlg, "ComboBox", 0) ; comboboxex field
button := FavMenu_FindWindowExID(dlg, "Button", 0x001) ; second button

edit := FavMenu_FindWindowExID(dlg, "Edit", 0x001) ; edit field

if (toolbar && edit && button)
{
FavMenu_dlgInput := edit
FavMenu_dlgType := "OpenSave"
return 1
}

return FavMenu_IsOffice03(dlg)

}
Back to top
tcvol
Guest





PostPosted: Sat Nov 21, 2009 11:35 am    Post subject: Reply with quote

i tried also this:

FavMenu_IsOpenSave(dlg)
{
global FavMenu_dlgInput, FavMenu_dlgType

FavMenu_dlgType =

toolbar := FavMenu_FindWindowExID(dlg, "ToolbarWindow32", 0x001) ;windows 7

combo := FavMenu_FindWindowExID(dlg, "ComboBox", 0) ; comboboxex field
button := FavMenu_FindWindowExID(dlg, "Button", 0x001) ; second button

edit := FavMenu_FindWindowExID(dlg, "Edit", 0x001) ; edit field
rebar := FavMenu_FindWindowExID(rebar, "ReBarWindow32", 40965) ; navigation bar



if (rebar && combo && button)
{
FavMenu_dlgInput := combo
FavMenu_dlgType := "OpenSave"
return 1
}

return FavMenu_IsOffice03(dlg)

}
Back to top
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Sun Nov 22, 2009 8:26 pm    Post subject: Reply with quote

I am sorry , I can't help you more then I did.

In your case if you have valid handle to dialog, running just this function (copy it to single ahk file) should return true (if you did it right).

If it returns false, you didn't do well. You will need WinSpector to snoop window content...

You can even use something trivial like check if active window contains "Open" text and return true if it does....
_________________
Back to top
View user's profile Send private message
tcvol
Guest





PostPosted: Wed Nov 25, 2009 10:05 pm    Post subject: Reply with quote

ok small success.
with the following open (e.g. notepad file open) seems to work.

FavMenu_IsOpenSave(dlg)
{
global FavMenu_dlgInput, FavMenu_dlgType

FavMenu_dlgType =

toolbar := FavMenu_FindWindowExID(dlg, "ToolbarWindow32", 0x440) ;windows XP
if (toolbar = "0")
toolbar := FavMenu_FindWindowExID(dlg, "ToolbarWindow32", 0x001) ;windows 2k
if (toolbar = "0")
toolbar := FavMenu_FindWindowExID(dlg, "ToolbarWindow32", 1184) ;windows 7

combo := FavMenu_FindWindowExID(dlg, "ComboBoxEx32", 0x47C) ; comboboxex field
button := FavMenu_FindWindowExID(dlg, "Button", 0x001) ; second button

edit := FavMenu_FindWindowExID(dlg, "Edit", 0x480) ; edit field

if (button)
{
FavMenu_dlgInput := combo + edit
FavMenu_dlgType := "OpenSave"
return 1
}

return FavMenu_IsOffice03(dlg)
}
Back to top
tcvol
Guest





PostPosted: Sun Nov 29, 2009 3:11 pm    Post subject: Reply with quote

ok i did a little research on the subjetct (favmenu + windows 7).

the newest info i could get was the following:
"Address Band Root" and "msctls_progress32" before "ComboBoxEx32"

ok here is what i came up with:
Code:

  rebar := FavMenu_FindWindowExID(dlg, "WorkerW", 0)
  rebar := FavMenu_FindWindowExID(rebar, "ReBarWindow32", 0)
  rebar := FavMenu_FindWindowExID(rebar, "Address Band Root", 0)
  rebar := FavMenu_FindWindowExID(rebar, "msctls_progress32", 0)
  rebar := FavMenu_FindWindowExID(rebar, "ComboBoxEx32", 0)
  rebar := FavMenu_FindWindowExID(rebar, "ComboBox", 0)
  rebar := FavMenu_FindWindowExID(rebar, "Edit", 0x480)

the handles are returned until msctls_progress32.
ComboBoxEx32 returns 0.

anyone with ideas .. let me know Wink
Back to top
rs
Guest





PostPosted: Sun Jan 03, 2010 8:56 pm    Post subject: windows 7 Reply with quote

The following code inserted in the original file dialogs.ahk seems to solve the problem:

Code:

   if (toolbar = "0")
    toolbar := FavMenu_FindWindowExID(dlg, "ToolbarWindow32",  0) ;windows 7

Back to top
tcvol
Guest





PostPosted: Wed Jan 06, 2010 1:41 pm    Post subject: Re: windows 7 Reply with quote

rs wrote:
The following code inserted in the original file dialogs.ahk seems to solve the problem:

Code:

   if (toolbar = "0")
    toolbar := FavMenu_FindWindowExID(dlg, "ToolbarWindow32",  0) ;windows 7



already tried that ..

win 7 32 bit, german:
when trying on a "save link to" with firefox or notepad "save to" calling an entry changes the focus to tc and tc opens that directory.

so i can confirm it does not work on my end.
Back to top
rs
Guest





PostPosted: Wed Jan 06, 2010 9:02 pm    Post subject: Reply with quote

With the following code ist works in OpenSave-Dialogs for Windows7-dialogs and XP-dialogs.

Code:

FavMenu_IsOpenSave(dlg)
{
   global FavMenu_dlgInput, FavMenu_dlgType, FavMenu_msctls_progress32, bread
   
  FavMenu_dlgType =

   toolbar := FavMenu_FindWindowExID(dlg, "ToolbarWindow32", 0x440)   ;windows XP
   if (toolbar = "0")
    toolbar := FavMenu_FindWindowExID(dlg, "ToolbarWindow32", 0x001)  ;windows 2k

; Windows 7 OpenSave
  rebar := FavMenu_FindWindowExID(dlg, "WorkerW", 0)
  rebar := FavMenu_FindWindowExID(rebar, "ReBarWindow32", 0)
  rebar := FavMenu_FindWindowExID(rebar, "Address Band Root", 0)
  rebar := FavMenu_FindWindowExID(rebar, "msctls_progress32", 0)
  FavMenu_msctls_progress32 := rebar
  rebar := FavMenu_FindWindowExID(rebar, "Breadcrumb Parent", 0)
  bread := rebar
  rebar := FavMenu_FindWindowExID(rebar, "ToolbarWindow32", 0)
 
   combo  := FavMenu_FindWindowExID(dlg, "ComboBoxEx32", 0x47C) ; comboboxex field
   button := FavMenu_FindWindowExID(dlg, "Button", 0x001)      ; second button

   edit := FavMenu_FindWindowExID(dlg, "Edit", 0x480)         ; edit field
   
   if ((rebar || (toolbar && (combo || edit))) && button)
   {
      FavMenu_dlgInput   := combo + edit
      if rebar
        FavMenu_dlgInput   := rebar
      FavMenu_dlgType      := "OpenSave"
      return 1
   }

   return FavMenu_IsOffice03(dlg)
}


Code:

FavMenu_DialogSetPath_OS(path)
{
   local d_text, d_f

   WinWaitActive ahk_id %FavMenu_dlgHWND%
   ControlGetFocus d_f, ahk_id %FavMenu_dlgHWND%
   ControlFocus, , ahk_id %FavMenu_dlgInput%

   Sleep 20
  if FavMenu_msctls_progress32
    {
           ControlSend, ,{Space}, ahk_id %FavMenu_dlgInput%
       Sleep 20
      rebar := FavMenu_FindWindowExID(FavMenu_msctls_progress32, "ComboBoxEx32", 0)
      rebar := FavMenu_FindWindowExID(rebar, "ComboBox", 0)
      rebar := FavMenu_FindWindowExID(rebar, "Edit", 0)
      if rebar
        {
          Sleep 20
          ControlSetText, , %path%, ahk_id %rebar%
           ControlSend, ,{ENTER}, ahk_id %rebar%
        }
    }
  else
    {
       ControlGetText d_text, ,ahk_id %FavMenu_dlgInput%
      ControlSetText, , %path%, ahk_id %FavMenu_dlgInput%
       ControlSend, ,{ENTER}, ahk_id %FavMenu_dlgInput%
      }
      Sleep 20
     if (FavMenu_dlgType = "Office03")
        ControlFocus %d_f%, ahk_id %FavMenu_dlgHWND%
}


For the Explorer similar changes have to be done in subroutine FavMenu_GetExplorerInput()
Back to top
tcvol
Guest





PostPosted: Thu Jan 07, 2010 10:41 pm    Post subject: Reply with quote

rs wrote:
With the following code ist works in OpenSave-Dialogs for Windows7-dialogs and XP-dialogs.

Code:

FavMenu_IsOpenSave(dlg)
{
   global FavMenu_dlgInput, FavMenu_dlgType, FavMenu_msctls_progress32, bread
   
  FavMenu_dlgType =

   toolbar := FavMenu_FindWindowExID(dlg, "ToolbarWindow32", 0x440)   ;windows XP
   if (toolbar = "0")
    toolbar := FavMenu_FindWindowExID(dlg, "ToolbarWindow32", 0x001)  ;windows 2k

; Windows 7 OpenSave
  rebar := FavMenu_FindWindowExID(dlg, "WorkerW", 0)
  rebar := FavMenu_FindWindowExID(rebar, "ReBarWindow32", 0)
  rebar := FavMenu_FindWindowExID(rebar, "Address Band Root", 0)
  rebar := FavMenu_FindWindowExID(rebar, "msctls_progress32", 0)
  FavMenu_msctls_progress32 := rebar
  rebar := FavMenu_FindWindowExID(rebar, "Breadcrumb Parent", 0)
  bread := rebar
  rebar := FavMenu_FindWindowExID(rebar, "ToolbarWindow32", 0)
 
   combo  := FavMenu_FindWindowExID(dlg, "ComboBoxEx32", 0x47C) ; comboboxex field
   button := FavMenu_FindWindowExID(dlg, "Button", 0x001)      ; second button

   edit := FavMenu_FindWindowExID(dlg, "Edit", 0x480)         ; edit field
   
   if ((rebar || (toolbar && (combo || edit))) && button)
   {
      FavMenu_dlgInput   := combo + edit
      if rebar
        FavMenu_dlgInput   := rebar
      FavMenu_dlgType      := "OpenSave"
      return 1
   }

   return FavMenu_IsOffice03(dlg)
}


Code:

FavMenu_DialogSetPath_OS(path)
{
   local d_text, d_f

   WinWaitActive ahk_id %FavMenu_dlgHWND%
   ControlGetFocus d_f, ahk_id %FavMenu_dlgHWND%
   ControlFocus, , ahk_id %FavMenu_dlgInput%

   Sleep 20
  if FavMenu_msctls_progress32
    {
           ControlSend, ,{Space}, ahk_id %FavMenu_dlgInput%
       Sleep 20
      rebar := FavMenu_FindWindowExID(FavMenu_msctls_progress32, "ComboBoxEx32", 0)
      rebar := FavMenu_FindWindowExID(rebar, "ComboBox", 0)
      rebar := FavMenu_FindWindowExID(rebar, "Edit", 0)
      if rebar
        {
          Sleep 20
          ControlSetText, , %path%, ahk_id %rebar%
           ControlSend, ,{ENTER}, ahk_id %rebar%
        }
    }
  else
    {
       ControlGetText d_text, ,ahk_id %FavMenu_dlgInput%
      ControlSetText, , %path%, ahk_id %FavMenu_dlgInput%
       ControlSend, ,{ENTER}, ahk_id %FavMenu_dlgInput%
      }
      Sleep 20
     if (FavMenu_dlgType = "Office03")
        ControlFocus %d_f%, ahk_id %FavMenu_dlgHWND%
}


For the Explorer similar changes have to be done in subroutine FavMenu_GetExplorerInput()


kewl .. this really seems to work ..
i did a quick test with firefox and notepad.

thx for your help
Back to top
Stevie



Joined: 17 Aug 2006
Posts: 68

PostPosted: Sat Apr 17, 2010 1:20 pm    Post subject: Reply with quote

Any idea how to make it work in the Windows 7 Explorer? I mean the "cd" command. Everytime I execute it in Explorer I get a message box saying:

---------------------------
FavMenu.exe
---------------------------
To use FavMenu with Windows Explorer you must enable Address Bar.
Enable it in View->Toolbars.
---------------------------
OK
---------------------------

Needless to say, that the address bar is activated, I guess Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 8 of 10

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group