Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Call History popup-window?

Aug
376
9
I did some rethinking on removing a directory from %PATH% (mentioned elsewhere on these forums)
and thought it would also be nice to be able to change the order of directories in %PATH%.

First idea was to (mis)use the history popup-window, as it has the possibility to change the order of items (Ctrl-Up/Down)

That should go something like this: create a local (dir)histry, remove all items, add the directories from %PATH%, open history popup-window.
Now you can delete entries (Del or Ctrl-D) and change the order.
After that: read the history and re-create the path out of it.

In (very raw) code:
Code:
@setlocal
@echo off
rem OPTION //ConsolePopupWindows=YES
history /L
@history /L /F

do this in /t";" /L %PATH (@history /a %this)
keystack PgUp
do this in /p history (@set TEST=%TEST;%this)

set TEST=%@RTRIM[;,%@LTRIM[;,%TEST]]
echo PATH=%TEST

"Problem" is the calling of the popup-window. Here it's done with keystack PgUp, but the script continues without waiting for this window to open.

Does anyone have an idea how to work around that?
 
Back
Top
[FOX] Ultimate Translator
Translate