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.

Will pay someone to fix this script error please

If you have a question or need help, this is the place to be.
Post Reply
mikehende
Experienced User
Posts: 113
Joined: Sun Feb 10, 2008 1:59 pm

Re: Will pay someone to fix this script error please

Post by mikehende »

Thanks, I don't need it all that refined, just at maybe 50% of what is it so should it it be something like 0.50 and -0.50?
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Will pay someone to fix this script error please

Post by kgschlosser »

The reason why it's not that way in the Action Config dialog is it would add to many choices to scroll. I have been working on a custom control for EG that would allow for what you want to do. I could make the modifications to EG and tell you what to do to place the modifications into your copy of EG. It would only be adding one file and replacing another. or you can do the whole copy and paste thing. it's up to you.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Will pay someone to fix this script error please

Post by kgschlosser »

I did also want to mention.. that the step increments in the volume are also dictated by the sound card drivers. so there is a chance that your drivers may not support anything lower then 1.00. I have never seen it be that high but there is a possibility that it may not and i thought i should mention it.
If you like the work I have been doing then feel free to Image
mikehende
Experienced User
Posts: 113
Joined: Sun Feb 10, 2008 1:59 pm

Re: Will pay someone to fix this script error please

Post by mikehende »

Ok got to get some work done so will be off the net for today, let me get back to you on this tomorrow please.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Will pay someone to fix this script error please

Post by kgschlosser »

sure no worries
If you like the work I have been doing then feel free to Image
mikehende
Experienced User
Posts: 113
Joined: Sun Feb 10, 2008 1:59 pm

Re: Will pay someone to fix this script error please

Post by mikehende »

kgschlosser wrote: Sat Jun 23, 2018 6:05 pm I have been working on a custom control for EG that would allow for what you want to do. I could make the modifications to EG and tell you what to do to place the modifications into your copy of EG.
Sorry for the late response, if it would not be too much trouble for you I can try.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Will pay someone to fix this script error please

Post by kgschlosser »

no worries m8. It should only take me a few minutes to add it to EG
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Will pay someone to fix this script error please

Post by kgschlosser »

ok you will need to be running the latest build of EG for this to work.

You can obtain the latest build by clicking on the "build | passing" button at the top of the forum. you will see a link to the setup file on that page.

There are 2 files that need to be replaced and one that needs to be added.

FloatSliderCtrl.py - add this file to c:\Program Files (x86)\EventGhost\eg\Classes
SoundMixer.py - replace the file c:\Program Files (x86)\EventGhost\eg\WinApi\SoundMixer.py
__init__.py - replace the file c:\Program Files (x86)\EventGhost\plugins\System\__init__.py


Remember the new control is a work in progress. I do know of one issue with it. and you are not able to set the control to +100.0 or -100.0 it stops at +99.0 and -99.0. That is the only bug I have found so far.

To use the control you can click and drag the thumb. or you can put the control into focus (dotted lines around it) by clicking in the white space around the slider bar. then you will be able to use the left and right arrows or the page up and page down. You can also use the mouse wheel as well.


This is a custom control right down to drawing the thing on the screen. I have been fiddling with this thing for over 2 years now. It has a lot of complicated math that can lend it's self to some odd issues. Nothing that will hurt anything, things like the control not being drawn correctly. If you encounter any issues with it other then the above problem please drop me a message in a PM and let me know what the problem is. a screen shot is always helpful as well as a copy of the error if there is one. and if you can provide directions as to how to reproduce the issue this makes it much easier to track down the problem.
Attachments
__init__.py
(71.96 KiB) Downloaded 36 times
FloatSliderCtrl.py
(57.86 KiB) Downloaded 33 times
SoundMixer.py
(16.93 KiB) Downloaded 34 times
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Will pay someone to fix this script error please

Post by kgschlosser »

OK I just fixed the issue with not being able to go to +100.0 and -100.0. I also smoothed out the control movement and fixed a problem when the mouse went past the slider bar while dragging and the slider would stop moving.

Due to how wxPython (the code library that handles the GUI) processes events it is possible for the mouse to move faster then the control does. that is what was causing the issue with the slider stopping if the mouse managed to move past the length of the bar.

I added more precision to the control for the changing of the sound. I had set it to 0.1% precision, I changed it to 0.05% precision. My sound card (Realtek) allows for a precision of 0.0125% but I thought that would be just a wee bit to much LOL.

The modified files are attached.
Attachments
FloatSliderCtrl.py
(58.58 KiB) Downloaded 40 times
__init__.py
(71.96 KiB) Downloaded 38 times
If you like the work I have been doing then feel free to Image
mikehende
Experienced User
Posts: 113
Joined: Sun Feb 10, 2008 1:59 pm

Re: Will pay someone to fix this script error please

Post by mikehende »

kgschlosser wrote: Mon Jun 25, 2018 6:42 pm ok you will need to be running the latest build of EG for this to work.

