Error when executing batch file from a .CHM file - windows-xp

I have a CHM help file that has a few clickable links to powerpoint presentations which are resting in the same directory. However, when I click the link from the CHM file, I get the following error:
Unable to start TestCase-play.bat
where TestCase-play.bat runs pptview.exe and opens a powerpoint presentation both of which are also in the same directory with all required libraries. I know CHM files work with external links as long as they are in the same directory, but is there any reason a BAT file won't be executed? And if so, is there a way around this?

Since CHM files are very limited in what you can do, we migrated our documentation to HTML so we could put in flash demos and embed PPT slides for certain topics. Doesn't really answer my original question, but even if I did solve it, I think this is a better route to go for help pages.

Related

Corrupt Word docx (OpenXML) fixed by Libreoffice - how to identify possible root cause?

I am trying to identify the root cause of a corrupted Microsoft Word docx, the file being the result of a PDF conversion using commercial software. When trying to open this doc in MS Word, I get an error message saying nothing specific, only that the file is corrupted and cannot be opened.
Now, the same file opens fine in Libreoffice. When saving the file as docx from within Libreoffice, I am also able open it in Word again. There are quite a few differences in the contents of the XML files in the unzipped docx file (checked with a diff tool) compared to the one created by Libreoffice. However, I am not sure which ones exactly would cause the file create by Libreoffice to be uncorrupted.
Also, if I unzip the docx and rezip it again, it also opens fine in Word afterwards. I checked the two files on the binary level using a Hexeditor and there were quite a few differences, but it is rather hard or even impossible to understand what these differences mean.
Has anyone has a similar situation and might be able to shed some light on this? I am not sure where to start. Tks.
Problem was solved by doing a roundtrip conversion using the Apache POI library (poi.apache.org)

How to convert a SB3 file to an EXE

I'm creating a game on Scratch 3, however, when I'm finished with it, I want to convert it to an .exe file. How do I do this?
I've been interested in game development for a long time, and have even tried Unity before, but I'm just a beginner meaning it was too difficult for me. So I turned to Scratch.
Yes, It is possible! ...But it's kinda complex,
Bear with me!
First, Take your sb3 file and convert it into a sb2. To do this I recommend using rexscratch's sb3tosb2 tool. Found here: https://github.com/RexScratch/sb3tosb2
Make sure you have python installed, if you don't, google how to install it. (it's easy).
Next, Click Clone or Download then click Download ZIP. Once that is downloaded, Open the zip, go to the next folder, and execute sb3tosb2.py . This will then ask for a sb3 file, Navigate to the sb3 file you have and select it. It may say it wants to work in compatibility mode, if it does, Just accept it. It will finish up and ask you where to put a sb2 file, just place it on your desktop and name it something.
Secondly, We need to use a program called junebeetle, Don't worry, it's a web based one, found here: https://junebeetle.github.io/converter/online/
Click open scratch file. It will ask for a sb2, Navigate to where you put the sb2 file and open it. If you want you can customize how it will open, you can. I like to use the auto start function, and fullscreen. Don't mess with the resolution unless you know not how to screw-up aspect-ratios. Then click "Convert to SWF" This will then download the SWF version the scratch game, simply name it what you want and leave it.
Finally, you need to convert the SWF file to an EXE, There are plenty of ways to do this, but for ease, I recommend using a lite file converter. SWF Tools is a good one found here: https://sourceforge.net/projects/swftools/files/SwF_To_eXe/Swf2eXe_Latest.zip/download
Let it download and then extract the zip file's content to your desktop or downloads folder. Then open the exe file inside the folder from the zip file you just extracted.
Almost there! Click "Add a file" Then, you guessed it, Navigate to the SWF file that was spat out from the conversion of the sb2. Then click "Convert" Let it do its thing, and soon it will finish. Boom, Done. To find your exe file, go to where you stored the SWF to EXE converter, go to the "Output" Folder, and infront of you, is your EXE File! Note: Your anti-virus might freakout, this is normal when making new programs.
Also, Some fonts may break, This is just a side effect of the sb3 to sb2 conversion due to the fact that there is currently no way to convert sb3 to SWF.
Hopefully that was easy enough to understand. It is a complicated process, But yields results!
If you have any issues, Just Ask! I can help!
You could use the TurboWarp Packager. It's free and safe. https://packager.turbowarp.org/
There might not be a specific or direct way to convert a Sb3 File to an exe file but You can do it indirectly in a few steps which might be kind of lengthy but works.
When your SB3 project is done, go to https://sheeptester.github.io/htmlifier/
And convert your sb3 file to html.
From there you can convert the html file you got just now to an exe file, but not as you might expect it to. You cannot convert an html page to an exe file so what you can do is add the html webpage (the scratch game now converted to a html webpage) as an 'embed' file in the software such as, like Unity or Visual Basic, as they allow html webpages to be embedded in a project. Then you can add features and stuff, then publish or export your project as an exe file.
I know the process is really lengthy and I practically just wrote a long boring thesis but this might be the only way you can convert scratch to exe.
Hope my answer helps!
Hasta La Vista
Convert your Scratch project to HTML using Scratch HTMLifier: https://sheeptester.github.io/words-go-here/htmlifier/
Download NW.js and put its files (nw.exe, ...) in a directory. Create a package.json file in that directory that should look like this:
{
"name": "Project",
"main": "project.html"
}
(replace Project with the name of your project and project.html with the name of your HTML file).
Make sure that your project runs when you start nw.exe.
Use any tool to turn your folder into a self-extracting archive.
See also: https://scratch.mit.edu/discuss/topic/341617/
use https://packager.turbowarp.org/
Using simple setting you can export without any problems.
This post is marked obsolete because the content is out of date. It is not currently accepting new interactions.
Currently, there is no software or smart javascript tricks that can convert .sb3 files into .exe files. You could use an .sb2 file but you need to use Scratch 2.0. There are developers working on conversion programs that do .sb3 to .exe but that will take a while. I would recommend using Scratch 2.0 if you want to convert your Scratch games to an executable.

