I am building a data entry form using a word document. The logic of why this is a good choice is not relevant. My problem was that I needed to add a set of combo boxes in table cells, each loaded with a list of option for the user to pick from.
There is the option to hand enter each list item... but as I had about 100 items and a dozen duplicate combo boxes... this would have been painful. The fact that I would need to update this list in the future just made it torture. So... is there a faster way?
After some googling without any success, I came up with a very quick and dirty method.
My over view is:
I have the list of items I want in the combo box in a text file in the same directory as the word document. (Note that each item must be Unique as the combo boxes do not like duplicates)
I have built the word document with the Content Control Combo boxes in the correct locations and saved it to the same directory as the text file.
I then added a new module to the word doc via the VBA Editor in Word and wrote this simple little macro.
Option Explicit
Sub PopulateCareProviderComboBoxes()
Dim itemFromFile As String
Dim cc As ContentControl
For Each cc In ActiveDocument.ContentControls
If cc.Type = wdContentControlComboBox Then 'checks if the control is a combo box
cc.DropdownListEntries.Clear 'get rid of any existing entries in the combo box
Open "CareProviderDumpList.txt" For Input As #1 'this is my text file with the items I want to add
Do While Not EOF(1)
Input #1, itemFromFile
cc.DropdownListEntries.Add itemFromFile 'put the item from the text file into the combo box
Loop
Close #1
End If
Next
End Sub
I only needed to check if the control is a combo box, as all the combo boxes on my form are the same. You may need to identify a specific combo box. You can do this by testing the Title property on the Content Control object.
E.g:
If cc.Title = "Customers" then ....
Once thats done, I simply ran the macro to load the list from the text file to each of the combo boxes. Then saved the word doc with the new items in place.
Job done.
Showing posts with label Software Tips. Show all posts
Showing posts with label Software Tips. Show all posts
Tuesday, November 6, 2012
Thursday, September 6, 2012
How to avoid malware (abit...)
I was asked how to get an offline copy of a video from a popular online video site.
The solutions that used to work no longer do as the sites are using multiple flash wrappers to try to obfuscate the video stream and prevent all the usual tricks from working.
I had a troll of some of the online services that used to do the trick using some fairly straighforward javascript. They used to be ad-supported. Now they have much fewer ad's and they all require Java for their functionality.... hello?
Could there be a correllation with the number of exploits recently found in Java? Could it be possible?
Anyway, since I did not have time to fiddle... the solution is to create a clean vritual machine using your favorite VM base OS. (Something XP or Ubuntu should do the trick) make sure you enable Undo disks. Create a shared folder for passing back and forth to the VM.
Then boot up the VM, pass your YouTube links to the VM via a shared folder in a text file.
Inside the VM, open a browser, go to your favorite video file scamming website and download the files to the shared folder. (Install Java if required)
Shut down the VM and do not commit the changes to the VM.
Tada. Ofline copy saved, Malware deleted, problem solved.
Now explain that to your grandma....
The solutions that used to work no longer do as the sites are using multiple flash wrappers to try to obfuscate the video stream and prevent all the usual tricks from working.
I had a troll of some of the online services that used to do the trick using some fairly straighforward javascript. They used to be ad-supported. Now they have much fewer ad's and they all require Java for their functionality.... hello?
Could there be a correllation with the number of exploits recently found in Java? Could it be possible?
Anyway, since I did not have time to fiddle... the solution is to create a clean vritual machine using your favorite VM base OS. (Something XP or Ubuntu should do the trick) make sure you enable Undo disks. Create a shared folder for passing back and forth to the VM.
Then boot up the VM, pass your YouTube links to the VM via a shared folder in a text file.
Inside the VM, open a browser, go to your favorite video file scamming website and download the files to the shared folder. (Install Java if required)
Shut down the VM and do not commit the changes to the VM.
Tada. Ofline copy saved, Malware deleted, problem solved.
Now explain that to your grandma....
Labels:
Security,
Software Tips
Monday, May 21, 2012
More Custom Build Rule Hacking
I have tried to live with the broken build rule but its making a mess of my builds. I just don't have time to waste nursing each build by hand... AHHHHHHHHHHHH!
So the only thing for it is to fix the freakin build rule.
The symptoms are:
1) The "Output Directory" property is not being correctly calculated by the build macro (?) and passed to the command line string which is passed to the HelpNDoc compiler. I can see this in the output.log.
The big problem is that within the property pages, the command line string seems to be being correctly calculated and looks good. WTF?
My hypothesis is that the evil lies within the .target file as this seems to manage how the information from the property pages is passed to the build system.
It looks like some of the categories are not being clearly defined, so I will add a couple of them to see what happens and see how the change-reload-test cycle works.
Unload and Re-load project do not seem to reload the changes?
Unloading and Re-Loading the Solution does not seem to reload the changes?
Time for some serious breaking.
I removed the .xml, .targets, .props files from the project directory just to try to force a failure. Thankfully I got an error.
E:\_dev\PointLightLab4\src\HelpPrj\HelpPrj.vcxproj : error : The imported project "E:\_dev\PointLightLab4\src\HelpPrj\HelpNDocRule.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. E:\_dev\PointLightLab4\src\HelpPrj\HelpPrj.vcxproj
So it looks like the .props file is the first to be loaded and parsed. Interesting. Lets add it back and try to reload the project.
Still failing with the same Error? WTF? Is it just a spurious error? Its from an statement in the .vcxproj file... so perhaps I should have a look.
Found it. The project seemed to be using the backup copy of the build rule I had in another directory. Weird that the path in the error was wrong. It should have been "E:\_dev\PointLightLab4\src\HelpPrj\BuildRule\HelpNDocRule.props" as that as the path in the .vcxproj file. Yet another MS bug?
Ok, we are passed that error. Now the missing .targets file is being correctly detected.
Loading E:\_dev\PointLightLab4\src\HelpPrj\HelpPrj.vcxproj ...
E:\_dev\PointLightLab4\src\HelpPrj\HelpPrj.vcxproj : error : The imported project "E:\_dev\PointLightLab4\src\HelpPrj\HelpNDocRule.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. E:\_dev\PointLightLab4\src\HelpPrj\HelpPrj.vcxproj
Replace the .targets file and the project "Reloads" without errors. I guess the .xml file only gets parsed when I try to open the Property Pages. So its not been missed yet. Lets test that theory.
Nope. The property pages work fine without the .xml file being present. I guess its completely useless? The properties are certainly being defined without it.
So I think my hacking needs to focus on the .props and .targets files.
There is a mess of properties for the HelpNDoc build rule defined in the vcxproj file as well I notice. Which makes sense.
Added a couple of lines to the .vcxproj file.
*.chm,*.pdf, *.html
*.chm,*.pdf, *.html
As the extensions where only defined for the debug builds for some reason.
Interestingly, when I make changes to the .vcxproj file and have the property pages open in VS, it detects that the file has changed and offers the option to reload it. Nice! Although the changes I made are not showing up... WTF?
I still cannot figure out where the definitions for the property pages are comming from. The .xml file is not being loaded at all, so it has to be at some point in the load chain. Time to backtrack.
It's not in the .sln file.
It's not in the .vcxproj.user file. (Although that needs some additions for new platform targets I have added)
It's not in old user files.
Somewhere its being cached. Bastard!
Ok, remove everything, unload the solution, close Visual Studio... reopen VS, reload the solution and... TAfuckingDA the custom build stuff has disapeared. Finally.
Now can I add the .xml file back in? Replace the .xml file in the project directory.
Unloading and Reloading the project does not pick up the settings again. Ok, cycle the whole solution... no joy. Cycle the whole VS.... and they are back. OK, so essentially, fucking with the .xml file requires a complete cycle of Visual Studio to see the changes.
Making Progress.
Now to get all the categories defined and named the way I like...
Ok, all the categories are correctly defined in the category section and I have removed the spaces from the names simply from habit. They now have nice display names too.
So the 's seem pretty straight forward. They are defined in the .xml file, and their "name" attribute is referenced in the .props file with what look like default values. These default values are then over-ridden by any values in the .vcxproj file (in th tag) and additionally over-ridden for each build target /platform (in a tag), again simply by referencing the property names defined in the .xml file.
First order of business is to explicity set the values in the in the .vcxproj file for all the build targets.
Try building again...
I'm getting an error about the .props file cannot be imported again. with a line and col reference in from the .vcxproj file. Ok, looks like I have accidentally imported the file again in the ImportGroups that I copied earlier... wonder why it was there in the first place? Anyway, fixed now.
Now looking at the logs in the intermediate directory... the command line is correct.
And in the output directory?...... WhoooT! We have output files correctly targeted!
Now, the /silent flag is not acting correctly. Tweak the .vcxproj file and we have success.
Now moving on to improving the custom build rule for HelpNDoc....
Found this reference for the MSBuild Syntax.
http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx
And an overview of using and createing build files
http://msdn.microsoft.com/en-us/library/dd393574.aspx
Would have been nice to know where these were a while back...
It's only after you have figured out the answers, that you really understand how to ask the question. Damit.
After some reading...here is the final resource.
As usual with forums, your milage will vary considerably....
http://social.msdn.microsoft.com/Forums/en-US/msbuild/threads
So the only thing for it is to fix the freakin build rule.
The symptoms are:
1) The "Output Directory" property is not being correctly calculated by the build macro (?) and passed to the command line string which is passed to the HelpNDoc compiler. I can see this in the output.log.
The big problem is that within the property pages, the command line string seems to be being correctly calculated and looks good. WTF?
My hypothesis is that the evil lies within the .target file as this seems to manage how the information from the property pages is passed to the build system.
Fiddling with the .XML file.
As a first step I am going to "experiment" with the .xml file just to see what happens.It looks like some of the categories are not being clearly defined, so I will add a couple of them to see what happens and see how the change-reload-test cycle works.
Unload and Re-load project do not seem to reload the changes?
Unloading and Re-Loading the Solution does not seem to reload the changes?
Time for some serious breaking.
I removed the .xml, .targets, .props files from the project directory just to try to force a failure. Thankfully I got an error.
E:\_dev\PointLightLab4\src\HelpPrj\HelpPrj.vcxproj : error : The imported project "E:\_dev\PointLightLab4\src\HelpPrj\HelpNDocRule.props" was not found. Confirm that the path in the
So it looks like the .props file is the first to be loaded and parsed. Interesting. Lets add it back and try to reload the project.
Still failing with the same Error? WTF? Is it just a spurious error? Its from an
Found it. The project seemed to be using the backup copy of the build rule I had in another directory. Weird that the path in the error was wrong. It should have been "E:\_dev\PointLightLab4\src\HelpPrj\BuildRule\HelpNDocRule.props" as that as the path in the .vcxproj file. Yet another MS bug?
Ok, we are passed that error. Now the missing .targets file is being correctly detected.
Loading E:\_dev\PointLightLab4\src\HelpPrj\HelpPrj.vcxproj ...
E:\_dev\PointLightLab4\src\HelpPrj\HelpPrj.vcxproj : error : The imported project "E:\_dev\PointLightLab4\src\HelpPrj\HelpNDocRule.targets" was not found. Confirm that the path in the
Replace the .targets file and the project "Reloads" without errors. I guess the .xml file only gets parsed when I try to open the Property Pages. So its not been missed yet. Lets test that theory.
Nope. The property pages work fine without the .xml file being present. I guess its completely useless? The properties are certainly being defined without it.
So I think my hacking needs to focus on the .props and .targets files.
There is a mess of properties for the HelpNDoc build rule defined in the vcxproj file as well I notice. Which makes sense.
Added a couple of lines to the .vcxproj file.
As the extensions where only defined for the debug builds for some reason.
Interestingly, when I make changes to the .vcxproj file and have the property pages open in VS, it detects that the file has changed and offers the option to reload it. Nice! Although the changes I made are not showing up... WTF?
I still cannot figure out where the definitions for the property pages are comming from. The .xml file is not being loaded at all, so it has to be at some point in the load chain. Time to backtrack.
It's not in the .sln file.
It's not in the .vcxproj.user file. (Although that needs some additions for new platform targets I have added)
It's not in old user files.
Somewhere its being cached. Bastard!
Ok, remove everything, unload the solution, close Visual Studio... reopen VS, reload the solution and... TAfuckingDA the custom build stuff has disapeared. Finally.
Now can I add the .xml file back in? Replace the .xml file in the project directory.
Unloading and Reloading the project does not pick up the settings again. Ok, cycle the whole solution... no joy. Cycle the whole VS.... and they are back. OK, so essentially, fucking with the .xml file requires a complete cycle of Visual Studio to see the changes.
Making Progress.
Now to get all the categories defined and named the way I like...
Ok, all the categories are correctly defined in the category section and I have removed the spaces from the names simply from habit. They now have nice display names too.
So the
First order of business is to explicity set the values in the
Try building again...
I'm getting an error about the .props file cannot be imported again. with a line and col reference in from the .vcxproj file. Ok, looks like I have accidentally imported the file again in the ImportGroups that I copied earlier... wonder why it was there in the first place? Anyway, fixed now.
Now looking at the logs in the intermediate directory... the command line is correct.
And in the output directory?...... WhoooT! We have output files correctly targeted!
Now, the /silent flag is not acting correctly. Tweak the .vcxproj file and we have success.
Now moving on to improving the custom build rule for HelpNDoc....
Found this reference for the MSBuild Syntax.
http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx
And an overview of using and createing build files
http://msdn.microsoft.com/en-us/library/dd393574.aspx
Would have been nice to know where these were a while back...
It's only after you have figured out the answers, that you really understand how to ask the question. Damit.
After some reading...here is the final resource.
As usual with forums, your milage will vary considerably....
http://social.msdn.microsoft.com/Forums/en-US/msbuild/threads
Labels:
MSBuild,
Software Tips,
Visual Studio
Thursday, May 17, 2012
Boostrapper error in Visual Studio setup project
Error 4 An error occurred generating a bootstrapper: Unable to finish updating resource for .... blah blah files in setup project.
WTF?
There is not much to go on with googling for an answer. Possible solutions abound but hard results are few.
1) Clean all and rebuild... done with no result.
2) Fiddle with the dependencies on the .NET version required and the launch conditions which also specified the .NET version.... tada! Fixed. For some reason .NET v2.0 is no longer in the search path ( seems to not be part of the Windows 7 SDK at the moment????
I have upgraded to .NET 4 and Windows Installer 4.5. I don't need those levels of the framework specificially but I know they are current and should be present on a well maintained machine. The presence of older versions of the .NET framework is getting a little more risky.
Job done.
WTF?
There is not much to go on with googling for an answer. Possible solutions abound but hard results are few.
1) Clean all and rebuild... done with no result.
2) Fiddle with the dependencies on the .NET version required and the launch conditions which also specified the .NET version.... tada! Fixed. For some reason .NET v2.0 is no longer in the search path ( seems to not be part of the Windows 7 SDK at the moment????
I have upgraded to .NET 4 and Windows Installer 4.5. I don't need those levels of the framework specificially but I know they are current and should be present on a well maintained machine. The presence of older versions of the .NET framework is getting a little more risky.
Job done.
Labels:
Software Tips
Wednesday, May 16, 2012
Custom Build Rules in Visual Studio 2010
Yet another upgrade quirk. The editor for Custom Build Rules in VS2008 has evaporated. This is due to the changes in MSBuild... I appreciate that...
I had a coupld of custom build rules in my project and have recently upgraded it all from VS2008 to VS2010 and expected it to "Just work".
This is not good. Thankfully the folk at CodeSynthesis had already sorted out the build rule for XSD http://wiki.codesynthesis.com/Using_XSD_with_Microsoft_Visual_Studio and supplied a custom build rule that sorted that out.
Now I just need my build rule for HelpNDoc3 and I am back in business.
My problem is that the Upgrade Wizard, while its obviously done a fair job has either revealed some bugs in my old rule ( and faithfully upgraded those bugs) or its just done a shit job... either way, there are some issues that need fixing and no one else I can push the work onto.
So the current process seems to be:
A) Go use the editor in VS2008 to generate the .rule file and then use the migration wizard to transform the rule into the .target, .props and .xml files for VS2010. Big round trip... lots of moving parts.... but a possibility.
B) Hand edit (hack blindly at..) the three files and try to figure out what you are up to by looking at the malnourished references and examples included with VS2010. Big round trip to test, lots of unknowns, ( there will be PAIN)
C) Hope like hell someone else has already done the work and documented it.
http://blogs.msdn.com/b/vcblog/archive/2010/04/21/quick-help-on-vs2010-custom-build-rule.aspx
Not much to go on but its something.
Hack'n time....
This file uses the XAML schema for WinFX. http://msdn.microsoft.com/en-us/library/ms752059.aspx. I dont think VS is using the info in the file as real xaml; its simply structured data that happens to be using the schema for parsing purposes.
If we follow the namespace breadcrumbs I find: http://msdn.microsoft.com/en-us/library/microsoft.build.framework.xamltypes.aspx which seems more meaningful as to the content than UI xaml which this file clearly does not contain. This gives me enough clues to take some guesses at the structure of the data in this file but no fucking idea about the logical effect of adding or removing elements from this file. Where does that info exist I wonder?
Here are some clues:
http://blogs.msdn.com/b/vsproject/archive/2009/06/10/platform-extensibility-part-1.aspx
http://blogs.msdn.com/b/vsproject/archive/2009/06/18/platform-extensibility-part-2.aspx
There are some clues on this at http://blogs.msdn.com/b/vsproject/archive/2009/06/23/inherited-properties-and-property-sheets.aspx.
and here
http://blogs.msdn.com/b/visualstudio/archive/2010/05/14/a-guide-to-vcxproj-and-props-file-structure.aspx
Looks like you can do some fairly tricky stunts in the property pages via inline function calls:
http://blogs.msdn.com/b/visualstudio/archive/2010/04/02/msbuild-property-functions.aspx
http://msdn.microsoft.com/en-us/library/dd633440.aspx
I have no use for these at the moment.
I had a coupld of custom build rules in my project and have recently upgraded it all from VS2008 to VS2010 and expected it to "Just work".
This is not good. Thankfully the folk at CodeSynthesis had already sorted out the build rule for XSD http://wiki.codesynthesis.com/Using_XSD_with_Microsoft_Visual_Studio and supplied a custom build rule that sorted that out.
Now I just need my build rule for HelpNDoc3 and I am back in business.
My problem is that the Upgrade Wizard, while its obviously done a fair job has either revealed some bugs in my old rule ( and faithfully upgraded those bugs) or its just done a shit job... either way, there are some issues that need fixing and no one else I can push the work onto.
So the current process seems to be:
A) Go use the editor in VS2008 to generate the .rule file and then use the migration wizard to transform the rule into the .target, .props and .xml files for VS2010. Big round trip... lots of moving parts.... but a possibility.
B) Hand edit (hack blindly at..) the three files and try to figure out what you are up to by looking at the malnourished references and examples included with VS2010. Big round trip to test, lots of unknowns, ( there will be PAIN)
C) Hope like hell someone else has already done the work and documented it.
http://blogs.msdn.com/b/vcblog/archive/2010/04/21/quick-help-on-vs2010-custom-build-rule.aspx
Not much to go on but its something.
Hack'n time....
The .XML file
This file defines the property editor interface for use in the solution explorer. After spreading it out in my favorite xml editor and doing some reading, it seems fairly straight forward.This file uses the XAML schema for WinFX. http://msdn.microsoft.com/en-us/library/ms752059.aspx. I dont think VS is using the info in the file as real xaml; its simply structured data that happens to be using the schema for parsing purposes.
If we follow the namespace breadcrumbs I find: http://msdn.microsoft.com/en-us/library/microsoft.build.framework.xamltypes.aspx which seems more meaningful as to the content than UI xaml which this file clearly does not contain. This gives me enough clues to take some guesses at the structure of the data in this file but no fucking idea about the logical effect of adding or removing elements from this file. Where does that info exist I wonder?
Here are some clues:
http://blogs.msdn.com/b/vsproject/archive/2009/06/10/platform-extensibility-part-1.aspx
http://blogs.msdn.com/b/vsproject/archive/2009/06/18/platform-extensibility-part-2.aspx
The .props file
This file seems to contain default values for some of the properties defined in the .xml file above. (Why have them in a seperate file?)There are some clues on this at http://blogs.msdn.com/b/vsproject/archive/2009/06/23/inherited-properties-and-property-sheets.aspx.
and here
http://blogs.msdn.com/b/visualstudio/archive/2010/05/14/a-guide-to-vcxproj-and-props-file-structure.aspx
The .targets file
This file contains a whole lot of shit. Mostly it defines the output for the build file. Logically this defines how the property values from the editor are mapped into the actual build script. Looks hideous and nasty and will be damn hard to debug simply due to the length of the round trip and difficulty of getting useful/meaningful error messages from the build system.The .VCXPROJ file
This file contains (along with everything else) the actual values for the properties as applied to the file item. These are the values at the bottom of the property inheritance chain. (See the link above under the .props file heading for more info on property sheet evaluation orders)Looks like you can do some fairly tricky stunts in the property pages via inline function calls:
http://blogs.msdn.com/b/visualstudio/archive/2010/04/02/msbuild-property-functions.aspx
http://msdn.microsoft.com/en-us/library/dd633440.aspx
I have no use for these at the moment.
Labels:
Software Tips,
Visual Studio
Monday, May 7, 2012
Domesticating Skype
Skype Version 5.8.32.158
Skype has been really irritating me by hanging around on the task bar even when its not signed in. I want it hiding in the tray like it used to.
To make matters worse, the advanced options are not accessible, so I can't use the old option of forcing it not to do the irritating behaviour.
Finally, I got motivated enough ( or passed the irritation threshold...) to do something about it.
http://www.mydigitallife.info/how-to-minimize-skype-to-windows-7-system-tray-notification-area/
Using the compatibility hack described on this page will force it back into pre-windows 7 behaviour. Worked like a charm.
Skype has been really irritating me by hanging around on the task bar even when its not signed in. I want it hiding in the tray like it used to.
To make matters worse, the advanced options are not accessible, so I can't use the old option of forcing it not to do the irritating behaviour.
Finally, I got motivated enough ( or passed the irritation threshold...) to do something about it.
http://www.mydigitallife.info/how-to-minimize-skype-to-windows-7-system-tray-notification-area/
Using the compatibility hack described on this page will force it back into pre-windows 7 behaviour. Worked like a charm.
Labels:
Software Tips
Friday, January 27, 2012
Death to the evil filename ending in a dot
I have finally found a way to kill a file with a name ending in a dot. This particular file has been jamming up all sorts of activity. Specifically today it was stopping me creating a wim from that drive even though I specified the directory containing the poisoned file in the imagex exclusion list.
The answer is here:
http://stackoverflow.com/questions/4075753/how-to-delete-a-folder-that-name-ended-with-a-dot
It finally worked from the command line under win 7 on a poison file inside a vhd that had been sent in a mangled zip file by a student from a mac that had proven undeletable by all sorts of other means.
The fix links back to the following kb article http://support.microsoft.com/?kbid=320081
Now I just have to erradicate the same file from the clones of the VHD, origional drive, backups and any other places it has migrated.... arg!
The answer is here:
http://stackoverflow.com/questions/4075753/how-to-delete-a-folder-that-name-ended-with-a-dot
It finally worked from the command line under win 7 on a poison file inside a vhd that had been sent in a mangled zip file by a student from a mac that had proven undeletable by all sorts of other means.
The fix links back to the following kb article http://support.microsoft.com/?kbid=320081
Now I just have to erradicate the same file from the clones of the VHD, origional drive, backups and any other places it has migrated.... arg!
Labels:
Software Tips
Tuesday, November 22, 2011
How to add line breaks to ControlTip Text in Access
Whats the problem?
If you've ever tried to add line breaks or formatting to the ControlTip Text in a control in an Access project you will have noticed that you can add anything to the ControlTip Text property field and it will get put on a single line. I.e...
You can add any sort of tricky string to the property dialog box and get no useful result.
If you have spent any time thinking about property dialog programming you should already see whats going on... input validation. The code behind the property dialog is "sanitizing" your input to prevent you injecting control characters, illegal characters and other types of idiot/malicious code. This is a good thing... except when you want to do something like this intentionally.
Whats the solution?
The above description helped me identify the solution... avoid the input validation behind the property dialog rather than try to bend it to my will. The hack is to add the formatted string for the ControlTip Text via code. I use the Form_Load sub to set tricky control tip text for all the controls on the form that I want to have multi-line ControlTip Text.
I.e
Private Sub Form_Load()
showTaskManager.ControlTipText = "Display the Batch Task Manager" & vbCrLf & "Some other text here"
End Sub
This will show up as a nicely formatted multi-line ControlTip.
Simple once you see it....
If you've ever tried to add line breaks or formatting to the ControlTip Text in a control in an Access project you will have noticed that you can add anything to the ControlTip Text property field and it will get put on a single line. I.e...
You can add any sort of tricky string to the property dialog box and get no useful result.
If you have spent any time thinking about property dialog programming you should already see whats going on... input validation. The code behind the property dialog is "sanitizing" your input to prevent you injecting control characters, illegal characters and other types of idiot/malicious code. This is a good thing... except when you want to do something like this intentionally.
Whats the solution?
The above description helped me identify the solution... avoid the input validation behind the property dialog rather than try to bend it to my will. The hack is to add the formatted string for the ControlTip Text via code. I use the Form_Load sub to set tricky control tip text for all the controls on the form that I want to have multi-line ControlTip Text.
I.e
Private Sub Form_Load()
showTaskManager.ControlTipText = "Display the Batch Task Manager" & vbCrLf & "Some other text here"
End Sub
This will show up as a nicely formatted multi-line ControlTip.
Simple once you see it....
Labels:
Access,
Programming,
Software Tips,
VBA
Monday, April 26, 2010
Archive from - 27_2_08 - Fast way to rip radio interviews
Hi,
Today's subject is converting radio interviews from CD to MP3 for hosting on a website.
First use Audiograbber to rip from cda format to wav format(stereo, 44khz etc so Audiograbber can convert them to mp3 later) make sure you enable Normalization.
Step two, open each wav file in Audacity and trim to size. Export as a WAV to a new directory.
Step three use Audiograbber to convert the WAV to the final MP3 format using Lame_enc.dll. Use VBR and set the output to voice.
Life is good.
Today's subject is converting radio interviews from CD to MP3 for hosting on a website.
First use Audiograbber to rip from cda format to wav format(stereo, 44khz etc so Audiograbber can convert them to mp3 later) make sure you enable Normalization.
Step two, open each wav file in Audacity and trim to size. Export as a WAV to a new directory.
Step three use Audiograbber to convert the WAV to the final MP3 format using Lame_enc.dll. Use VBR and set the output to voice.
Life is good.
Labels:
Software Tips
Archive from 12_9_07 - 3ds max doesnt like directx debug drivers
Hi All,
I have discovered that 3ds max 9 doesn't like the DirectX debug drivers. it causes a strange disappearing object effect where some objects appear while others are overwritten.
I tried swapping to OpenGL and reinstalling my video drivers. Neither fixed the original problem. Although the OpenGL render was fine.
Finally tweaked that I was still using the debug version of the DirectX libs. So I cracked open dxcpl.cpl and swapped the drivers over, restarted 3dsmax and everything is now sweet. Way to waste a whole day.... bugger.
later...
I have discovered that 3ds max 9 doesn't like the DirectX debug drivers. it causes a strange disappearing object effect where some objects appear while others are overwritten.
I tried swapping to OpenGL and reinstalling my video drivers. Neither fixed the original problem. Although the OpenGL render was fine.
Finally tweaked that I was still using the debug version of the DirectX libs. So I cracked open dxcpl.cpl and swapped the drivers over, restarted 3dsmax and everything is now sweet. Way to waste a whole day.... bugger.
later...
Labels:
3ds max,
Software Tips
Archive from 4_6_07 - More Blog configuration
Like all software, there is a learning curve attached to blog ware. There is all the conventional set-up( just get it working...) stuff, along with the personalisation ( "I want it to work this way" or "This reflects me a bit more") along with the external functionality ("Spammers are scum", "link to me", "search me" etc) settings.
Some of the missing functionality is the personalisation of function("I want it to work like this..."). Like most software there are a set of assumptions and resulting constraints on the way the software works that are derived from the designers understanding ( either poor or good) of how "users" want their product to work. This may be either poorly implemented or quite polished ( in this case it seems quite polished) but at the end of the day the software encodes a particular work flow and mindset on the task. The assumptions are drawn from the designers experience with their own activities.
I find these sets of assumptions interesting. I am coming to see them more and more in my own work. Developing many quite different tools for disparate users in a short span of time has provided some quite condensed experience.
My observation is that most users who are approaching a new task are very dependent on their previous experience. You can either borrow from that ( both good and bad ) or make a clean break and provide something new and simple to learn. If they can have easy and early success with something then you have a winner. By this I mean, software should work straight out of the box. It should do something that is recognisable to the user as being sort of like what they want. Only then can you start to offer them options to modify the experience to be "more like what I want". At this point you have achieved the all important step of "engaging" your user. They are "inside" the experience. They and the software are now collaborating on getting the experience and process they want.
To bring this back to the subject of blogging software; my recent experience has suggested that my understanding of "normal" blogging processes are effectively zero. The conventions of blogging and the process of managing a blog are totally new to me.
I consider this a good thing. I have few pre-conceived notions about how the "blog" experience should be. The closest I can come is in managing online learning environments and discussion forums.
Another observation is on the learning curve subject. If you assume a learning curve is a factor of the difficulty of the subject matter as well as the complexity imposed by the interface design, then blogging is currently a fairly painful exercise. Not impossible but still relatively complex. Perhaps a 6 on a scale of 1 to 10 with 1 being transparent and 10 being "Invent your own tools". My conclusion would be that the software still has a fair way to mature yet. The feature set is still growing, as well as the challenges facing the designers. There are still conventions being worked out and new ways of using the blog being invented. As such its far from a mature experience but is also hardly raw anymore. For a couple of years in existence... that pretty good going. (when I say a couple of years, I mean, a couple of years being know to 'popular' culture. Obviously writing web logs has been around a tad longer than that.)
I feel the need to examine why I have started a blog. Really, it was the urge to try to simplify my life a bit. I am coming to use the online systems more and more as file repositories. The learning systems we use at Uni are fine for study materials and all the associated files, but are unsuitable for the addition of personal files or files I need access to from multiple places. They are also unsuitable for taking notes on random stuff. I have the habit of writing tracts of, basically, rambling garbage about topics that spark my interest and saving them on various hard drives, thumb drives, email systems etc. Its a pain to find them afterward and its more a pain to make sure they don't fall into the hands of anyone else. Its not that they are sensitive or contain unkind thoughts about others; its just that they are my rambling garbage and I wish to control access to it.
The next step in my attempt to solve this problem was to post it all to one of my websites. However this required having an FTP client and a decent HTML editor installed and accessible on all the computers that I use. Quite impossible. Having three offices, working in the labs, working from other peoples houses... not going to happen. I thought about trying to set it all up on a thumb drive, but even that means I need the drive with me 24/7. Another piece of junk to get lost, damaged or just in the way.
So the perfect solution is a web app. Something that I can have access to anywhere there is a connection and will just work.
While the page formatting might not be stupendous and the lack of some of the features of a word processor might be a pain. Its good to be able to just log in and work. Upload... finished. No pain. Speed, done.
I am tying to simplify things so that there is less of a barrier between me and what I am trying to get done. I am finding this an elegant solution, learning curve not withstanding.
It will be interesting to see how my habits change with access to slightly more transparent tools. Will I be inclined to write more often? Will my signal to noise ratio raise or fall? Will my interest wander to something else now I feel like its taken care of?
My guess would be slightly higher noise to signal ratio. ( no spell checking or grammar checking. Easier to click the save button without thoroughly checking what you have written )
Like now...
Some of the missing functionality is the personalisation of function("I want it to work like this..."). Like most software there are a set of assumptions and resulting constraints on the way the software works that are derived from the designers understanding ( either poor or good) of how "users" want their product to work. This may be either poorly implemented or quite polished ( in this case it seems quite polished) but at the end of the day the software encodes a particular work flow and mindset on the task. The assumptions are drawn from the designers experience with their own activities.
I find these sets of assumptions interesting. I am coming to see them more and more in my own work. Developing many quite different tools for disparate users in a short span of time has provided some quite condensed experience.
My observation is that most users who are approaching a new task are very dependent on their previous experience. You can either borrow from that ( both good and bad ) or make a clean break and provide something new and simple to learn. If they can have easy and early success with something then you have a winner. By this I mean, software should work straight out of the box. It should do something that is recognisable to the user as being sort of like what they want. Only then can you start to offer them options to modify the experience to be "more like what I want". At this point you have achieved the all important step of "engaging" your user. They are "inside" the experience. They and the software are now collaborating on getting the experience and process they want.
To bring this back to the subject of blogging software; my recent experience has suggested that my understanding of "normal" blogging processes are effectively zero. The conventions of blogging and the process of managing a blog are totally new to me.
I consider this a good thing. I have few pre-conceived notions about how the "blog" experience should be. The closest I can come is in managing online learning environments and discussion forums.
Another observation is on the learning curve subject. If you assume a learning curve is a factor of the difficulty of the subject matter as well as the complexity imposed by the interface design, then blogging is currently a fairly painful exercise. Not impossible but still relatively complex. Perhaps a 6 on a scale of 1 to 10 with 1 being transparent and 10 being "Invent your own tools". My conclusion would be that the software still has a fair way to mature yet. The feature set is still growing, as well as the challenges facing the designers. There are still conventions being worked out and new ways of using the blog being invented. As such its far from a mature experience but is also hardly raw anymore. For a couple of years in existence... that pretty good going. (when I say a couple of years, I mean, a couple of years being know to 'popular' culture. Obviously writing web logs has been around a tad longer than that.)
I feel the need to examine why I have started a blog. Really, it was the urge to try to simplify my life a bit. I am coming to use the online systems more and more as file repositories. The learning systems we use at Uni are fine for study materials and all the associated files, but are unsuitable for the addition of personal files or files I need access to from multiple places. They are also unsuitable for taking notes on random stuff. I have the habit of writing tracts of, basically, rambling garbage about topics that spark my interest and saving them on various hard drives, thumb drives, email systems etc. Its a pain to find them afterward and its more a pain to make sure they don't fall into the hands of anyone else. Its not that they are sensitive or contain unkind thoughts about others; its just that they are my rambling garbage and I wish to control access to it.
The next step in my attempt to solve this problem was to post it all to one of my websites. However this required having an FTP client and a decent HTML editor installed and accessible on all the computers that I use. Quite impossible. Having three offices, working in the labs, working from other peoples houses... not going to happen. I thought about trying to set it all up on a thumb drive, but even that means I need the drive with me 24/7. Another piece of junk to get lost, damaged or just in the way.
So the perfect solution is a web app. Something that I can have access to anywhere there is a connection and will just work.
While the page formatting might not be stupendous and the lack of some of the features of a word processor might be a pain. Its good to be able to just log in and work. Upload... finished. No pain. Speed, done.
I am tying to simplify things so that there is less of a barrier between me and what I am trying to get done. I am finding this an elegant solution, learning curve not withstanding.
It will be interesting to see how my habits change with access to slightly more transparent tools. Will I be inclined to write more often? Will my signal to noise ratio raise or fall? Will my interest wander to something else now I feel like its taken care of?
My guess would be slightly higher noise to signal ratio. ( no spell checking or grammar checking. Easier to click the save button without thoroughly checking what you have written )
Like now...
Labels:
Philosophy,
Software Tips
Archive from 1_6_07 - Blog Software Test
I have just spent the day testing various blog packages to see what will work for me. The choices were:
bBlog - turned out to be 2 years since any major updates = bad. Also couldn't figure it out and the documentation was a bit lite (none useful available)
word press-installed fine but would not work. Spat with an error about the MySQL version not being enough. Even though the version installed is higher than the spec requires. Go figure!
b2evolution - the one I ended up using (because its the first one that would install+work+let me post)
I only had one more option after this... nucleus... but I don't need to try it (day is already wasted anyway) I am over this.
Night all.
bBlog - turned out to be 2 years since any major updates = bad. Also couldn't figure it out and the documentation was a bit lite (none useful available)
word press-installed fine but would not work. Spat with an error about the MySQL version not being enough. Even though the version installed is higher than the spec requires. Go figure!
b2evolution - the one I ended up using (because its the first one that would install+work+let me post)
I only had one more option after this... nucleus... but I don't need to try it (day is already wasted anyway) I am over this.
Night all.
Labels:
Software Tips
Subscribe to:
Posts (Atom)