You can obtain the latest build by clicking on the "build | passing" button at the top of the forum. you will see a link to the setup file on that page.

There are 2 files that need to be replaced and one that needs to be added.

FloatSliderCtrl.py - add this file to c:\Program Files (x86)\EventGhost\eg\Classes
SoundMixer.py - replace the file c:\Program Files (x86)\EventGhost\eg\WinApi\SoundMixer.py
__init__.py - replace the file c:\Program Files (x86)\EventGhost\plugins\System\__init__.py
I think I've done the build part correctly if it's 12.44.49?

Also, not sure about the next step. With the new build I have an empty tree. I am guessing I need to import my old EG file into it but what about those 3 lines above please, do I need to first place those 3 lines inside of my old EG file, if yes, where exactly please?
EG-OTSAV.xml
(2.57 KiB) Downloaded 33 times
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Will pay someone to fix this script error please

Post by kgschlosser »

yes you downloaded the correct file.

You need to install it. it's just like a normal EG version except it has the most recent bugfixes and updates in it.

once installed download and copy those 3 files to their locations. You will use the SoundMixer.py from the first post. and the other 2 from the second. copy them into the location I specified (provided you didn't change the EG installation path when installing it)


Not in the file. You want to download the files attached to the forum posts. and put them into the folders that are noted for each file. if prompted to overwrite click on Yes

Once you have done that run EG. Create a new macro and add the Action System/Audio/Change Master Volume

This is the only action I have modified as of yet. Once we know this one does what you want then I will change the others.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Will pay someone to fix this script error please

Post by kgschlosser »

OK I have made this easier for you.

Copy the code below. then go into EG and right click on the computer at the top of the tree on the right. Click on paste.
This is going to create a new folder in your tree. Go to the item that says "Run Once" right click on it and in the menu click on Execute.

once done you will need to restart EG.

You may need to run EventGhost as administrator for this to work (right click on the EventGhost icon and in the menu click on "Run as Administrator"

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="WIP-2018.05.25-17.43.19">
    <Folder Name="Download New Control" XML_Guid="{D13D1474-05A5-4E0A-99EB-4B09C6FCAC24}" Expanded="True">
        <Macro Name="Download New Control" XML_Guid="{5E0737F8-B475-4F39-8FB2-51B212392B4A}" Expanded="True">
            <Action Name="Run Once" XML_Guid="{CF5DBD29-DDE0-4191-9587-190AC6996887}">
                EventGhost.PythonScript(u"import os\nimport requests\n\nSOUND_MIXER = 'http://www.eventghost.net/forum/download/file.php?id=6427' # soundmixer\nFLOAT_SLIDER = 'http://www.eventghost.net/forum/download/file.php?id=6431' # floatslider\nSYSTEM = 'http://www.eventghost.net/forum/download/file.php?id=6430' # System\n\n\nSOUND_MIXER_PATH = os.path.join(eg.mainDir, 'eg', 'Classes', 'FloatSliderCtrl.py')\nFLOAT_SLIDER_PATH = os.path.join(eg.mainDir, 'eg', 'WinApi', 'SoundMixer.py')\nSYSTEM_PATH = os.path.join(eg.mainDir, 'plugins', 'System', '__init__.py')\n\n\nprint 'Downloading FloatSliderCtrl.py'\nres = requests.get(FLOAT_SLIDER).content\nprint 'Writing ' + FLOAT_SLIDER_PATH\n\nwith open(FLOAT_SLIDER_PATH, 'w') as f:\n    f.write(res)\n    \n\nprint 'Downloading SoundMixer.py'\nres = requests.get(FLOAT_SLIDER).content\nprint 'Writing ' + SOUND_MIXER_PATH\n\nwith open(SOUND_MIXER_PATH, 'w') as f:\n    f.write(res)\n\n\nprint 'Downloading __init__.py'\nres = requests.get(SYSTEM).content\nprint 'Writing ' + SYSTEM_PATH\n\nwith open(SYSTEM_PATH, 'w') as f:\n    f.write(res)")
            </Action>
        </Macro>
    </Folder>
</EventGhost>
If you like the work I have been doing then feel free to Image
mikehende
Experienced User
Posts: 113
Joined: Sun Feb 10, 2008 1:59 pm

Re: Will pay someone to fix this script error please

Post by mikehende »

Not sure if I did this right as there are errors showing in red even before I added the original EG OTSAV file
new EG.egtree
(1.68 KiB) Downloaded 41 times
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Will pay someone to fix this script error please

Post by kgschlosser »

I will build you an installer with the modifications in place
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Will pay someone to fix this script error please

Post by kgschlosser »

OK you can download the installer from here

https://ci.appveyor.com/api/buildjobs/n ... _Setup.exe

Sorry that took a bit I was adding more functionality to it and correcting some other issues I came across. I hopefully have all of the issues sorted out with it.
If you like the work I have been doing then feel free to Image
Post Reply