Tool to download files (including files without direct link) from website?

I have been trying to find a solution to download files from URL such as: https://.com//. I learned about wget and tried quite many options, but realized it does not download any files that does not have direct link in index file or any sort.
For example, I'd like to download everything from https://somesites.com/myfolder/myfiles/.
Let's say there is an index.html under "myfiles" directory, and many html files and couple directories that are all referenced and linked in index but also couple of other html files such as sample123.html and sample456.html.
wget command successfully downloads all, but sample123.html and sample456.html with pretty much most of the common and well known options.
Is there any other tools that will grab ALL files that are located in https://somesites.com/myfolder/myfiles/ regardless with or without direct link?
I also tried lftp against the http URL, but download result was much fewer files that wget.
I looked through stack overflow for this, but recommended commands are the ones that only downloads files with direct link (by wget).
What you want to do is not possible and could be a security problem. Imagine that someone has, for example, a file with some sensitive data inside the folder and that file is not listed anywhere. You are asking for a tool that would also download that file.
So as said, is not possible, that's why it's always a good suggestion to disable directory listing in HTTP servers as a security option, to prevent exactly what you want to do.

Opening a .im files (nanoSIMS data) on FIJI using Macro

I am looking for a macro command to open .im files in FIJI.
Since FIJI does not support the .im format, it requires a plugin called OpenMIMS, but simple lines:
run("Open MIMS Image");
open(" directory ");
would give an error message:
File is not in a supported format, a reader plugin is not available, or it was not found.
An almost the same question has apparently been asked and solved here-
Problems with an ImageJ plugin, except I am already using FIJI and Bio-Formats would not be a solution to my problem as it does not seem to support .im files, either.
I would much appreciate it if someone could enlighten me. =)
You should first check whether you can open the file using the menu via Plugins > Open MIMS Image. (I assume you installed the OpenMIMS plugin according to these instructions, adding an update site.)
When you do this while the macro recorder is running, it should record the necessary command to use in your macro code.
In the lines you posted, the second line:
open(" directory ");
doesn't make any sense and by itself will result in the error message you posted (have a look at the second part of the error message to find out the path that ImageJ is trying to open).

