AskParam: Asks for command-line parameters via GUI dialog

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
olafo
Junior Member
Junior Member
Posts: 5
Joined: 2015-06-25, 10:57 UTC

Post by *olafo »

May be a reason to provide an official release of AskParam (including the new p(e) feature). :wink:
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I want to finish Readme first. :)
Currently Russian section is almost ready, so I need to write English section.
billiebub
Member
Member
Posts: 187
Joined: 2011-04-12, 19:49 UTC

Anti-virus detects it as a trojan

Post by *billiebub »

Hey MVV,

Thanks for all your tools. I use many of them :). The new release of AskParam is being detected as a trojan. You can check by googling the MD5 hash and following the link to virustotal.

MD5: 50bdb9d894b676dccc2492919f13f3c2
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6480
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Anti-virus detects it as a trojan

Post by *Horst.Epp »

billiebub wrote:Hey MVV,

Thanks for all your tools. I use many of them :). The new release of AskParam is being detected as a trojan. You can check by googling the MD5 hash and following the link to virustotal.

MD5: 50bdb9d894b676dccc2492919f13f3c2
There is nothing special with this detections.
The problem is not Askparam but the Virus scanners.
Btw. the x64 (1.0.6.146) version is detected with 0/56 !
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

billiebub,
As Horst.Epp said, problem is in bad AV signatures and heuristics.

BTW latest beta 146 has only 2/56 (paranoid Avast heuristic and some unknown AV):
https://www.virustotal.com/ru/file/d010db95cc181816187f10ba566af5da030c0a59e718a201a05aaa583cca7f01/analysis/1443458684/
And my current beta 148 has only 1/56 (paranoid Avast heuristic):
https://www.virustotal.com/ru/file/dbfedb30f9d68a0709763bc4411ea187835b3eb089bbbc073987eac04f115267/analysis/1443458842/
billiebub
Member
Member
Posts: 187
Joined: 2011-04-12, 19:49 UTC

AskParam in TC's Internal Associations

Post by *billiebub »

Not sure if this has been asked but I have a situation where I would like to use AskParam in TC's Internal associations. What do you do in the case where AskParam uses %1 and TC passes %1 also to the command?

For example, I would like to right click on a file and encrypt it using a third party tool. I would use AskParam to ask for the password and then pass that over to the tool. TC will automatically pass %1 for the file chosen and AskParam would treat the password variable as %1 too.

The way I'm hacking it right now is to fool AskParam into accepting %2 instead of %1 by adding a dummy first parameter but obviously I get presented with two input prompts.

What I was thinking is if it's possible to also have the ability to pass the %var% name to the command instead of %1.
billiebub
Member
Member
Posts: 187
Joined: 2011-04-12, 19:49 UTC

Post by *billiebub »

anyone? MVV did you retire or something?
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Oops, sorry, I've missed your post.

Well, TC doesn't pass %1 to AskParam but filename instead. And it seems that it doesn't pass %1 character when you type %%1 as it does for regular commands (sad!). However you can use named variables using latest beta:

Code: Select all

AskParam.exe /p(e)"mypass: Enter password:" program.exe "%1" %%mypass%%
Last edited by MVV on 2015-11-24, 07:08 UTC, edited 1 time in total.
billiebub
Member
Member
Posts: 187
Joined: 2011-04-12, 19:49 UTC

Post by *billiebub »

Thank you MVV. Worked just fine. Great addon to TC.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Glad to help! :)

BTW there is a similar way w/o named variable (works in older versions too):

Code: Select all

AskParam.exe /p"Enter password:" program.exe "%1" %%AskParam1%%
billiebub
Member
Member
Posts: 187
Joined: 2011-04-12, 19:49 UTC

Post by *billiebub »

Thanks for the tip. I use AskParam extensively with many command line tools that expect input. Great work and thank you for your other fabulous tools as well.
olafo
Junior Member
Junior Member
Posts: 5
Joined: 2015-06-25, 10:57 UTC

Post by *olafo »

I recently noticed that MVV released a new version of AskParam.
Thank you. 8)
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

There have been no new functions added (only some small fixes) so I haven't announced it, but thank you for observation. :)
User avatar
dindog
Senior Member
Senior Member
Posts: 315
Joined: 2010-10-18, 07:41 UTC

Re: AskParam: Asks for command-line parameters via GUI dialog

Post by *dindog »

I've found a bug.
Here is the step to reproduce:
1. create these DIRS, E:\test\2019 and E:\test\abc
2. create a button in TC, like: /q"`" /rd /c"param" /u"A: `%P`" /p(h)"Profile:" cmd /c echo %%1%N && pause
3. put cursor on 2019 and abc, click the button created in step 2.

Result: E:\test\2019 --> 19
E:\test\abc --->"E:\test\"abc

It seem the %%1+%N(pure number) will lead to something weird... and I find a hack for the moment.
/q"`" /rd /c"param" /u"A: `%P" /p(h)"Profile:" cmd /c echo %%1"%N && pause

I create a 7z.exe command line button asking in where put the archive, %P%N.7z or %T%N.7z... and the space in dirs & file name drive me crazy.... at last I make this `%P`%N.7z weirdo... I work fine until I met a dir name 20191116 :(
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: AskParam: Asks for command-line parameters via GUI dialog

Post by *MVV »

Well, it is really a problem of all such systems - how to detect end of a token if two tokens are concatenated.
In this case it is not easy to detect how many digits are in parameter number if there are digits just after parameter number, this is not a bug but an ambiguity. Program can't know what do you want to insert - %1 and 2019, %12 and 019 etc (imagine a case when there are enough parameters passed).

For such cases there is a 3-digit limitation in AskParam for parameter number (i.e. you can't ask for more than 999 parameters :)).
So you can try %%001%N in your button parameters, and this will always mean that you want to insert %001 and then any following digits:

Code: Select all

Parameters: /q"`" /rd /c"param" /u"A: `%P`" /p(h)"Profile:" cmd /c echo %%001%N && pause
Also you can insert parameter via %AskParam1%, so there will be no ambiguity:

Code: Select all

Parameters: /q"`" /rd /c"param" /u"A: `%P`" /p(h)"Profile:" cmd /c echo %%AskParam1%%%N && pause
Post Reply