Data entry pop up in custom command

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
hbguru
Junior Member
Junior Member
Posts: 2
Joined: 2014-06-30, 08:35 UTC

Data entry pop up in custom command

Post by *hbguru »

Hi Everybody,

I use a lot of custom shortcuts in TC and recently I bumped into an issue:
I try to run a script from the toolbar which as parameter would get an ID (most probably the one number that's on my clipboard) typed in.
Apparently I don't find where could I do a data read window for these scripts.
Each ID is unique and only getting accessed once never again, also hundreds of those IDs are getting generated each week and I only need 3-5 and that's it, so hardcoding the IDs is not an option.

Current setup:
command -> C:\Python27\Phyton.exe session.py
parameter would be -> $readsessionnumberorreadclipboardbuticantmakeitwork

If you have any recommendations I could try please let me know.

Thanks a lot!
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think python should support reading data from clipboard so you could do it from it.
Or you can set parameter field to ? if you just want to get input dialog to paste ID manually.
Also you can try my AskParam tool.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7024
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

I would try NirSoft tool nircmd.
For example:

c:\tools\NirSoft\nircmd.exe exec show C:\Python27\Phyton.exe session.py ~$clipboard$
hbguru
Junior Member
Junior Member
Posts: 2
Joined: 2014-06-30, 08:35 UTC

Post by *hbguru »

Thanks for both answers. Personally I find them cool.
Unfortunately I need to run these scripts in a very controlled environment (on my workplace) thus an *.exe is not an option.
A built in command or a plugin is something I hope to locate.

Anyway thanks for the kind answers!!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50923
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Author of Total Commander
https://www.ghisler.com
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1052
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

Simple batch?

Save as askparam.cmd

Code: Select all

@echo off
set /p param1="Please enter Parameter1: "
echo Running Session.py with %param1%
pause
C:\Python27\Phyton.exe session.py %param1%
or askparam.vbs

Code: Select all

Dim Input
Input = InputBox("Enter parameter") 
MsgBox ("You entered: " & Input)
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "C:\Python27\Phyton.exe session.py " & Input
User avatar
klsgfx
Junior Member
Junior Member
Posts: 74
Joined: 2003-11-21, 14:40 UTC
Location: Berlin

Post by *klsgfx »

hbguru wrote:thus an *.exe is not an option.
A built in command or a plugin is something I hope to locate.
I think you overread MVVs post a bit too quick:
MVV wrote:Or you can set parameter field to ? if you just want to get input dialog to paste ID manually.
Each button has a parameter field. Set this to "?".
If you already have the ID on the clipboard, this would allow you to do Ctrl-V and the ID is there, then hit Enter.

Better then nothing with only TCs own functions.
Oh my god, how I love this piece of software!
Post Reply