send2vinnie / artisan

Automatically exported from code.google.com/p/artisan
GNU General Public License v3.0
1 stars 0 forks source link

slideraction does not work with calling external programs #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1.Artisan : Configure External Program in Config->Events->Sliders
2.I want to call a batch file with the slider value as parameter - the batch 
file is located in the artisan directory (seems not to work to call a batch 
file with the full path name)
3.Select the checkbox for Speed, select "Call Program" enter "fan.bat {}" as 
command

What is the expected output? What do you see instead?
The batch file should be called with the slidervalue as paramater.
What happens is that the batch programm is not called at all and no error 
message is visible.
The Message History displays "... event#1 recorded ..."
There is no entry in the error log.
When changing the command to "fan.bat" the batch file is called without 
parameter.

What version of the product are you using? On what operating system?
Artisan 0.9.2 on Windows 8.1

Please provide any additional information below.

The stored value in the registry under 
HKEY_CURRENT_USER\Software\YourQuest\Artisan\Sliders\slidercommands looks OK.

The line in the sourcecode where the slidervalue is used looks OK for me :
"cmd = cmd.format(value)"

I tried several versions of adding '' or "" around the command - this does not 
help either.

Also when entering a value as command like "fan.bat 60" the batch file is not 
called - so it looks like there is a problem with the blank in the command.

This would be a problem in the eventaction part :
prg_file = u(aw.getAppPath()) + u(cmd_str)
subprocess.Popen(prg_file, shell=True)

The same happens when using the call External Program function for event 
buttons when entering "fan.bat" it is called, when entering "fan.bat 10" it is 
not called

Original issue reported on code.google.com by quakosek...@gmail.com on 14 Feb 2015 at 12:36

GoogleCodeExporter commented 9 years ago
That issue also exists on OS X. Just did a commit of a patch that might solve 
this. Tested on OS X, but to be tested on Windows.

Original comment by luther.m...@gmail.com on 15 Feb 2015 at 9:11

GoogleCodeExporter commented 9 years ago
Thanks for the quick fix - can I help with testing on Windows ? 

Original comment by quakosek...@gmail.com on 17 Feb 2015 at 8:34

GoogleCodeExporter commented 9 years ago
I just downloaded the fix, compiled the main.py file into a pyo file and copied 
it to the zip file in the installation dir - now passing of parameters from 
sliders works as expected on Windows 8.1 - thanks again !

Original comment by quakosek...@gmail.com on 17 Feb 2015 at 11:03

GoogleCodeExporter commented 9 years ago
Excellent, that you could compile and test this your self! Thanks for your 
support. So I will role this patch into the next release and close this issue.

Original comment by luther.m...@gmail.com on 19 Feb 2015 at 10:15