I'm trying to use Help Files to add contextual help in MsgBox (from Catia).
The idea is that the MsgBox is too small, and too limited (no pictures, no links...) to clearly display help.
So I'm calling MsgBox like this:
iType = iType + vbMsgBoxHelpButton
MsgBox(sMessage, iType, sType, sHelpF, CStr(iContext))
With this the "help" button is correctly added, and if i run this from Catia Debugger, I get the correct result, ie my help file is opening, at the page iContext. The help file I use is a CHM, generated with HelpNDoc.
But if I run this from a CATScript (what i need to do in the end), the button "help" is displayed, but when clicking on it, the Help file is not opened, and instead i got this error:
For many reasons, i can't use .catvba or .bas files (it's working for this, but i still can't for other reasons), I must work with CATScripts
Any suggestions?
I've been trying different settings on the CHM generation, but I always get the same result. And the MSDN documentation on the use of Help files is really scarce, so is the comments on this issue over the web.
Thanks in advance!
Instead of a MsgBox, you can generate a hta file with a link to what you need.
Related
When I upload photos using watir with this code on windows:
file_input.set("#{Dir.pwd}/photos/" +'image.jpg')
uploading works okay, but a dialog windows appears, and it prevents the script from redirecting to the next page. I don't know how to close it, and I need to find a way to handle it. browser.windows.size shows that there is only one window, and I'm stuck. Can anyone help me?
It is a Windows dialog, it takes over the focus, you cannot click anything else (Watir goes on, but redirection at the end is aborted).
I found solution by preventing default behavior of input element:
browser.execute_script("document.getElementById('file').onclick = function(e){ e.preventDefault() } ")
I don't know if it is good solution but it works fine for me (if not, please notify me), I hope that it would help someone.
I have a VB6 project that I didn't create but I have to update, when I go to make the exe I get a compile error: Method or data member not found, and it points too "SCom1.FileReceive" in the code below. When I look at the Main form, the SCom1 control is a PictureBox.
This code has been working for the last 5 years but I don't know why SCom1 is a picturebox, or why I'm getting the error, is it a reference? SCom1 to me looks like a MSComm function? Let me know if anyone has any ideas, I just don't know VB enough to know how to troubleshoot this. Thanks
If SCom1.FileReceive = True Then
WriteToLog (Now() & " FileReceive was true, now false")
SCom1.FileReceive = False
End If
The machine which you have opened the code doesn't have the mscomm32.ocx file or the ocx file not registered properly.
When vb cannot reference an ocx, it'll convert the relevant control to a picture box control.
What you have to do is, close the project without saving. Then open system32 folder and check for mscomm32.ocx file. If the file is not there then you have to download that from the intenet. The register the file using regsvr32 command in command prompt.
After this you can open the vb6 project and start working.
=========================================================
EDIT : Included the update in the comments to the answer, this will help other users in the future... :-)
if the method name doesn't look familiar to a known ocx file (in this case the SCom1.FileReceive), the missing component can be a custom ocx file.
So check on the working machine or in project folder whether there are any ocx file exists in the relevant name (in this case SCom.ocx).
if there is a file exists in such name, register that file using regsvr32 (if not registered), then add that to toolbox, then replace the picture box control with the relevant control (make sure the name tally).
I need help. I'm trying to make a personal assistant with batch, and for effect, I want my computer to speak. I've used the speaking code before, even on this computer, but for some reason, when I try to use the speak command now, it doesn't seem to work. Here's the code I usually use:
Set objVoice=CreateObject("SAPI.SpVoice")
objVoice.Speak("Insert Message Here")
I don't know what happened, but when I run the script, I get this error:
Line: 2
Char: 1
Error: The handle is invalid.
Code 89970006
Source (null)
Please help me fix this error. Thanks in advance.
BY THE WAY, I do have Speech API, and my text to speech in Control Panel works. It seems to be the .vbs file.
Try This:
Set Speak = CreateObject("sapi.spvoice")
Speak.Speak "Text Goes Here"
Or, If you want to have it say something you enter you can do this,
Dim Message, Speak
Set Speak=CreateObject("sapi.spvoice")
Message=InputBox("Enter text","Speak")
Speak.Speak Message
Work gave me a new Macbook Pro yesterday and I'm having a hard time getting Dreamweaver CS5.5 to work with my LESS files. At first, I was getting an error saying that it couldn't open the filetype, so I hit the Adobe help areas and user forums and found the solution about editing Extensions.txt and MMDocumentTypes.xml. So now I can open the files from my local files side panel, but not from File -> Open. And despite having it listed as a Style Sheet extension, code hinting and coloring isn't working. A bizarre twist is that now if I take out my edits to those files, DW still opens the LESS files without an error. Anyone have any ideas how I can get this fully operational?
Here are a couple of the articles I found in my research and followed as best I could:
http://help.adobe.com/en_US/dreamweaver/cs/extend/WS5b3ccc516d4fbf351e63e3d117f53d6108-7fda.html
http://helpx.adobe.com/dreamweaver/kb/change-add-recognized-file-extensions.html
From what I tried today, it kind of makes sense to me now. I have it working on CS5. To get started, you should show all files on your computer. Spotlight (OS X) makes things super easy to find all instances of those files. Once you find it, CMD + R will reveal the parent folder where the file resides.
The "Extensions.txt" handles whether or not DW can open the file from the modal window/program menu. This file is located in 2 places and you should edit using "text edit" or another baside editing program:
USERS/library/Application Support/Adobe/Deamweaver
CS5/en_US/Configuration/Extensions.txt
Applications/Dreamweaver/Configuration/Extensions.txt
To do that you just need to declare a new type:
As part of the "all documents" list you need to add your SCSS,LESS
extensions
As part of the "stylesheets" list you need to add your SCSS,LESS extensions
CSS,SCSS,LESS:Style Sheets
The second file you need to EDIT, is under the folder "DocumentTypes" in CS6 I believe that folder has moved to:
USERS/library/Application Support/Adobe/Deamweaver CS5/en_US/Configuration/
However, in CS5, I found this folder in Applications/Dreamweaver/Configuration/
From here if you edit "MMDocumentTypes.xml" this file it should explain how those extensions you previously defined in "Extensions.txt" should behave. (Again, use a basic text editor).
I think somewhere on line 140 or so, you'll see the following:
<documenttype id="CSS" internaltype="Text" winfileextension="css" macfileextension="css" file="Default.css" writebyteordermark="false" mimetype="text/css" >
From here add "scss,less" to the 'winfileextension' and 'macfileextension'. Because you're on a Mac, you probably want to make sure its filled out in the 'macfileextension' attribute.
The result should look like this:
<documenttype id="CSS" internaltype="Text" winfileextension="css,scss,less" macfileextension="css,scss,less" file="Default.css" writebyteordermark="false" mimetype="text/css" >
Cheers!
Some of the webpages I visit have stubborn save file dialogs for executables. I would like to do one of the following using an extension:
Save the file by default and close the dialog box. I looked at http://kb.mozillazine.org/File_types_and_download_actions It doesn't really work for these files (the problem is described at: http://kb.mozillazine.org/File_types_and_download_actions under 'Unable to set automatic action. I verified the headers.)
I guess I can use browser.download.manager.closeWhenDone from https:// developer.mozilla.org/en/Download_Manager_preferences , if I figure out the first part :)
Suppress the download manager from showing any such dialogs altogether.
I found https:// developer.mozilla.org/en/nsIDownloadManager#addListener() and https:// developer.mozilla.org/en/Download_Manager_improvements_in_Firefox_3 that look promising. I don't really know how to extract the source URI for the transfer either. I'm curious if anyone has any existing examples for using these or if there's a better way to do this. Or if someone knows what part of Firefox's code I could poke, that would be useful too.
Thanks!
PS: Sorry,I had to break the hyper-links above with an unnecessary space after https:// - apparently I need 10 reputation to do that :)
FWIW, I managed to work around this - though my solution probably wont work for most others.
Fortunately I'm behind a proxy I control, so I just corrected the obnoxious headers (Content-Disposition and Content-Type) before they reached Firefox. These were forcing Firefox to open the File Save Dialog box despite my specified preference to 'Always save file of this type'. Furthermore, I set 'browser.download.manager.closeWhenDone' property to True. Works for me, and I cruise through such sites w.o being interrupted.