File-Find with Dirs excluded
Moderators: Hacker, petermad, Stefan2, white
Re: File-Find with Dirs excluded
georgeb,
So it seems you are familiar with the process. What I proposed is basically exactly the same. You can run schtasks from the AHK script itself, or you can create a shortcut to schtasks and run the shortcut from AHK. Winaero Tweaker also does the same when it creates said elevated shortcuts.
Roman
So it seems you are familiar with the process. What I proposed is basically exactly the same. You can run schtasks from the AHK script itself, or you can create a shortcut to schtasks and run the shortcut from AHK. Winaero Tweaker also does the same when it creates said elevated shortcuts.
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: File-Find with Dirs excluded
What I don't really get is what's the advantage of performing those steps via AHK-script? I mean the task of starting an admin-instance of TC64 without UAC at boot-up is executed by the OS itself and later on for starting a 2nd instance thereof or for simply re-opening TC after it might have been closed down a direct-link-icon in the taskbar that would call the initial task via schtasks-command by a single click on that icon will do the job after all.Hacker wrote: 2022-08-05, 20:06 UTC You can run schtasks from the AHK script itself, or you can create a shortcut to schtasks and run the shortcut from AHK.
Re: File-Find with Dirs excluded
georgeb,
As I understood you want to disable the ignore list (i.e. set the IgnoreListFileEnabled value to 0) before running TC. My idea would be to replace the way you usually start TC with an AHK script which adjusts the .ini value and then starts TC. Of course, you can do that any way you want. You could even exit TC using a special button which would run:
to disable the Ignore list upon TC exit.
It's up to you whichever way is most convenient for you.
Roman
Well, it's not only about starting TC. It's about two steps - setting the value and starting TC.What I don't really get is what's the advantage of performing those steps via AHK-script?
As I understood you want to disable the ignore list (i.e. set the IgnoreListFileEnabled value to 0) before running TC. My idea would be to replace the way you usually start TC with an AHK script which adjusts the .ini value and then starts TC. Of course, you can do that any way you want. You could even exit TC using a special button which would run:
Code: Select all
cm_SwitchIgnoreList -1,cm_Exit
It's up to you whichever way is most convenient for you.
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: File-Find with Dirs excluded
Ok, experts of the forum and for AHK - I've managed to solve the problem, well sort of.
Thanks to that crucial AHK-syntax-line provided by "Hacker" (IniWrite, 0,...) I was able to create a simple AHK-script that does the job and has been tested successfully.
I have also created an "em_SetIgnoreList"-user-command in "usercmd.ini" (and added that Dir to the path-statement) which will execute said AHK-script successfully (tested directly and by execution via some temporary button).
When it comes to automatic execution of that user-command upon TC-start the "autorun"-plugin has been suggested. I have installed v2.1.1 of that plugin properly by the described "define-colors-by-type"-procedure and "autorun.cfg" is executed demonstrably.
Now comes the tricky part. Unfortunately the documentation for the proper syntax used for "autorun.cfg" - at least as far as I've been able to find one - seems abysmal.
I've tried to invoke that user-em_command in at least a dozen of variants, regrettably all of them in vain. I've tried with and without a SendCommand-prefix (as indicated by the sample-autorun.cfg), with and without encapsulating the em_command between quotes, with and without specifying the complete path to usercmd.ini. Nothing! Zip! Nada! Apart from half a dozen of similar error-messages from the plugin upon subsequent TC-startup.
So the main question is: is there ANY near-decent documentation for the proper syntax to be used in "autorun.cfg" to be found online any place or at the minimum some more elaborate examples, at least one properly calling an em_user-command? That endless trial-and-error-approach gets a bit arduous after some time.
How I did succeed at last was by abandoning em_user-commands altogether. However I rather could launch the AHK-script directly by preceding it with a ShellExec-statement as has vaguely been indicated by the sample-cfg-file for some different purpose.
So autorun.cfg-documentation-links would be highly appreciated.
Thanks to that crucial AHK-syntax-line provided by "Hacker" (IniWrite, 0,...) I was able to create a simple AHK-script that does the job and has been tested successfully.
I have also created an "em_SetIgnoreList"-user-command in "usercmd.ini" (and added that Dir to the path-statement) which will execute said AHK-script successfully (tested directly and by execution via some temporary button).
When it comes to automatic execution of that user-command upon TC-start the "autorun"-plugin has been suggested. I have installed v2.1.1 of that plugin properly by the described "define-colors-by-type"-procedure and "autorun.cfg" is executed demonstrably.
Now comes the tricky part. Unfortunately the documentation for the proper syntax used for "autorun.cfg" - at least as far as I've been able to find one - seems abysmal.
I've tried to invoke that user-em_command in at least a dozen of variants, regrettably all of them in vain. I've tried with and without a SendCommand-prefix (as indicated by the sample-autorun.cfg), with and without encapsulating the em_command between quotes, with and without specifying the complete path to usercmd.ini. Nothing! Zip! Nada! Apart from half a dozen of similar error-messages from the plugin upon subsequent TC-startup.
So the main question is: is there ANY near-decent documentation for the proper syntax to be used in "autorun.cfg" to be found online any place or at the minimum some more elaborate examples, at least one properly calling an em_user-command? That endless trial-and-error-approach gets a bit arduous after some time.
How I did succeed at last was by abandoning em_user-commands altogether. However I rather could launch the AHK-script directly by preceding it with a ShellExec-statement as has vaguely been indicated by the sample-cfg-file for some different purpose.
So autorun.cfg-documentation-links would be highly appreciated.
Re: File-Find with Dirs excluded
Ok, that is now understood! Many thanks again for that crucial hint with the (IniWrite, 0,...)-statement, it really made my day.Hacker wrote: 2022-08-06, 10:12 UTCAs I understood you want to disable the ignore list (i.e. set the IgnoreListFileEnabled value to 0) before running TC. My idea would be to replace the way you usually start TC with an AHK script which adjusts the .ini value and then starts TC. Of course, you can do that any way you want. You could even exit TC using a special button which would run:
As for now - as the above post shows - I've found a workaround by keeping directly starting my no-UAC-tasks and launching that crucial AHK-script-line on TC-startup via "autorun".
Re: File-Find with Dirs excluded
georgeb,
So, instead of launching a script which sets the .ini value and launches TC, you launch TC, which launches autorun.wdx, which runs an em_command, which disables the Ignore list. Do I understand correctly? If you want to go that way, why don't you instruct autorun.wdx to execute "cm_SwitchIgnoreList -1"?
Roman
So, instead of launching a script which sets the .ini value and launches TC, you launch TC, which launches autorun.wdx, which runs an em_command, which disables the Ignore list. Do I understand correctly? If you want to go that way, why don't you instruct autorun.wdx to execute "cm_SwitchIgnoreList -1"?
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: File-Find with Dirs excluded
That approach would only work if the state of the Ignore list was left on.Hacker wrote: 2022-08-06, 11:24 UTC georgeb,
So, instead of launching a script which sets the .ini value and launches TC, you launch TC, which launches autorun.wdx, which runs an em_command, which disables the Ignore list. Do I understand correctly? If you want to go that way, why don't you instruct autorun.wdx to execute "cm_SwitchIgnoreList -1"?
Roman
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
Re: File-Find with Dirs excluded
Horst.Epp,
Roman
-1 (or 2) disables the Ignore list regardless of its previous state.That approach would only work if the state of the Ignore list was left on.
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: File-Find with Dirs excluded
Not exactly - but quite. As I've described above I've been unable so far to launch a demonstrably working em_command via autorun.wdx for lack of the proper syntax to do so. Instead I disable the IgnoreList by directly executing your AHK-script-line via a ShellExec-command in the autorun.cfg.Hacker wrote: 2022-08-06, 11:24 UTCSo, instead of launching a script which sets the .ini value and launches TC, you launch TC, which launches autorun.wdx, which runs an em_command, which disables the Ignore list. Do I understand correctly? If you want to go that way, why don't you instruct autorun.wdx to execute "cm_SwitchIgnoreList -1"?
As for the proposal with "cm_SwitchIgnoreList -1":
1. How is the correct syntax to declare em_user-commands (or cm_internal-commands for that matter) correctly in "autorun.cfg"? Just calling by name? Or having them preceded by a "SendCommand"-statement? Only error-msgs so far.
2. My current understanding would be that only "IgnoreListFileEnabled=" knows values/parameters (like "0" in my case) but has no associated internal command for setting them - WHEREAS "cm_SwitchIgnoreList" would be a MERE TOGGLE which doesn't accept values like "-1". Now obviously I cannot use a mandatory mere toggle on TC-startup because if "IgnoreListFileEnabled=" would already be set to "0" (my default setting active for 90% of the time) then an execution of "cm_SwitchIgnoreList" upon next TC-startup WOULD TURN THE LIST ON instead of setting it to off as needed.
Re: File-Find with Dirs excluded
You are right, cm_SwitchIgnoreList -1 worksHacker wrote: 2022-08-06, 12:14 UTC Horst.Epp,-1 (or 2) disables the Ignore list regardless of its previous state.That approach would only work if the state of the Ignore list was left on.
Roman
but the help file needs an update.
From the help
IgnoreListFileEnabled=1 Determines whether the file referenced by IgnoreListFile= is enabled or not. Allows you to temporarily disable the function without removing the file's path. The internal command cm_SwitchIgnoreList toggles this option on and off.
Parameters for cm_SwitchIgnoreList are not explained and can only found by reading the History.
Thats an old problem we have, the casual user should not need to read the full history.txt
the help file has to be reference for anything.
Trying to make an em_command with cm_SwitchIgnoreList -1
doesn't work and gives the error "Function not implemented" if executed from the TC command line.
For this reason it doesn't work with the Autorun plugin.
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
Re: File-Find with Dirs excluded
Bummer! That really works!Hacker wrote: 2022-08-06, 12:14 UTC -1 (or 2) disables the Ignore list regardless of its previous state.
But now we have another problem. I've created a button in TC for toggling the IgnoreList on and off. That button uses - of course - "cm_SwitchIgnoreList".
But the input-field for any parameters (and values like -1 in this case) is greyed-out! So how am I supposed to use that "cm_SwitchIgnoreList"-internal-command in its full (undocumented) capability for a button if I cannot pass the appropriate value/parameter (like "-1" in this case) towards it??
Re: File-Find with Dirs excluded
You have to add the parameter after the cm_commandgeorgeb wrote: 2022-08-06, 13:05 UTCBummer! That really works!Hacker wrote: 2022-08-06, 12:14 UTC -1 (or 2) disables the Ignore list regardless of its previous state.
But now we have another problem. I've created a button in TC for toggling the IgnoreList on and off. That button uses - of course - "cm_SwitchIgnoreList".
But the input-field for any parameters (and values like -1 in this case) is greyed-out! So how am I supposed to use that "cm_SwitchIgnoreList"-internal-command in its full (undocumented) capability for a button if I cannot pass the appropriate value/parameter (like "-1" in this case) towards it??
The following button works:
Code: Select all
TOTALCMD#BAR#DATA
cm_SwitchIgnoreList -1
C:\Tools\Wincmd\Icons\List.ico
0
-1
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
Re: File-Find with Dirs excluded
But the "autorun.cfg"-entry
SendCommand cm_SwitchIgnoreList -1
does the trick, amazingly enough!
Re: File-Find with Dirs excluded
Not for me, the ignore list stays on.
What is the full content of your autorun.cfg ?
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
Re: File-Find with Dirs excluded
Here you go:
Code: Select all
# Enables ModifyDialogs functionality
# Âêëþ÷àåò ôóíêöèîíàë ModifyDialogs
# LoadLibrary Plugins\Autorun_ModifyDialogs.dll
# ModifyDialogs
# Uncomment to enable additional system info
# Ðàñêîììåíòèðóéòå äëÿ äîïîëíèòåëüíîé ñèñòåìíîé èíôîðìàöèè
# LoadLibrary Plugins\Autorun_Sysinfo.dll
# Adding current TC path to PATH environment variable
# Äîáàâëÿåò ê ïåðåìåííîé îêðóæåíèÿ PATH òåêóùóþ ïàïêó TC
SetEnv /A /EV PATH ;%COMMANDER_PATH%
# Enables showing of administrative shares
# Âêëþ÷àåò îòîáðàæåíèå àäìèíèñòðàòèâíûõ øàð
SendCommand cm_AdministerServer
# ***********************************************************************************
# SendCommand em_SetIgnoreList **fails
# SendCommand "c:\WINTOOL\TotalCmd\SetIgnoreList.ahk" **fails
# ShellExec "c:\WINTOOL\TotalCmd\SetIgnoreList.ahk" **working
SendCommand cm_SwitchIgnoreList -1
# ***********************************************************************************
# The block below sets COMMANDER_PROGRAM environment variable
# to corresponding TC executable path depending on it's architecture
# Áëîê íèæå óñòàíàâëèâàåò â ïåðåìåííóþ îêðóæåíèÿ COMMANDER_PROGRAM
# ïóòü ê èñïîëíÿåìîìó ôàéëó TC â çàâèñèìîñòè îò åãî àðõèòåêòóðû
If %AUTORUN_TCARCH% = 32 Then
SetEnv /EV COMMANDER_PROGRAM %COMMANDER_PATH%\TOTALCMD.EXE
Else
SetEnv /EV COMMANDER_PROGRAM %COMMANDER_PATH%\TOTALCMD64.EXE
EndIf
# Retrieve OS version with commandline tool. This can be relatively slow.
# Ïîëó÷åíèå âåðñèè ÎÑ ñ ïîìîùüþ êîìàíäíîé ñòðîêè Windows. Ýòî ìîæåò áûòü îòíîñèòåëüíî ìåäëåííî.
#
# LoadLibrary Plugins\Autorun_Process.dll
# ProcessExecGetOutput OSVER %COMSPEC% '/c ver'
# SetEnv /EV COMMANDER_OSVER "%OSVER%"
# After this line all actions are performed when TC closing
# Ïîñëå ýòîé ñòðîêè âñå äåéñòâèÿ âûïîëíÿþòñÿ ïðè çàêðûòèè TC
Pragma AutorunFinalizeSection