Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Trying to use tscon.exe with variable password

If you have a question or need help, this is the place to be.
Post Reply
User avatar
caffeinatedcoder
Posts: 20
Joined: Wed Jul 06, 2016 4:56 pm

Trying to use tscon.exe with variable password

Post by caffeinatedcoder »

I'm trying to to the tscon.exe application to unlock my computer from my phone. It will work when I have my password hard-coded into the command line options:

Code: Select all

1 /dest:console /password:(my hard-coded password)
(Disable parsing of string is checked).

But it won't work when I try to use a variable in place of my hard-coded password like so:

Code: Select all

1 /dest:console /password:{eg.event.payload.arcomm}
(Disable parsing of string is checked).

Does anyone know if there is a way to make this command line statement work with a variable? I've also tried setting the {eg.event.payload.arcomm} variable to a global eg variable, flashed it using OSD action to confirm the password was there, then used the eg variable, but it still didn't work.
pro┬Àgram┬Àmer (n) An organism capable of converting caffeine into code.
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Trying to use tscon.exe with variable password

Post by jonib »

caffeinatedcoder wrote:(Disable parsing of string is checked).
Well, you can't disable parsing if you want parsing.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Trying to use tscon.exe with variable password

Post by kgschlosser »

ok we are going to make this nice and easy. if you create the action the way you want then right click it and in the context menu click on "copy as python"

then create a new action for a python command. and paste into that..

there you will see the specific python call that is made for the action. what you will need to do is to remove the {whatever the variable is} and after the single quote put a + and then the name of your variable..


then save that action. and delete the old action. and run the macro. this should fix the issue.

it should look similar to this when done...

Code: Select all

eg.plugins.System.Command(u'"c:\\whatever\\the\\path\\is\\ tscon.exe" /dest:console /password:' + SOME_VARIABLE_NAME, True, False, u'', True, False, False)
If you like the work I have been doing then feel free to Image
Post Reply