I have a macro that was getting the path of the active folder from the address bar but that code does not work with v6 probably because of the crumbs bar.
this is the code I was using:
# get name of active folder from address bar
findwnd address
findclass combobox
gettext $2
pop $2
chopstr \-1
addstr $1
store $2
is there another way to get the path of the active/current folder?
get path of active pane/tab with macro
Moderators: fgagnon, nikos, Site Mods
-
FrizzleFry
- Platinum Member

- Posts: 1255
- Joined: 2005 Oct 16, 19:09
-
nikos
- Site Admin

- Posts: 16344
- Joined: 2002 Feb 07, 15:57
- Location: UK
Re: get path of active pane/tab with macro
the easiest way would be to restore the old addressbar from advanced options
looks like the crumbsbar will go the same way as the ribbon!
looks like the crumbsbar will go the same way as the ribbon!
-
Gandolf
- Gold Member

- Posts: 575
- Joined: 2004 Jun 12, 10:47
-
FrizzleFry
- Platinum Member

- Posts: 1255
- Joined: 2005 Oct 16, 19:09
Re: get path of active pane/tab with macro
Disabling the crumbs bar and enabling the address bar does allow my macro to run successfully.
-
Gandolf
- Gold Member

- Posts: 575
- Joined: 2004 Jun 12, 10:47
Re: get path of active pane/tab with macro
Instead of "findwnd address" have you tried "COMMAND 32859 # Switch to address bar". That appears to switch to the address bar AND switch it from crumbs to normal. The rest of your macro might work then.
-
Gandolf
- Gold Member

- Posts: 575
- Joined: 2004 Jun 12, 10:47
Re: get path of active pane/tab with macro
Another way I discovered (in V6) was:
findwnd address # selects the Filter box
NEXTWND # steps to the address bar
which selects the address bar, but it's still in crumb mode.
findwnd address # selects the Filter box
NEXTWND # steps to the address bar
which selects the address bar, but it's still in crumb mode.
-
nikos
- Site Admin

- Posts: 16344
- Joined: 2002 Feb 07, 15:57
- Location: UK
Re: get path of active pane/tab with macro
you are turning into macro hacker 
however the first version is more robust, because NEXTWND depends on the arrangement of the toolbars
however the first version is more robust, because NEXTWND depends on the arrangement of the toolbars
-
FrizzleFry
- Platinum Member

- Posts: 1255
- Joined: 2005 Oct 16, 19:09
Re: get path of active pane/tab with macro
Using command 32859 works with the crumbs bar enabled or disabled. Thanks.Gandolf wrote: 2024 Jun 03, 02:22 Instead of "findwnd address" have you tried "COMMAND 32859 # Switch to address bar". That appears to switch to the address bar AND switch it from crumbs to normal. The rest of your macro might work then.
Messing around with this macro reminded me how annoying is it to create and edit x2 macros. I usually end up copying and pasting to and from a text editor. The three line properties field available from organize is fine for one line macros and user commands but inadequate for complex macros (this macro is 50 lines long). Edit macro has more space but it is also annoying: you have to run the macro to make it active (I guess?), then you have to run the macro to save it.
-
Gandolf
- Gold Member

- Posts: 575
- Joined: 2004 Jun 12, 10:47
Re: get path of active pane/tab with macro
I'm glad it works. I haven't done much with x² macros and, what I have done, has given me no incentive to learn more about them.
When I discovered that "findwnd address" actually focuses on the Filter bar if crumbs are active, I thought, not worth the effort. The command "findwnd CrumbBar" appears to focus on the crumbs bar, much to my surprise!
When I discovered that "findwnd address" actually focuses on the Filter bar if crumbs are active, I thought, not worth the effort. The command "findwnd CrumbBar" appears to focus on the crumbs bar, much to my surprise!
-
nikos
- Site Admin

- Posts: 16344
- Joined: 2002 Feb 07, 15:57
- Location: UK
Re: get path of active pane/tab with macro
a simple hack is to click DEBUG instead of running the macro, then you can cancel after the first command, AND save itFrizzleFry wrote: 2024 Jun 03, 20:39Edit macro has more space but it is also annoying: you have to run the macro to make it active (I guess?), then you have to run the macro to save it.