How to Change Netbeans Fonts and Colors Preview Document?

Within the Netbeans 6.5's Tools -> Options -> Fonts & Colors -> Syntax dialog, you have the ability to change the look and feel of the Netbeans text editor. When you select a language, you are presented with a preview of your font/color scheme. However, when I preview Java, there are far more options for syntax changes than are being displayed in that preview window. If I were able to view a more robust piece of code, I'd be able to see the immediate effect of more of the options.
How can I supply a preview document to view my font/color changes?
UPDATE:
After looking into this some more, I've been able to narrow down the problem a bit. From what I can tell, everything in Netbeans is considered a plugin. The GUI editor is a plugin, and even the text editor is a plugin. This means that what ever piece of Netbeans that actually analyzes Java code and does syntax highlights is also a plugin (since Java is just one of many languages Netbeans highlights, it makes sense this is a plugin).
I think fromvega is on the right track with his suggestion. The tutorial for creating a manifest file editing plugin pointed me in the right direction. The tutorial eludes to a file used as a sample document used for font/color previews. It tells you how to create one inside this new plugin project. (Located in "Registering the Options in the NetBeans System Filesystem", part 4. About 4/5 of the way down the page.)
My next line of thought was to look for the Java syntax editing mode plugin and find this file and update it with a richer example file. I looked in the installation directory and came up empty, but I found what looks like the appropriate files within my user settings directory. There is a config directory with a lot of subfolders within my user directory (Windows: C:\Documents and Settings\saterus.netbeans\config).
I've been poking around inside this directory a bit, but have only found the xml files the manifest tutorial talks about. I have been unable to find the extensionless sample file for the Java plugin that I believe should be there.
Since I've hit a brick wall for the moment, I thought I'd toss it back to the SO community and see if you guys might make the last leap and find the solution.
Just for anyone who wants to alter this themselves it is possible on a unix machine to use grep to locate the file i.e.
grep -lr "some part of the current sample code" /path/to/netbeans
I used this method to locate the ruby example filename and from that identified that it is kept in org-netbeans-modules-ruby.jar as a file called RubyExample. By simply altering that file I was able to construct a better sample file for my own use.
Hope this helps someone!
The document which is displayed (for each mime type) is specified in a particular folder in the "system file system" (which is a NetBeans concept which is a virtual file system composed from contributions from individual modules; this is how functionality is dynamically registered in NetBeans).
Modules typically specify their system file system contributions in a file named "layer.xml" in the plugin. The create plugin templates typically offer to create this for you.
For example, here's how the Python example is registered:
<filesystem>
...
<folder name="OptionsDialog">
<folder name="PreviewExamples">
<folder name="text">
<file name="x-python" url="PythonExample.py"/>
</folder>
</folder>
...
Here, PythonExample.py is a sample file in the same directory as the layer file.
Therefore, what you need to do is create a plugin which overrides the existing registration(s) for the mime type(s) you care about and provide alternate sample documents. You may need to hide the existing registration first (see the _hidden
part from http://doc.javanb.com/netbeans-api-javadoc-5-0-0/org-openide-filesystems/org/openide/filesystems/MultiFileSystem.html ).
Hopefully this guides you in the right direction.
However, in thinking about it, we probably ought to make the preview area editable - so people can cut & paste whatever codefragment they care about right in there. This wouldn't be persistent, so whenever you change languages you get the original samples back - but it provides a quick way to see your own code. This shouldn't be just for the Fonts & Colors customization, but for the Formatting preview panels as well.
I've filed an issue against NetBeans for this:
http://www.netbeans.org/issues/show_bug.cgi?id=155964
-- Tor
I think you can only accomplish that with a new plugin, since you need somekind of parsing to define what is what.
Give a look a these tutorials, I haven't read them in details but they seem to show you how to do what you want:
http://platform.netbeans.org/tutorials/nbm-mfsyntax.html
http://www.antonioshome.net/kitchen/netbeans/nbms-coloring.php